Skip to content
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 securityFlag params can be included. Just name each flag as a different attribute all with the key securityFlag.
    • The server will enforce that the securityFlag param 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}
  • 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 timeLimitMillis parameter should be the number of milliseconds corresponding to the time limit. For instance, if the time limit of the delegation is 30 seconds, the timeLimitMillis should be 30,000 (30 * 1000).
    • The server will enforce that the permission param is "READ", "WRITE", "BOTH", or "OWNER"
    • The server will enforce that the canPropogate param is either "true" or "false"
  • DELETE /s2dr/document/${documentName}

    • Deletes the document specified by ${documentName}
    • Will return a 200 upon successful deletion
  • POST: /s2dr/logout

    • Ends the current session for the user
    • Will return a 200 upon successful logout

Clone this wiki locally