-
Notifications
You must be signed in to change notification settings - Fork 0
Server RESTful API
Mike Puckett edited this page Nov 27, 2015
·
17 revisions
Note: All requests will fail with HTTP status 401-Unauthorized if not "logged-in"
-
POST
/s2dr/login- Authenticates as user and begins a session
- The request body should be empty. The server uses the client X.509 certificate in the request to authenticate the user.
- Will return a 200 upon successful login
-
POST
/s2dr/upload- Adds a document to the server
- Will return a 201 upon successfully saving the document. The response header's "Location" field will hold the URI to access the document.
- Request Body (must be of type
form-data):
Request Body: { 'document': '${documentBitStream}', 'documentName': '${documentName}', 'securityFlag': '${securityFlag1}', 'securityFlag': '${securityFlag2}' }- Multiple
securityFlagparams can be included. Just name each flag as a different attribute all with the keysecurityFlag. - The server will enforce that the
securityFlagparam is "NONE", "INTEGRITY", or "CONFIDENTIALITY"
-
GET
/s2dr/document/${documentName}- Download a document specified by
${documentName} - Will return a 404 if there is not a document with the given
${documentName}
- Download a document specified by
-
PUT
/s2dr/document/${documentName}- Allows a client to delegate permissions
- Will return a 200 of the operation was successful
- Request Body (must be of type
JSON(application/json))
Request Body { 'permission': '${permission}', 'userName': ${userName}, 'timeLimitMillis;" '${timeLimitMillis}', 'canPropogate': ${canPropogate} }- The
timeLimitMillisparameter should be the number of milliseconds corresponding to the time limit. For instance, if the time limit of the delegation is 30 seconds, thetimeLimitMillisshould be 30,000 (30 * 1000). - The server will enforce that the
permissionparam is "READ", "WRITE", "BOTH", or "OWNER" - The server will enforce that the
canPropogateparam is either "true" or "false"
-
DELETE
/s2dr/document/${documentName}- Deletes the document specified by
${documentName} - Will return a 200 upon successful deletion
- Deletes the document specified by
-
POST:
/s2dr/logout- Ends the current session for the user
- Will return a 200 upon successful logout