Getting Started

This page will help you get started with the Cyxtera digital exchange API.

Authentication

To interact with the Digital Exchange API, we need to get authentication tokens as well as CustomerId and FabricId values to use in other API calls.

1. Get API token

Digital Exchange API uses Bearer tokens to secure the calls and to make any call, API calls have to send the Authorization: Bearer <BEARERTOKEN> where <BEARERTOKEN> is the token that represents the JWT token the customer needs to pass in a HTTP Request header

To retrieve API token, please use the following API call:

POST https://auth.cxd.cyxtera.com/oauth/token

Content-type: application/json

BODY

{
    "client_id": "<YOUR CLIENT ID>",
    "client_secret": "<YOUR SECRET>",
    "audience": "https://cxd.cyxtera.com/api",
    "grant_type": "client_credentials"
}

The output will return the bearer token in the form of an access_token value. Please retrieve the value of access_token from the response and use it as Authorization header for all calls.

{
    "access_token": "<YOUR ACCESS TOKEN>",
    "expires_in": 86400,
    "token_type": "Bearer"
}

2. Get Current Customer Data:

GET https://cxd.cyxtera.com/api/current
Authorization: Bearer <ACCESS TOKEN FROM API TOKEN CALL>

This call would return:

{
    "id": <CUSTOMERID>,
    "accountNumber": <CUSTOMER BAN>,
    "name": "Cyxtera R & D"
}

Please save the value of CustomerId from the id property of this call.

3. Get Locations Data

GET https://cxd.cyxtera.com/api/locations
Authorization: Bearer <ACCESS TOKEN FROM API TOKEN CALL>

This call would return:

{
    "items": [
        {
            "id": 1,
            "name": "Dallas, Texas",
            "code": "DFW",
            "locationNumber": 1
        }
    ],
    "type": "application/vnd.cyxtera.fabricmanager.location.collection.v1+json"
}

Cyxtera digital exchange can run in several data centers and each data center can have several fabrics. Our API endpoints for accessing resources is by using a combination of CustomerId and FabricId.

So, you can use the items property from the list and then iteratively pull the fabrics for each of the locations in the form of the following call:

GET https://cxd.cyxtera.com/api/locations/1/fabrics
Authorization: Bearer <ACCESS TOKEN FROM API TOKEN CALL>

This call would return:

{
    "items": [
        {
            "id": 1,
            "name": "Dallas",
            "locationId": 1,
            "fabricNumber": 1
        }
    ],
    "type": "application/vnd.cyxtera.fabricmanager.fabric.collection.v1+json"
}

4. Endpoints

Once you have the customer id and fabric id from calls 2 and 3, you can then iterate the calls using the documentation on this site.