Cette page n'est pas encore disponible en français, sa traduction est en cours.
Si vous avez des questions ou des retours sur notre projet de traduction actuel,
n'hésitez pas à nous contacter.
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 AccessDomain 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
Field | Type | Description |
---|
data | object | Domain Allowlist email data |
data.type | enum | Domain Allowlist type. Allowed enum values: domain_allowlist . Default: domain_allowlist . |
data.attributes | object | Attributes of Domain Allowlist |
data.attributes.enabled | Boolean | If true , Domain Allowlist is enabled |
data.attributes.domains | [string] | List of domains in Domain Allowlist |
Forbidden
Model
Field | Type | Description |
---|
errors [required] | [string] | List of errors |
Not Found
Model
Field | Type | Description |
---|
errors [required] | [string] | List of errors |
Too many requests
Model
Field | Type | Description |
---|
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
Field | Type | Description |
---|
data | object | Domain Allowlist email data |
data.type | enum | Domain Allowlist type. Allowed enum values: domain_allowlist . Default: domain_allowlist . |
data.attributes | object | Attributes of Domain Allowlist |
data.attributes.enabled | Boolean | If true , Domain Allowlist is enabled |
data.attributes.domains | [string] | List of domains in Domain Allowlist |
Forbidden
Model
Field | Type | Description |
---|
errors [required] | [string] | List of errors |
Not Found
Model
Field | Type | Description |
---|
errors [required] | [string] | List of errors |
Too many requests
Model
Field | Type | Description |
---|
errors [required] | [string] | List of errors |
Example
{
"data": {
"type": "domain_allowlist",
"attributes": {
"enabled": true,
"domains": [
"@datadoghq.com",
"@yahoo.com",
"@gmail.com"
]
}
}
}
Further Reading
Documentation, liens et articles supplémentaires utiles: