Service Request

A REST API supports a direct URL and JSON data format for service requests.

REST API for Documents includes examples of service requests.

URL Parameters

Unless otherwise noted, you can include service request parameters directly in the URL. The following example of the Query User (GET) service call includes the required info parameter in the URL itself:

https://www.example.com/documents/api/1.1/users/items?info=smith

JSON Parameters

Unless otherwise noted, you can submit service request parameters in JSON format. The following example shows a simple service call and the info parameter in a JSON-formatted request:

https://www.example.com/documents/api/1.1/users/items
{
    "info": "smith"
}

Multipart Requests

Some service calls require a multipart request. For these types of requests, you must include the parameters in a JSON-formatted request. For an example of a multipart request, see the Examples tab of "Upload File Version" under Files.

Header Parameters

Some types of information, such as authentication information, are passed in the request header rather than in the body of the request. This is also true for service requests that use an application link (applink). An applink grants access to a particular file or folder resource for a particular user. The applink enables you to programmatically carry out other operations on that resource on behalf of the associated user for a period of time. A service call that uses an applink includes the applink identifier and its access token in the header.

For an example, see the applink header parameters on the Examples tab of "Refresh Applink Token" under Applinks.

For more information about applinks, see Applinks.