Projjex API

Managed Document Methods
Overview

Only projects where Document Management is enabled have permission to access the managed document methods.

The managed document methods allow you to check-in or check-out a document, lock or unlock a document, or add a reservation. The add reservation method always adds the specified user to the end of the list. You can also remove or move a reservation.

The current logged-in user is assumed to be the user who is requesting the document function in most cases. For example, the Check-out Document method checks-out the document for the current logged-in user. A user with project administrator privileges can remove reservations for other users, and check-in a checked-out document for anyone.

The standard XML and JSON representations of a managed document is shown below. These are returned by all of the methods described below.

When a document is checked-out or reserved, the DocMgmtUserID and DocMgmtUserName will be included. These fields identify the user who has the document checked-out, or the first person on the reservation list. The Reservations section lists the users in the reservation queue in the order of their position, the first being the top of the list.

Sample Data Responses
<Document DocumentID="3" Name="contract.doc">
    <ProjectID>1234</ProjectID>
    <ItemID>82</ItemID>
    <AddedBy>CDA</AddedBy>
    <CreatedOn>2008-02-25</CreatedOn>
    <Size>492</Size>
    <DocMgmtStatus>0</DocMgmtStatus>
    <DocMgmtStatusDesc>Checked-out</DocMgmtStatusDesc>
    <DocMgmtUserID>15922</DocMgmtUserID>
    <DocMgmtUserName>Catherine Marten</DocMgmtUserName>
    <Reservations>
        <UserID>15847</UserID>
        <UserID>15922</UserID>
    </Reservations>
</Document>
Sample JSON Responses
handleProjjexData({ "Document": {"CreatedOn": "2008-02-25", "DocumentID": "3", "ItemID": "82", "Size": "492", "Name": "contract.doc", "AddedBy": "CDA", "ProjectID": "187", "DocMgmtStatus": "1", "DocMgmtStatusDesc": "Available"}, {"CreatedOn": "2008-02-27", "DocumentID": "4", "Size": "214", "Name": "Projjex20080227-01.jpg", "AddedBy": "CDA","ProjectID": "1234" "DocMgmtStatus": "0", "DocMgmtStatusDesc": "Checked-out", "DocMgmtUserID": "15867", "DocMgmtUserName": "John Smythe"}});
Methods
Check-out Document
URL: http://api.projjex.com/documents/managed/checkout/
Overview
Checks-out a document for the current logged-in user.
Parameters
Name Description Required
Session Session token received when logging in. Yes
ProjectID The unique identifier of the project. Yes
DocumentID The unique identifier of the document. Yes
Example
http://api.projjex.com/documents/managed/checkout/?Session=UJ0X23LRZPR1AFX5YKF4&ProjectID=1234&DocumentID=1
Response
The server will respond with an updated list of documents within the project. Refer to the Sample Data Responses.
Check-in Document
URL: http://api.projjex.com/documents/managed/checkin/
Overview
Checks-in a document. The current logged-in user must have the document checked-out.
Parameters
Name Description Required
Session Session token received when logging in. Yes
ProjectID The unique identifier of the project. Yes
DocumentID The unique identifier of the document. Yes
Example
http://api.projjex.com/documents/managed/checkin/?Session=UJ0X23LRZPR1AFX5YKF4&ProjectID=1234&DocumentID=1
Response
The server will respond with an updated list of documents within the project. Refer to the Sample Data Responses.
Remove Check-out
URL: http://api.projjex.com/documents/managed/remove/checkout/
Overview
Checks-in a document that is checked-out by any user. The current logged-in user must be a project administrator.
Parameters
Name Description Required
Session Session token received when logging in. Yes
ProjectID The unique identifier of the project. Yes
DocumentID The unique identifier of the document you want to update. Yes
Example
http://api.projjex.com/documents/managed/remove/checkout/?Session=UJ0X23LRZPR1AFX5YKF4&ProjectID=1234&DocumentID=1
Response
The server will respond with an updated list of documents within the project. Refer to the Sample Data Responses.
Add Reservation
URL: http://api.projjex.com/documents/managed/add/reservation/
Overview
Adds the current logged-in user to the end of the reservation list for a document.
Parameters
Name Description Required
Session Session token received when logging in. Yes
ProjectID The unique identifier of the project. Yes
DocumentID The unique identifier of the document to delete. Yes
Example
http://api.projjex.com/documents/managed/add/reservation/?Session=UJ0X23LRZPR1AFX5YKF4&ProjectID=1234&DocumentID=1
Response
The server will respond with an updated list of documents within the project. Refer to the Sample Data Responses.
Remove Reservation
URL: http://api.projjex.com/documents/managed/remove/reservation/
Overview
Removes the user in the reservation list for a document at the specified position. The current logged-in user must be in the specified position, or be a project administrator in order to remove the reservation.
Parameters
Name Description Required
Session Session token received when logging in. Yes
ProjectID The unique identifier of the project. Yes
DocumentID The unique identifier of the document to delete. Yes
Position The position, or index, in the reservation list. Position indexes start at 1. Yes
Example
http://api.projjex.com/documents/managed/remove/reservation/?Session=UJ0X23LRZPR1AFX5YKF4&ProjectID=1234&DocumentID=1&Position=2
Response
The server will respond with an updated list of documents within the project. Refer to the Sample Data Responses.
Move Reservation
URL: http://api.projjex.com/documents/managed/move/reservation/
Overview
Moves the user in the reservation list for a document at the specified position one position up, or one position down. The current logged-in user must be in the specified position, or be a project administrator in order to move the reservation.
Parameters
Name Description Required
Session Session token received when logging in. Yes
ProjectID The unique identifier of the project. Yes
DocumentID The unique identifier of the document to delete. Yes
Position The position, or index, in the reservation list. Position indexes start at 1. Yes
Direction The direction to move the user at the specified position. 1 for up, and 0 for down. Yes
Example
http://api.projjex.com/documents/managed/move/reservation/?Session=UJ0X23LRZPR1AFX5YKF4&ProjectID=1234&DocumentID=1&Position=2&Direction=1
Response
The server will respond with an updated list of documents within the project. Refer to the Sample Data Responses.
Lock Document
URL: http://api.projjex.com/documents/managed/lock/
Overview
Locks a document. The current logged-in user must be a project administrator.
Parameters
Name Description Required
Session Session token received when logging in. Yes
ProjectID The unique identifier of the project. Yes
DocumentID The unique identifier of the document. Yes
Example
http://api.projjex.com/documents/managed/lock/?Session=UJ0X23LRZPR1AFX5YKF4&ProjectID=1234&DocumentID=1
Response
The server will respond with an updated list of documents within the project. Refer to the Sample Data Responses.
Unlock Document
URL: http://api.projjex.com/documents/managed/unlock/
Overview
Unlocks a document. The current logged-in user must be a project administrator.
Parameters
Name Description Required
Session Session token received when logging in. Yes
ProjectID The unique identifier of the project. Yes
DocumentID The unique identifier of the document. Yes
Example
http://api.projjex.com/documents/managed/unlock/?Session=UJ0X23LRZPR1AFX5YKF4&ProjectID=1234&DocumentID=1
Response
The server will respond with an updated list of documents within the project. Refer to the Sample Data Responses.
Quick Links
Support

.NET developers can download our .NET API Wrapper. The wrapper simplifies using the Projjex™ API by returning .NET objects.

API Methods