5.2 Return codes

Return code

Description

 

 

2xx

Successful operation

 

 

4xx

Client-side error with error message returned

 

 

5xx

Appliance error with error message returned

 

 

 

 

NOTE: If an error occurs, indicated by a return code 4xx or 5xx, an ErrorMessage is returned. The expected resource model is not returned.

5.3 URI format

All URIs point to resources. The client does not need to create or modify URIs. The URI for a resource is static and uses the format https://{appl}/rest/resource category/resource ID where:

https://{appl}Appliance address
/restType of URI
/resource categoryCategory of the resource (for example server-profiles)
/resource instance IDIdentifier of specific resource instance (optional)

5.4 Resource model format

The resources support JSON (JavaScript Object Notation) for exchanging data using a REST API. If not otherwise specified in the REST API operation, the default is JSON.

5.5 Log in to the appliance using REST APIs

When you log in to the appliance using the login-sessionsREST API, a session ID is returned. You use the session ID in all subsequent REST API operations in the auth header, except as noted in REST API Request Headers. The session ID is valid for 24 hours.

Log in

Log out

Operation

Operation

POST

DELETE

API

API

/rest/login-sessions

/rest/login-sessions

Request headers

Request headers

REST API Request Headers

auth:{YourSessionID}

Request body

REST API Request Headers

{"userName":"YourUserName","password":"YourPassword"}

Request body

NOTE: This is an example of a local log in on the appliance.

None

If you are using a directory service, you must add the following

Response

attributes: authnHost and authLoginDomain.

204 No Content

Response

 

The LoginSessionIdDTO that includes the session ID

 

 

 

5.6 REST API version

When you perform a REST API operation, a X-API-Versionheader is required. This version header corresponds to the REST API version of software currently running on the appliance. To

72 Using the REST APIs and other programmatic interfaces