Request Overview

All API requests require a Authorization header containing a bearer token for secure access. If the Authorization header is not present the response is 401 Authorization required.

If the subject of the access token is a domain user, i.e. rollins\dgelbaum, the requested path is prepended with rollins/dgelbaum.

Response Overview

Successful Responses are 202 with the body containing JSON formated file details

        {
            "Url" : "https://files.rollins.com/graph/image.png"
            "ContentMD5" = "xxxxxx", 
            "ContentType" = "image/png", 
            "LastModifiedDateTime" = DateTime.Now, 
            "Size" = 12345
        }
        

Get

Request Response

GET https://files.rollins.com/api/{path} HTTP/1.1

Authorization: Bearer mF_9.B5f-4.1JqM

If directory exists with file(s), the list of file details at the specified path is contained in the response.

If the directory is not present, the response is 404 Not Found.

If the directory exists without files, the response is 200 Found.

If the path provided references a file, the response is 202, and the file is downloaded.

Post

When uploading a file, the request path should be the directory into which the file will be uploaded. The filename will be included in the posted form data. For example, upload image.jpg to the images folder by posting a request to https://files.rollins.com/api/images and ensure the form data contains the image.

Request Response

POST https://files.rollins.com/api/{path} HTTP/1.1

Authorization: Bearer mF_9.B5f-4.1JqM

Content-Type: multipart/form-data; boundary=---------------------------41184676334

Content-Length: 29278

-----------------------------41184676334

Content-Disposition: form-data; name="caption"

-----------------------------41184676334

Content-Disposition: form-data; name="image"; filename="image.jpg"

Content-Type: image/jpeg

(Binary data not shown)

-----------------------------41184676334--

If the file was successfully uploaded the response is 202 and the response body contains the file details of the uploaded file.

If the upload fails. The response will be a Server Error with the body containing the error message.