Extracting Access Policies with Secure Private Access API

This topic provides instructions on how to extract all access policies for all applications from a specific Citrix Cloud Customer.

Prerequisites

Extracting policies using the API

The entire list of policies can be extracted by a GET request to the following endpoint, with the headers as described and without any other query parameters.

GET https://api.cloud.com/accesssecurity/accessPolicy

Request headers

Accept: application/json
Citrix-CustomerId: \{\{customerId\}\}
Authorization: CWSAuth Bearer=\{\{bearerToken\}\}
Citrix-TransactionId: \{\{Citrix-TransactionId\}\}
<!--NeedCopy-->

The Citrix-TransactionId header can be omitted.

Response sample

A 200 OK response contains a JSON body like the following:

{
    "items": [
        {
            "id": "1f738e0a-7342-4f65-aa6c-af50c56dbfc7",
            "modified": "2022-10-27T09:05:58Z",
            "apps": [
                "1a1d2dce-f567-4369-8997-d4834fc64464"
            ],
            "name": "TestPolicy 1",
            "description": "TestPolicy Description",
            "priority": 73945,
            "active": false,
            "accessRules": [...]
        },
        {
            "id": "7a738d4d-c6fb-46bf-8cdd-ba19097d25e6",
            "modified": "2022-12-06T12:41:55Z",
            "apps": [
                "b1030399-2312-4374-85a4-da6910da253e"
            ],
            "name": "TestPolicy 2",
            "description": "TestPolicy Description",
            "priority": 22920,
            "active": true,
            "accessRules": [...]
        },
        {
            "id": "e04f4bcb-807e-4743-8d4d-6a19e805f0c5",
            "modified": "2023-01-31T08:37:31Z",
            "apps": [
                "b1030399-2312-4374-85a4-da6910da253e"
            ],
            "name": "TestPolicy 3",
            "description": "TestPolicy Description",
            "priority": 12604,
            "active": false,
            "accessRules": [...]
        },
        {
            "id": "f75a4eab-5c5c-46cf-9155-42ee0e067902",
            "modified": "2023-02-03T13:13:23Z",
            "apps": [
                "b1030399-2312-4374-85a4-da6910da253e"
            ],
            "name": "TestPolicy 4",
            "description": "TestPolicy Description",
            "priority": 12202,
            "active": true,
            "accessRules": [...]
        }
    ],
    "totalNum": 4
}
<!--NeedCopy-->

The JSON object can be parsed and the policies retrieved from the items array. The totalNum property also contains the total number of policy objects returned.

For more details regarding the GET requests to this endpoint and the schema of the response, see Handling Policies with Secure Private Access API.

Extracting access policies from the Secure Private Access service user interface

  1. Log in to Citrix Cloud.

  2. Click the Manage tab in the Secure Private Access tile.

    Services tiles in Secure Private Access

  3. In the navigation pane, click Access Policies and you can see the list of the policies.

    Access Policies list

For more information about handling access policies from the Secure Private Access service UI, see Create access policies.

Resources
Access Security OpenAPI Specification
Copy Download
Extracting Access Policies with Secure Private Access API