HTTP details
BlueXP REST APIs are based on the HTTP protocol as well as JSON for content exchange.
Request
A REST API request contains the standard HTTP methods and request headers.
HTTP methods
The HTTP methods supported by the BlueXP REST APIs are shown in the following table. Not all HTTP methods are available at each of the REST endpoints. For more information, see the reference documentation for the specific API you are using.
HTTP method | Description |
---|---|
GET |
Retrieves object properties for a resource instance or collection of resources. |
POST |
Creates a new resource instance based on the supplied input values. |
PUT |
Updates an existing resource instance based on the supplied input values. |
PATCH |
Updates specific fields of an existing resource instance based on the supplied input values. |
DELETE |
Deletes an existing resource instance. |
Request headers
The common HTTP request headers are described as follows.
Request header | Description |
---|---|
|
This header contains a bearer token used to access the BlueXP server. |
|
The agent identifier is used to identify the user agent. |
|
This representation header is used to indicate the original media type of the resource. |
|
The server automatically returns content in JSON format if |
Response
A REST API response contains the standard HTTP status codes and response headers.
HTTP status codes
The common HTTP status codes are described as follows.
Status code | Reason Phrase | Description |
---|---|---|
|
OK |
The request was completed successfully. |
|
Accepted |
The request was accepted and is currently in process. BlueXP returns this code when the API call operates asynchronously. For example, the |
|
No Content |
The operation was completed successfully and the server did not send a response message. |
|
Bad Request |
The request input is not recognized or is inappropriate. An error response explains the reason. |
|
Unauthorized |
The user has not authenticated. |
|
Forbidden |
This operation is not allowed for the current authenticated user. |
|
Conflict |
The operation failed because another operation is already in progress. |
|
Method Failure |
BlueXP has not been set up. You must set up BlueXP using the API call |
|
--- |
An unexpected error occurred within the BlueXP server which has prevented it from fulfilling the request. |
Response headers
The common HTTP response headers are described as follows.
Response header | Description |
---|---|
|
The Cross Origin Resource Sharing (CORS) header indicates whether the response can be shared with requesting code from the specified origin. |
|
The type of data encoding used is indicated with this header. |
|
The data representation is carried in the header and is used to indicate the original media type of the content. |
|
This header contains the date and time the message was sent. |