Datadog End Points

Summary

These end points are used to manage Datadog integration within Cloudability that support the creation, updation and deletion of Datadog credentials within Cloudability. .

The Credential Object

  • orgLabel (string) - organization label endpoint
  • apiKey (string) - the api key
  • applicationKey (string) - the application key
  • rateLimit (string) - the api key limit
  • endpoint (object) - account region endpoint
  • datadogPublicId (string) - the publicId created after the datadog account is credentialized, it is used to prevent duplicates. Generated by Cloudability.
  • apiKeyLast4 (string) - the last 4 digit of the apiKey
  • applicationKeyLast4 (string) - the last 4 digit of the application Key
  • state (string) - examples "unverified", "verified", "error"
  • applicationKeyDetails (string) - contains the below details:
    • owner (string) - details of application key owner
    • name(string) - name of application key
  • apiKeyDetails (string) - contains the below details:
    • name (string) - details of api key creator
    • created(string) - date timestamp corresponding to api key creation
    • created_by(string) - email id of creator
  • hostTotals (string) - contains the below details:
    • total_up (string) - total host up
    • total_active (string) - total host active
  • reporting(list of string): "Cost", "Utilization"
  • isParentAccount(boolean): flag to determine if an account is parent

End Points

end point : /v3/datadog/credentials for RESTful CRUD interactions

end point : /v3/datadog/credentials

end point : /v3/datadog/credentials/<publicKeyID>

end point : /v3/vendors/ datadog /accounts/<publicKeyID>/verify

List Accounts This API is used for listing Datadog accounts

Example Request

curl 'https://api.cloudability.com/v3/datadog/credentials' \\ 
 -u ‘[auth_token]:’                

Example Response

{ 
"result": [ 
{ 
"datadogPublicId": "a111aa11-11a1-1a1a-a1aa-1aa111aaa11a", 
"orgLabel": "Cloudability", 
"apiKeyLast4": "1111", 
"applicationKeyLast4": "3333", 
"rateLimit": 300, 
"state": "VERIFIED", 
"endpoint": "datadoghq.com", 
"applicationKeyDetails": { 
"owner": "emailid@email.com", 
"name": "new key" 
}, 
"apiKeyDetails": { 
"created_by": "emailid@email.com", 
"name": "default-auto-generated", 
"created": "2020-03-20 19:56:38" 
}, 
"hostTotals": { 
"total_up": 0, 
"total_active": 0 
}, 
"reporting": [ 
"Utilization" 
], 
"isParentAccount": false 
} 
] 
}  

Create Account - This API is used for creating a new Datadog credential

POST /v3/datadog/credentials

Example Request

curl -X POST --location 'https://api.cloudability.com/v3/datadog/credentials' \ 
         --header 'Content-Type: application/json' \   
         --data '{ 
    "orgLabel": "org-label", 
    "apiKey": "apikeya111aa11-11a1-1a1a-a1aa-1aa111aaa11a", 
    "applicationKey": "applicationkeyaa111aa11-11a1-1a1a-a1aa-1aa111aaa11a", 
    "rateLimit": 600, 
    "endpoint": "datadoghq.com", 
    "reporting": [ 
        "Cost", 
        "Utilization" 
    ], 
    "subscriptionModel": "Marketplace", 
    "dependentCSP": "AZURE" 
}'  

Example Response

{ 
    "result": { 
        "datadogPublicId": "aa111aa11-11a1-1a1a-a1aa-1aa111aaa11a", 
        "orgLabel": "org-label", 
        "apiKeyLast4": "a11a", 
        "applicationKeyLast4": "a11a", 
        "rateLimit": 600, 
        "state": "ERROR", 
        "endpoint": "datadoghq.com", 
        "applicationKeyDetails": {}, 
        "apiKeyDetails": { 
            "name": "Not Set" 
        }, 
        "hostTotals": { 
            "total_up": 0, 
            "total_active": 0 
        }, 
        "reporting": [ 
            "Cost", 
            "Utilization" 
        ], 
        "subscriptionModel": "Marketplace", 
        "dependentCSP": "AZURE", 
        "isParentAccount": false 
    } 
} 

