Domain Allowlist API

このページは日本語には対応しておりません。随時翻訳に取り組んでいます。翻訳に関してご質問やご意見ございましたら、お気軽にご連絡ください。
Join the Beta!

Domain Allowlist is available in private beta for customers with Enterprise plans. If you're interested in this feature, complete the form to request access.

Request Access

Domain Allowlist enables you to restrict the email domains to which notifications can be sent.

This document describes how to access and configure Domain Allowlist through the API. To use the UI instead, see Domain Allowlist.

Get Domain Allowlist

Return the Domain Allowlist and its enabled or disabled state.

GET https://api.datadoghq.com/api/v2/domain_allowlist

Request

Example

curl -X GET "https://api.datadoghq.com/api/v2/domain_allowlist" \
-H "Accept: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}"

Response

OK

Model

FieldTypeDescription
dataobjectDomain Allowlist email data
data.typeenumDomain Allowlist type. Allowed enum values: domain_allowlist. Default: domain_allowlist.
data.attributesobjectAttributes of Domain Allowlist
data.attributes.enabledBooleanIf true, Domain Allowlist is enabled
data.attributes.domains[string]List of domains in Domain Allowlist

Forbidden

Model

FieldTypeDescription
errors [required][string]List of errors

Not Found

Model

FieldTypeDescription
errors [required][string]List of errors

Too many requests

Model

FieldTypeDescription
errors [required][string]List of errors

Example

{
  "data": {
    "type": "domain_allowlist",
    "attributes": {
      "enabled": true,
      "domains": [
        "@aol.com",
        "@yahoo.com",
        "@gmail.com"
      ]
    }
  }
}

Modify Domain Allowlist

Enable/disable Domain Allowlist and rewrite the entire allowlist with a given list of email domains.

PATCH https://api.datadoghq.com/api/v2/domain_allowlist

Request

Example

curl -X PATCH "https://api.datadog.com/api/v2/domain_allowlist" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "DD-API-KEY: ${DD_API_KEY}" \
-H "DD-APPLICATION-KEY: ${DD_APP_KEY}" \
-d @- << EOF

{
  "data": {
    "type": "domain_allowlist",
    "attributes": {
      "enabled": true,
      "domains": [
        "@datadoghq.com",
        "@yahoo.com",
        "@gmail.com"
      ]
    }
  }
}

EOF

Response

OK

Model

FieldTypeDescription
dataobjectDomain Allowlist email data
data.typeenumDomain Allowlist type. Allowed enum values: domain_allowlist. Default: domain_allowlist.
data.attributesobjectAttributes of Domain Allowlist
data.attributes.enabledBooleanIf true, Domain Allowlist is enabled
data.attributes.domains[string]List of domains in Domain Allowlist

Forbidden

Model

FieldTypeDescription
errors [required][string]List of errors

Not Found

Model

FieldTypeDescription
errors [required][string]List of errors

Too many requests

Model

FieldTypeDescription
errors [required][string]List of errors

Example

{
  "data": {
    "type": "domain_allowlist",
    "attributes": {
      "enabled": true,
      "domains": [
        "@datadoghq.com",
        "@yahoo.com",
        "@gmail.com"
      ]
    }
  }
}

Further Reading

お役に立つドキュメント、リンクや記事: