Datadog End Points

Summary

These end point 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
  • hostTotals (string) - contains the below details:
  • total_up (string) - total host up
  • total_active (string) - total host active

End Points

POST v3/datadog/credentials

This API is used for creating a new Datadog credential

Example Request

curl --location 'https://api.cloudability.com/v3/internal/datadog/credentials' \
         --header 'Content-Type: application/json' \  
         --data '{
                  "orgLabel": "us5-test-region",
                  "apiKey": "5ac8",
                  "applicationKey": "edde", 
                  "rateLimit": 600,
                  "endpoint": "us5.datadoghq.com" 
                  }'               

Example Response

{
          "result": {
          "datadogPublicId": "bff5a035-4e31-11ee-94bf-3e124ec6df89",
          "orgLabel": "test",
          "apiKeyLast4": "7654", 
          "applicationKeyLast4": "7654",
          "rateLimit": 600, 
          "state": "ERROR",
          "endpoint": "datadoghq.com",
          "applicationKeyDetails": {},
          "apiKeyDetails": {
          "name": "Not Set"
          },
          "hostTotals": {
          "total_up": 0,
          "total_active": 0
          }
          }
          }
          }

PUT v3/internal/datadog/credentials/:publicKeyId

This API is used for updating the credential with the given ID

Example Request

curl --location --request PUT 'https://api.cloudability.com/v3/internal/datadog/credentials/:publicKeyId' \
         --header 'Content-Type: application/json' \
         --data '{
                  "orgLabel": "test",
                  "apiKey": "5ac8",
                  "applicationKey": "edde",
                  "rateLimit": 600,
                  "endpoint": "datadoghq.com" 
                  }'
		     }'

Example Response

{
         "result": {
         "datadogPublicId": "bff5a035-4e31-11ee-94bf-3e124ec6df89",
         "orgLabel": "test",
         "apiKeyLast4": "7654",
         "applicationKeyLast4": "7654",
         "rateLimit": 600,
         "state": "ERROR",
         "endpoint": "datadoghq.com",
         "applicationKeyDetails": {},
         "apiKeyDetails": {
         "name": "Not Set"
         },
         "hostTotals": {
         "total_up": 0,
         "total_active": 0
         }
         }
         }

GET v3/internal/datadog/credentials

This API is used for returning all Datadog credentials for the given org.

Example Request

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

Example Response

{
"result": [
{
"datadogPublicId": "e753683f-67fb-11ee-ba5c-daae1738c842",
"orgLabel": "us5-test-region",
"apiKeyLast4": "5ac8",
"applicationKeyLast4": "edde",
"rateLimit": 600,
"state": "VERIFIED",
"endpoint": "us5.datadoghq.com",
"applicationKeyDetails": {
"owner": "sharsoor@apptio.com",
"name": "Azure Integrations - Datadog Managed - sharsoor@apptio.com"
},
"apiKeyDetails": {
"name": "API Key created by sharsoor@apptio.com on 2023-10-05",
"created": "2023-10-05 08:31:50"
},
"hostTotals": {
"total_up": 0,
"total_active": 0
}
},
{
"datadogPublicId": "6865ea2c-67fd-11ee-b9e3-424498f49050",
"orgLabel": "us3-test-region",
"apiKeyLast4": "d5a2",
"applicationKeyLast4": "e2ff",
"rateLimit": 600,
"state": "VERIFIED",
"endpoint": "us3.datadoghq.com",
"applicationKeyDetails": {
"owner": "sharsoor@apptio.com",
"name": "Azure Integrations - Datadog Managed - sharsoor@apptio.com"
},
"apiKeyDetails": {
"name": "API Key created by sharsoor@apptio.com on 2023-10-11",
"created": "2023-10-11 06:11:09"
},
"hostTotals": {
"total_up": 0,
"total_active": 0
}
},
{
"datadogPublicId": "da4fa990-67fd-11ee-ad5b-32e142d63d65",
"orgLabel": "ap1-test-region",
"apiKeyLast4": "3e05",
"applicationKeyLast4": "296f",
"rateLimit": 600,
"state": "VERIFIED",
"endpoint": "ap1.datadoghq.com",
"applicationKeyDetails": {
"owner": "sharsoor@apptio.com",
"name": "new app key"
},
"apiKeyDetails": {
"name": "API Key created by sharsoor@apptio.com on 2023-10-11",
"created": "2023-10-11 06:15:03"
},
"hostTotals": {
"total_up": 0,
"total_active": 0
}
}
]
}

GET v3/internal/datadog/:publicKeyId

This API is used for retrieving the Datadog credential information.

Example Request

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

Example Response

{
"result": {
"datadogPublicId": "e753683f-67fb-11ee-ba5c-daae1738c842",
"orgLabel": "us5-test-region",
"apiKeyLast4": "5ac8",
"applicationKeyLast4": "edde",
"rateLimit": 600,
"state": "VERIFIED",
"endpoint": "us5.datadoghq.com",
"applicationKeyDetails": {
"owner": "sharsoor@apptio.com",
"name": "Azure Integrations - Datadog Managed - sharsoor@apptio.com"
},
"apiKeyDetails": {
"name": "API Key created by sharsoor@apptio.com on 2023-10-05",
"created": "2023-10-05 08:31:50"
},
"hostTotals": {
"total_up": 0,
"total_active": 0
}
}
}

DELETE v3/internal/datadog/credentials/:publicKeyId

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

Example Request

curl --location --request DELETE 'https://api.cloudability.com/v3/internal/datadog/credentials/:publicKeyId'

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

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

Example Request

curl --location --request POST 'https://api.cloudability.com/v3/internal/datadog/credentials/:publicKeyId/verify'

Example Response

{
         "result": {
         "datadogPublicId": "bff5a035-4e31-11ee-94bf-3e124ec6df89",
         "orgLabel": "test",
         "apiKeyLast4": "7654",
         "applicationKeyLast4": "7654",
         "rateLimit": 600,
         "state": "ERROR",
         "endpoint": "datadoghq.com",
         "applicationKeyDetails": {},
         "apiKeyDetails": {
         "name": "Not Set"
         },
         "hostTotals": {
         "total_up": 0,
          "total_active": 0
         }
         }
         }