Getting Started

The following sections introduce you to the CX Cloud API resources and provide instructions to make your first API request. Learn how to retrieve a list of CX Cloud Customer IDs and retrieve data from a CX Cloud account. Examples will be shown using the command line with cURL.

Below is high-level description of the API resources:

  • Customer: The Customer API operations provide a list of the CX Cloud accounts eligible for querying with the CX Cloud API.
  • Inventory: The Inventory API operations provide the assets in a CX Cloud account.
  • Contract: The Contract API operations provide service contract details and asset coverage information for the contracts and assets in a CX Cloud account.
  • Product Alert: The Product Alert API operations provide the hardware and software end of life, field notices, and security advisories for the assets in a CX Cloud account.

API User Requirements

To use the CX Cloud API, you must have a role in at least one CX Cloud Account (https://cx.cisco.com)

Base URL

Every API request begins with the following base URL.

https://apix.cisco.com/cs/api/v2/

Authorization

In addition to the path URL, add an Authorization header to every API request using the following format.

--header 'Authorization: Bearer XXXXXXXXXX'

Refer to the Authentication section for more information about authentication and generating API tokens.

Note There may be an initial delay of up to 10 minutes before you can use the CX Cloud API after authentication is set up for the first time.

1. Obtain a list of CX Cloud Customer IDs

To begin navigating the API, you will first need to obtain a list of CX Cloud Customer IDs. You will need this for the next steps.

Request

curl --location 'https://apix.cisco.com/cs/api/v2/customer-info/customer-details'
--header 'Authorization: Bearer XXXXXXXXXX'

Response

{
    "data": [
        {
            "customerId": "abc123def",
            "city": "null",
            "country": "null",
            "customerName": "CISCO SYSTEMS",
            "postalcode": "null",
            "state": "null",
            "streetAddress1": "null",
            "streetAddress2": "null",
            "streetAddress3": "null",
            "streetAddress4": "null",
            "theatreCode": "US"
        }
    ],
    "pagination": {
        "page": 1,
        "pages": 1,
        "rows": 1,
        "total": 1
    }
}

2. Retrieve data from a CX Cloud account

Using the response from the previous step of CX Cloud Customer IDs, retrieve the details from any of the other CX Cloud API operations by including the customerId as a query parameter.

Request

curl --location 'https://apix.cisco.com/cs/api/v2/inventory/hardware?customerId=abc123def'
--header 'Authorization: Bearer XXXXXXXXXX'

Response

{
    "data": [
        {
            "customerId": "abc123def",
            "neInstanceId": "NA,SERIAL,PID,NA",
            "managedNeInstanceId": "NA,SERIAL,PID,NA",
            "inventoryName": "null",
            "hwInstanceId": "SERIAL1,PID1,NA,NA,SERIAL2,PID2,NA",
            "hwName": "null",
            "hwType": "Chassis",
            "productSubtype": "Blade Server",
            "slot": "null",
            "productFamily": "Cisco Catalyst 9500 Series Switches",
            "productId": "ISR4331/K9",
            "productType": "Switches",
            "swVersion": "17.9.1",
            "serialNumber": "AAA1234ZZZZ",
            "serialNumberStatus": "null",
            "hwRevision": "null",
            "tan": "null",
            "tanRevision": "null",
            "pcbNumber": "null",
            "installedMemory": "null",
            "installedFlash": "null",
            "collectedSerialNumber": "null",
            "collectedProductId": "null",
            "productName": "Cisco Catalyst 9300-24UX Switch",
            "dimensionsFormat": "null",
            "dimensions": "null",
            "weight": "null",
            "formFactor": "null",
            "supportPage": "null",
            "visioStencilUrl": "null",
            "smallImageUrl": "null",
            "largeImageUrl": "null",
            "baseProductId": "null",
            "productReleaseDate": "null",
            "productDescription": "Catalyst 9300 24-port mGig and UPOE, base switch"
        }
    ],
    "pagination": {
        "page": 1,
        "pages": 3,
        "rows": 20,
        "total": 56
    }
}