Skip to main content

Basic Setup

Create an Account

Check this link about how to create an Account.

Create your first App

Check this link about how to create an App.

Get Your Access Token

Finally, you arrive at the final step to start integrating DLR APIs into your application. All endpoints are REST-based and use JSON format. We recommend Postman to ease your integration to our APIs. In this guide, you will create a request to our Remote Hands API.

Before you start, please download the postman_collection. Import the downloaded file into your Postman.

postman

Fill <your_client_id> with Client Id and <your_client_secret> with your Client Secret from your App.

The value for grant_type should be client_credentials

After importing and filling your id and secret, you can start making a request to any of our DLR APIs. First of all, hit the Access Token request to get the bearer token, which can be used to make calls to any API endpoint. Every endpoint will check this bearer token to decide whether you are authorized or not.

postman

You will get detailed information regarding your access token. Please note the access_token value containing the bearer token should be used in every API request in the selected product. Multiple products can be selected in a single App.

Get Access Token Example Response

curl --location --request POST 'https://playground.digitalrealty.com/v2/auth/token' \
--header 'Content-Type: application/x-www-form-urlencoded' \
--data-urlencode 'client_id=<your_client_id>' \
--data-urlencode 'client_secret=<your_client_secret>' \
--data-urlencode 'grant_type=client_credentials'

We also provide the curl command if you don't like using Postman.

Replace <your_client_id> with your Client Id and <your_client_secret> with your Client Secret from your App.

{
    "access_token": "eyJ4NXQiOiJ0UHFoQ2RKWDdRVGN4amo2QXc0VVJBWTNsN2ciLCJraWQiOiJCNEZBQTEwOUQyNTd",
    "token_type": "BearerToken",
    "expires_in": "3599",
    "scope": "playground_api"
}

 

Make Your First Request

You can try calling the Remote Hands API after getting a successful response from the Get Access Token API. In the drop-down menu, select the type as bearer token and paste the token in the field below that you got into the Authorization Header. You can manually copy and paste the access_token value in the Token section of the Auth tab.

postman

Make sure you select the "Bearer Token" value as type!

Enter "100123" as Master-Account-Id and "0011A00001AaAB1ABC" as Account-Id as Keys in the Headers tab.

You will get a successful JSON response with Remotehands Tickets examples after pressing the Send button.

postman

 

Get Remote Hands Example Response 

curl --location --request GET 'https://playground.digitalrealty.com/v1/remotehands-tickets' \
--header 'Master-Account-Id: <your_master_account_id>' \
--header 'Account-Id: <your_account_id>' \
--header 'Authorization: Bearer <your_access_token>'

We provide the curl command snippet above to this text. Replace <your_access_token> with the token you got from the Get Access Token request you made earlier. Replace <your_master_account_id> with "100123" and <your_account_id> with "0011A00001AaAB1ABC". You will get a successful response if you input a valid bearer token. To simplify implementation, just use Postman that we provided earlier.

{
    "content": [
        {
            "id": "WO1234567",
            "title": "Test Connect Cisco Server",
            "status": "New",
            "site": "DFW010",
            "location": "Rack 01",
            "requestType": "Planned Work",
            "category": "Existing cross connect or connectivity testing",
            "createdOn": "2022-05-11 14:50:12",
            "updatedOn": "2022-05-11 14:50:12",
            "closedOn": "",
            "createdBy": "John Doe"
        }
    ],
    "pageable": {
        "last": true,
        "totalPages": 1,
        "totalElements": 1,
        "size": 25,
        "number": 0,
        "numberOfElements": 1,
        "first": true,
        "empty": false
    }
}

Need Help?

Have not found what you are looking for, please do not hesitate to reach out to us!

globe