Update Account - This API is used for updating the credential with the given ID

PUT v3/datadog/credentials/:publicKeyId

Example Request

curl --location --request PUT 'https://api.cloudability.com/v3/datadog/credentials/:publicKeyId' \ 
         --header 'Content-Type: application/json' \ 
         --data '{ 
    "orgLabel": "org-label", 
    "apiKey": "apikeyaa111aa11-11a1-1a1a-a1aa-1aa111aaa11a", 
    "applicationKey": "applicationkeyaa111aa11-11a1-1a1a-a1aa-1aa111aaa11a", 
    "rateLimit": 600, 
    "endpoint": "datadoghq.com", 
    "reporting": [ 
        "Cost", 
        "Utilization" 
    ], 
    "subscriptionModel": "Marketplace", 
    "dependentCSP": "AZURE" 
}’ 

Example Response

{ 
    "result": { 
        "datadogPublicId": "a111aa11-11a1-1a1a-a1aa-1aa111aaa11a", 
        "orgLabel": "org-label", 
        "apiKeyLast4": "a11a", 
        "applicationKeyLast4": "a11a", 
        "rateLimit": 600, 
        "state": "ERROR", 
        "endpoint": "datadoghq.com", 
        "applicationKeyDetails": {}, 
        "apiKeyDetails": { 
            "name": "Not Set" 
        }, 
        "hostTotals": { 
            "total_up": 0, 
            "total_active": 0 
        }, 
        "reporting": [ 
            "Cost", 
            "Utilization" 
        ], 
        "subscriptionModel": "Marketplace", 
        "dependentCSP": "AZURE", 
        "isParentAccount": false 
    } 
} 

Retrieve Account - This API is used for retrieving the Datadog credential information.

GET v3/datadog/:publicKeyId

Example Request

curl --location 'https://api.cloudability.com/v3/datadog/:publicKeyId' 

Example Response

{ 
    "result": { 
        "datadogPublicId": "a111aa11-11a1-1a1a-a1aa-1aa111aaa11a", 
        "orgLabel": "org-label", 
        "apiKeyLast4": "a11a", 
        "applicationKeyLast4": "a11a", 
        "rateLimit": 600, 
        "state": "ERROR", 
        "endpoint": "datadoghq.com", 
        "applicationKeyDetails": {}, 
        "apiKeyDetails": { 
            "name": "Not Set" 
        }, 
        "hostTotals": { 
            "total_up": 0, 
            "total_active": 0 
        }, 
        "reporting": [ 
            "Cost", 
            "Utilization" 
        ], 
        "subscriptionModel": "Marketplace", 
        "dependentCSP": "AZURE", 
        "isParentAccount": false 
    } 
} 

Delete Account - This API is used for deleting the credential with the given ID.

DELETE v3/internal/datadog/credentials/:publicKeyId

Example Request

curl -X DELETE 'https://api.cloudability.com/v3/datadog/credentials/:publicKeyId’ 

-u ‘[auth_token]:’   

Verify Account - This API is used for verifying the credential with the given ID.

POST v3/internal/datadog/credentials/:publicKeyId/verify

Example Request

curl --X POST 
'https://api.cloudability.com/v3/datadog/credentials/:publicKeyId/verify 
-u ‘[auth_token]:’ 

Example Response

{
         "result": {
         "datadogPublicId": "a111aa11-11a1-1a1a-a1aa-1aa111aaa11a",
         "orgLabel": "test",
         "apiKeyLast4": "a11a",
         "applicationKeyLast4": "a11a",
         "rateLimit": 600,
         "state": "ERROR",
         "endpoint": "datadoghq.com",
         "applicationKeyDetails": {},
         "apiKeyDetails": {
         "name": "Not Set"
         },
         "hostTotals": {
         "total_up": 0,
          "total_active": 0
         }
     }
}