Headers
The REST API uses standard HTTP headers to decorate its requests and replies.
The following request headers are extensively used.
Name |
Description |
---|---|
|
Indicates the desired media format. At this time, it should always be |
|
Indicates that if the |
|
If the request contains content, this header indicates the media format used. At this time, only |
|
Used to authenticate requests. |
|
Used to impersonate a username. |
The following returned response headers are the most common.
Name |
Description |
---|---|
|
Media format used in the body of the response. At this time, only JSON is supported, so this should always return |
|
String representation of the version returned by the resource that can be used with the |
|
In response to creating a new resource, the server responds with |
|
In response to creating a new resource, the server responds with |
For brevity, these headers are not explained again in the documentation when discussing the specific details of a resource.
Example
The following example shows how to use the headers in HTTP requests:
curl --request GET \
--url https://MyInstance/api/entities/48109 \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header 'X-Auth-Token: XXXXXX' \
--header 'X-Impersonate: TheUsernameToImpersonate'