Documentation Index

Fetch the complete documentation index at: https://docs.crossworkassurance.cisco.com/llms.txt

Use this file to discover all available pages before exploring further.

✨ New: Try our AI‑powered Search (Ctrl + K) — Read more

Querying Session PM data via API

Prev Next

The user interface of Crosswork Assurance uses data retrieved via our OpenAPIs.


API Calls to Crosswork Assurance

If you aren't familiar with REST APIs, we recommend going to our intro page here to review that first.
To make API calls to Crosswork Assurance, follow these steps:

  1. Authenticate to obtain an Authorized Token.
  2. Make requests including an Authorized Token.

Get an Authorized Token - (Login API)

Authentication is based on a per-user basis, thus, to make API calls to Crosswork Assurance, you must have a user account and password for the tenant. You can also use JWTs for machine-to-machine integration (more on that here).

For a list of all Crosswork Assurance APIs available, the swagger definition file is served at https://api.analytics.accedian.io/ .

Once the user exists, the login API can be used to obtain an Authorized Token. The swagger definition can be found under the Auth Service here: https://api.analytics.accedian.io/session.html#operation/Login

A curl command to login would look like:

curl -X POST \
    https://tenant-url.npav.accedian.net/api/v1/auth/login \
    -H 'Cache-Control: no-cache' \
    -H 'Content-Type: application/x-www-form-urlencoded' \
    -d 'username=tenantUsername&password=tenantUserPassword'

When this command returns, it will include a couple of important headers:

  • Set-cookie: for browser based calls
  • Authorization: for API based calls

Both of these headers contain the same Authorized Token data. For anyone using our UI, the cookie will handle authentication going forward. For anyone using our APIs, they should extract the content of the "authorization" header, and provide it as an "authorization" header for all subsequent calls to Crosswork Assurance.

Make an Authorized API Request - (Aggregate Metrics API)

For example, when making a call for the average Delay P95 for all monitored objects from Crosswork Assurance that have metadata associated to them with the region "east", the following request could be made:

curl --location 'https://<tenant URL>/api/v3/metrics/aggregate' \
--header 'Content-Type: application/vnd.api+json' \
--header 'Cookie: skylight-aaa=<cookie from previous step>' \
--data '{
    "data": {
        "type": "aggregates",
        "attributes": {
            "aggregation": "avg",
            "granularity": "all",
            "interval": "2023-06-13T05:29:10.010Z/2023-06-13T13:29:10.010Z",
            "globalMetricFilterContext": {
                "direction": [
                    "0"
                ],
                "metadata": {
                    "include": {
                        "region": [
                            "east"
                        ]
                    },
                    "exclude": {}
                },
                "objectType": [
                    "twamp-sf",
                    "twamp-sl",
                    "echo-icmp",
                    "echo-udp"
                ]
            },
            "metrics": [
                {
                    "metric": "delayP95",
                    "direction": [
                        "0"
                    ],
                    "objectType": [
                        "echo-icmp",
                        "echo-udp",
                        "twamp-sf",
                        "twamp-sl"
                    ]
                }
            ],
            "queryContext": {
                "ignoreCleaning": false,
                "focusBusyHour": false,
                "ignoreMaintenance": false
            }
        }
    }
}'

The response of this query would look like this:

{
    "data": {
        "attributes": {
            "aggregation": "avg",
            "globalMetricFilterContext": {
                "direction": [
                    "0"
                ],
                "metadata": {
                    "include": {
                        "region": [
                            "east"
                        ]
                    }
                },
                "objectType": [
                    "twamp-sf",
                    "twamp-sl",
                    "echo-icmp",
                    "echo-udp"
                ]
            },
            "granularity": "all",
            "interval": "2023-06-13T05:29:10.010Z/2023-06-13T13:29:10.010Z",
            "metrics": [
                {
                    "direction": [
                        "0"
                    ],
                    "objectType": [
                        "echo-icmp",
                        "echo-udp",
                        "twamp-sf",
                        "twamp-sl"
                    ],
                    "metric": "delayP95"
                }
            ],
            "queryContext": {},
            "result": [
                {
                    "direction": [
                        "0"
                    ],
                    "objectType": [
                        "echo-icmp",
                        "echo-udp",
                        "twamp-sf",
                        "twamp-sl"
                    ],
                    "metric": "delayP95",
                    "series": [
                        {
                            "timestamp": "2023-06-13T05:29:10.010Z",
                            "value": 7421.3430066787305
                        }
                    ]
                }
            ]
        },
        "id": "2aa12296-3e33-4123-9f2f-cc31e3f8515c",
        "type": "aggregates"
    }
}

© 2026 Cisco and/or its affiliates. All rights reserved.

For more information about trademarks, please visit:
Cisco trademarks 
For more information about legal terms, please visit:
Cisco legal terms