1: Authenticate
Prerequisites
- You should have registered in our developer portal. Check this link about how to register an Account.
- 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.
- 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.
2. Get Information
Get Account Information
Master account Id and account Id need to be passed in the header for this API call. This is needed to indicate your legal entity.
Refer to the Accounts API for instructions on how to retrieve your account information. You may skip this step if you already know your master account Id and account Id.
3. Get Site Information
Get Site information
The method can be used to retrieve information that identifies the site code to the physical location of the site.
Method | GET |
---|---|
End point | /v1/sites |
Headers | Authorization, Master-Account-Id, Account-Id |
Query Parameters | n/a |
Body | n/a |
Sample Curl Request
curl --location --request GET 'https://api.digitalrealty.com/v1/sites' \
--header 'Master-Account-Id: <Master-Account-Id>' \
--header 'Account-Id: <Account-Id>' \
--header 'Authorization: Bearer <access_token>'
Headers
Field Name | Mandatory | Type | Description |
---|---|---|---|
Master-Account-Id | true | string | Customer master account identifier. |
Account-Id | true | string | Customer account identifier. |
Authorization | true | string | Token-based authentication. |
Query Parameters
n/a
Body
n/a
Sample JSON Response
[
{
"site": "DFW010",
"address": "1234 Street",
"city": "Dallas",
"metro": "Dallas",
"country": "United States"
}
]
Payload Description
Field Name | Type | Description |
---|---|---|
site | string(6) | Six digit alphanumeric geocode used by DLR to designate its data centers globally. |
address | string(255) | Street name and number of the location of the data center. |
city | string(50) | Name of city. |
metro | string(50) | Name of metropolitan area. |
country | string(50) | Name of country. |
4. Get Global Site Information
The method can be used to retrieve information that identifies the site code to the physical location of the global site.
Method | GET |
---|---|
End point | /v1/global-sites |
Headers | Authorization, Master-Account-Id |
Query Parameters | site,city,country,metro,address |
Body | n/a |
Sample Curl Request
curl --location --request GET 'https://api.digitalrealty.com/v1/global-sites' \
--header 'Master-Account-Id: <Master-Account-Id>' \
--header 'Authorization: Bearer <access_token>' \
Headers
Field Name | Mandatory | Type | Description |
---|---|---|---|
Master-Account-Id | true | string | Customer master account identifier. |
Authorization | true | string | Token-based authentication. |
Query Parameters
Field Name | Mandatory | Type | Description |
---|---|---|---|
site | false | string(6) | Six digit alphanumeric geocode used by DLR to designate its data centers globally. |
city | false | string(50) | Name of city. |
country | false | string(50) | Name of country. |
metro | false | string(50) | Name of metropolitan area. |
address | false | string(255) | Street name and number of the location of the data center. |
The value for query parameters city, metro, country and address above can be entered as an entire value or a part of the value, such that value is used as a wildcard search LIKE *value*.
Example: ?city=in matches values: Dublin, Woking, Chessington.
Body
n/a
Sample JSON Response
{
"content": [
{
"country": "United States",
"accountId": "b1bc8f2c138afa00a501b7a66144b0c1",
"site": "DFW029",
"address": "950 E Collins Boulevard",
"city": "Richardson",
"accountName": "abc Corporation",
"metro": "Dallas",
"masterAccountName": "abc Corporation",
"masterAccountId": "b1bc8f2c138afa00a501b7a66144b0c1"
}
],
"pageable": {
"last": true,
"totalPages": 1,
"totalElements": 1,
"size": 25,
"number": 0,
"first": true,
"numberOfElements": 1,
"empty": false
}
}
Payload Description
Field Name | Type | Description |
---|---|---|
country | string(50) | Name of country. |
accountId | string(32) | Account identifier of the legal entity account. |
site | string(6) | Six digit alphanumeric geocode used by DLR to designate its data centers globally. |
address | string(255) | Street name and number of the location of the data center. |
city | string(50) | Name of city. |
masterAccountName | string(32) | Account name of the global ultimate account. |
metro | string(50) | Name of metropolitan area. |
accountName | string(32) | Account name of the legal entity account. |
masterAccountId | string(32) | Account identifier of the global ultimate account. |