인시던트 Google Chat 구성 생성
https://api.datadoghq.com/api/v2/incidents/config/google-chat-configurationshttps://api.us3.datadoghq.com/api/v2/incidents/config/google-chat-configurationshttps://api.us5.datadoghq.com/api/v2/incidents/config/google-chat-configurationshttps://api.datadoghq.eu/api/v2/incidents/config/google-chat-configurationshttps://api.ap1.datadoghq.com/api/v2/incidents/config/google-chat-configurationshttps://api.ap2.datadoghq.com/api/v2/incidents/config/google-chat-configurationshttps://api.uk1.datadoghq.com/api/v2/incidents/config/google-chat-configurationshttps://api.ddog-gov.com/api/v2/incidents/config/google-chat-configurationshttps://api.us2.ddog-gov.com/api/v2/incidents/config/google-chat-configurations개요
인시던트에 대한 Google Chat 구성을 생성합니다.
OAuth apps require the incident_settings_write authorization scope to access this endpoint.
요청
Body Data (required)
Google Chat 구성 페이로드입니다.
data [required]Google Chat 구성 생성을 위한 요청 페이로드입니다.
attributes [required]Attributes for creating a Google Chat configuration.
domain_id [required]The Google Chat domain ID.
space_name_template [required]The template for the Google Chat space name.
space_target_audience_id [required]The target audience ID for the Google Chat space.
space_time_zone [required]The time zone for the Google Chat space.
relationships [required]Relationships for a Google Chat configuration create request.
incident_type [required]Relationship to an incident type.
data [required]Relationship to incident type object.
id [required]The incident type's ID.
type [required]Incident type resource type.
incident_typesincident_typestype [required]Google Chat configuration resource type.
google_chat_configurations{
"data": {
"attributes": {
"domain_id": "my-domain",
"space_name_template": "{{incident.title}}",
"space_target_audience_id": "123456789",
"space_time_zone": "America/New_York"
},
"relationships": {
"incident_type": {
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"type": "incident_types"
}
}
},
"type": "google_chat_configurations"
}
}응답
Created
Response with a Google Chat configuration.
data [required]Google Chat configuration data in a response.
attributes [required]Attributes of a Google Chat configuration.
created_at [required]Timestamp when the configuration was created.
domain_id [required]The Google Chat domain ID.
modified_at [required]Timestamp when the configuration was last modified.
space_name_template [required]The template for the Google Chat space name.
space_target_audience_id [required]The target audience ID for the Google Chat space.
space_time_zone [required]The time zone for the Google Chat space.
id [required]The configuration identifier.
relationshipsRelationships for a Google Chat configuration.
created_by_userRelationship to user.
data [required]Relationship to user object.
id [required]A unique identifier that represents the user.
type [required]Users resource type.
usersusersincident_typeRelationship to an incident type.
data [required]Relationship to incident type object.
id [required]The incident type's ID.
type [required]Incident type resource type.
incident_typesincident_typeslast_modified_by_userRelationship to user.
data [required]Relationship to user object.
id [required]A unique identifier that represents the user.
type [required]Users resource type.
usersuserstype [required]Google Chat configuration resource type.
google_chat_configurationsincludedIncluded related resources.
attributesAttributes of user object returned by the API.
emailEmail of the user.
handleHandle of the user.
iconURL of the user's icon.
nameName of the user.
uuidUUID of the user.
idID of the user.
typeUsers resource type.
usersusers{
"data": {
"attributes": {
"created_at": "2024-01-01T00:00:00.000Z",
"domain_id": "my-domain",
"modified_at": "2024-01-01T00:00:00.000Z",
"space_name_template": "{{incident.title}}",
"space_target_audience_id": "123456789",
"space_time_zone": "America/New_York"
},
"id": "00000000-0000-0000-0000-000000000000",
"relationships": {
"created_by_user": {
"data": {
"id": "00000000-0000-0000-2345-000000000000",
"type": "users"
}
},
"incident_type": {
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"type": "incident_types"
}
},
"last_modified_by_user": {
"data": {
"id": "00000000-0000-0000-2345-000000000000",
"type": "users"
}
}
},
"type": "google_chat_configurations"
},
"included": [
{
"attributes": {
"email": "string",
"handle": "string",
"icon": "string",
"name": "string",
"uuid": "string"
},
"id": "string",
"type": "users"
}
]
}Bad Request
API error response.
errors [required]A list of errors.
{
"errors": [
"Bad Request"
]
}Unauthorized
API error response.
errors [required]A list of errors.
{
"errors": [
"Bad Request"
]
}Forbidden
API error response.
errors [required]A list of errors.
{
"errors": [
"Bad Request"
]
}Too many requests
API error response.
errors [required]A list of errors.
{
"errors": [
"Bad Request"
]
}코드 예시
# Set your Datadog site and credentials
export DD_SITE="datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/incidents/config/google-chat-configurations" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"attributes": {
"domain_id": "my-domain",
"space_name_template": "{{incident.title}}",
"space_target_audience_id": "123456789",
"space_time_zone": "America/New_York"
},
"relationships": {
"incident_type": {
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"type": "incident_types"
}
}
},
"type": "google_chat_configurations"
}
}
EOF# Set your Datadog site and credentials
export DD_SITE="us3.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/incidents/config/google-chat-configurations" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"attributes": {
"domain_id": "my-domain",
"space_name_template": "{{incident.title}}",
"space_target_audience_id": "123456789",
"space_time_zone": "America/New_York"
},
"relationships": {
"incident_type": {
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"type": "incident_types"
}
}
},
"type": "google_chat_configurations"
}
}
EOF# Set your Datadog site and credentials
export DD_SITE="us5.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/incidents/config/google-chat-configurations" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"attributes": {
"domain_id": "my-domain",
"space_name_template": "{{incident.title}}",
"space_target_audience_id": "123456789",
"space_time_zone": "America/New_York"
},
"relationships": {
"incident_type": {
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"type": "incident_types"
}
}
},
"type": "google_chat_configurations"
}
}
EOF# Set your Datadog site and credentials
export DD_SITE="datadoghq.eu"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/incidents/config/google-chat-configurations" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"attributes": {
"domain_id": "my-domain",
"space_name_template": "{{incident.title}}",
"space_target_audience_id": "123456789",
"space_time_zone": "America/New_York"
},
"relationships": {
"incident_type": {
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"type": "incident_types"
}
}
},
"type": "google_chat_configurations"
}
}
EOF# Set your Datadog site and credentials
export DD_SITE="ap1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/incidents/config/google-chat-configurations" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"attributes": {
"domain_id": "my-domain",
"space_name_template": "{{incident.title}}",
"space_target_audience_id": "123456789",
"space_time_zone": "America/New_York"
},
"relationships": {
"incident_type": {
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"type": "incident_types"
}
}
},
"type": "google_chat_configurations"
}
}
EOF# Set your Datadog site and credentials
export DD_SITE="ap2.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/incidents/config/google-chat-configurations" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"attributes": {
"domain_id": "my-domain",
"space_name_template": "{{incident.title}}",
"space_target_audience_id": "123456789",
"space_time_zone": "America/New_York"
},
"relationships": {
"incident_type": {
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"type": "incident_types"
}
}
},
"type": "google_chat_configurations"
}
}
EOF# Set your Datadog site and credentials
export DD_SITE="uk1.datadoghq.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/incidents/config/google-chat-configurations" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"attributes": {
"domain_id": "my-domain",
"space_name_template": "{{incident.title}}",
"space_target_audience_id": "123456789",
"space_time_zone": "America/New_York"
},
"relationships": {
"incident_type": {
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"type": "incident_types"
}
}
},
"type": "google_chat_configurations"
}
}
EOF# Set your Datadog site and credentials
export DD_SITE="ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/incidents/config/google-chat-configurations" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"attributes": {
"domain_id": "my-domain",
"space_name_template": "{{incident.title}}",
"space_target_audience_id": "123456789",
"space_time_zone": "America/New_York"
},
"relationships": {
"incident_type": {
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"type": "incident_types"
}
}
},
"type": "google_chat_configurations"
}
}
EOF# Set your Datadog site and credentials
export DD_SITE="us2.ddog-gov.com"
# Use a Personal Access Token or Service Access Token
export DD_BEARER_TOKEN="<PERSONAL_ACCESS_TOKEN OR SERVICE_ACCESS_TOKEN>"
curl -X POST "https://api.${DD_SITE}/api/v2/incidents/config/google-chat-configurations" \
-H "Accept: application/json" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DD_BEARER_TOKEN}" \
-d @- << EOF
{
"data": {
"attributes": {
"domain_id": "my-domain",
"space_name_template": "{{incident.title}}",
"space_target_audience_id": "123456789",
"space_time_zone": "America/New_York"
},
"relationships": {
"incident_type": {
"data": {
"id": "00000000-0000-0000-0000-000000000000",
"type": "incident_types"
}
}
},
"type": "google_chat_configurations"
}
}
EOF