Getting started with the Secure Private Access on-premises API
The topic captures the basic information on using the Secure Private Access API.
Placeholder Values
In this document, any text enclosed in curly braces
{} represents a placeholder for a variable value. For example, { hostUrl } must be replaced with the actual host URL.
Points to note
To use the Secure Private Access API, use the service URL defined in the OpenAPI specification and
https protocol for all your requests.
The following must also be specified in each API request:
-
The
Authorizationheader must be set to a valid bearer token. Otherwise, a401 Unauthorizederror response is received. -
The
Acceptheader must always be set toapplication/json. Otherwise, a406 Not Acceptableerror response is received. -
For POST or PUT requests where a request body is present, the
Content-Typeheader must be set toapplication/json; charset=utf-8. Not doing so results to a415 Unsupported Media Typeerror response. All data provided in the request bodies must be in the appropriate JSON formats. -
Upon receipt of a
Citrix-TransactionIdheader following the initial request, the same header with the identical value must be included in subsequent requests. This facilitates the tracing of request and response flows in case support is required. Although theCitrix-TransactionIdheader is not strictly necessary for processing an operation, a new one is provided in a response if one is not included in the request. -
HostandContent-Lengthheaders are required for all requests.
In all cases where results are returned, they can be expected to be in JSON format.
Authorization credentials
Errors
For error responses, such as
400 BAD REQUEST, 406 NOT ACCEPTABLE, 415 UNSUPPORTED MEDIA TYPE, 500 INTERNAL SERVER ERROR, a response body with more details is expected. The body is in the following JSON format:
{
"type": "https://errors-api.cloud.com/common/Error",
"detail": "Input payload validation failed",
"parameters": [
{
"name": "priority",
"value": "167.72 is not of type 'integer'"
},
{
"name": "active",
"value": "1 is not of type 'boolean'"
}
]
}
API specification
The OpenAPI specification is available in the url:
https://{ hostUrl } : { port }/accessSecurity/swagger
where it can also be downloaded as a json file.