Skip to main content

Accounts-v1 1.0.0

Helper

1: Authenticate

Text (formatted, long)

Prerequisites


  1. You should have registered in our developer portal. Check this link about how to register an Account.
  2. You should request access to the playground, sandbox and production environment using our Support page. Here is the link to support page to request access to our environments.
  3. You should have an App created in your account to get the client id and client secret. Check this link about how to create an App.

Note : The time data attribute on APIs follows a 24-hour clock starting at 00:00 and ending at 23:59.

 

Authentication


The bearer token obtained after successful authentication should be passed as credential when calling this API for authentication. Check the Access Token API link for instructions on how to generate your bearer token.

 

 

Read the Get Started documentation if you are unaware of your client credentials.

 

2. Get Account Information

Get Accounts Information


The method is used to retrieve the global ultimate account identifier and legal entity account identifier. The global ultimate account identifier and legal entity account identifier need to be passed in the header of each API call for authorization (permissions validation) purposes.

Method GET
End point /v1/accounts
Headers Authorization
Query Parameters defaultAccount
Body n/a

 

Sample Curl Request

curl --location --request GET 'https://api.digitalrealty.com/v1/accounts' \
--header 'Authorization: Bearer <access_token>'

 

Headers

Field Name Mandatory Type Description
Authorization true string Token-based authentication.

 

Query Parameters

Field Name Mandatory Type Description
defaultAccount false boolean Retrieve your default account

 

Body

n/a

Sample JSON Response

[
    {
        "masterAccountId": "100123",
        "masterAccountName:": "ABC Holding Company",
        "accountId": "0011A00001AaAB1ABC",
        "accountName": "ABC Company",
        "status": "Active"
    }
]

 

Payload Description

Field Name Type Description
masterAccountId string(32) Account identifier of the global ultimate account.
masterAccountName string(32) Account name of the global ultimate account.
accountId string(32) Account identifier of the legal entity account.
accountName string(32) Account name of the legal entity account.
status string(enum) Account status of the legal entity account.

values: [Active, Suspended]

 

 

There can be one or more sites under a legal entity. Each site can have one or more locations. We recommend you recursively pull all sites under a legal entity and all locations under a site. The data should be saved locally for optimal performance.

 

Response Codes

Text (formatted, long)

Please check the Response Codes overview in case of any issues.


Need Help?

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

globe