Performing requests
This section provides instructions for making requests using request headers, request bodies, and queries.
Request header
All supported input header fields follow the HTTP/1.1 protocol. Below you can find a list of the supported request header fields.
|
Header name |
|
|
|---|---|---|
|
Accept |
No |
Example: Accept: application/json,text/html, application/ xhtml+xml,application/xml;q=0.9, image/webp*/*;q=0.8 |
|
Accept-Encoding |
No |
Example: Accept: Accept-Encoding: gzip,deflate,sdch |
|
Content-Type |
No |
Example: Content-Type: application/json |
|
Host |
Yes |
Example: Host: <server>:<port> |
Note:
- When sending data, always send a Content-Type header to specify the type of data being sent from the client to the server.
-
Do not send a Content-Type header unless content is sent.
-
Always send an Accept header to specify the format of the data to receive from the server.
Client types
Client types are optional. To identify REST API clients in the ACCESS TYPE column of the Sessions tab in Site Admin, send the HPECLIENTTYPE header with your requests.
If you omit this header, sessions appear as generic REST clients, such as API_KEY_ACCESS. Use a custom client type, such as TASKTOP_SYNC, to distinguish your integration's sessions.
Caution: Do not use HPE or OCTANE as prefixes for client types. These prefixes are reserved for predefined client types for internal use, such as OCTANE_IDE_PLUGIN. Their behavior is not part of the public REST API.
Request body
The API supports only application or json representation, both on request and response.
Data is submitted and returned in the JSON format unless otherwise specified in the reference for a resource. This API uses the ECMA 404 Specification.
All supported request methods follow the HTTP/1.1 protocol.
| Request | Description |
|---|---|
| GET |
Requests a representation of a resource matching the request URI. |
| PUT |
Requests that the enclosed represented resource will be stored under the matching request URI if the resource already exists. |
| DELETE |
Requests a deletion of the resource found in the matching request URI. |
| POST |
Requests a creation of a new resource under the resource collection matching the request URI. |

