- 필수 기능
- 시작하기
- Glossary
- 표준 속성
- Guides
- Agent
- 통합
- 개방형텔레메트리
- 개발자
- Administrator's Guide
- API
- Datadog Mobile App
- CoScreen
- Cloudcraft
- 앱 내
- 서비스 관리
- 인프라스트럭처
- 애플리케이션 성능
- APM
- Continuous Profiler
- 스팬 시각화
- 데이터 스트림 모니터링
- 데이터 작업 모니터링
- 디지털 경험
- 소프트웨어 제공
- 보안
- AI Observability
- 로그 관리
- 관리
The Incident Teams endpoints are deprecated. See the Teams API endpoints to create, update, delete, and retrieve teams which can be associated with incidents.
Note: This endpoint is deprecated. See the Teams API endpoints.
GET https://api.ap1.datadoghq.com/api/v2/teams/{team_id}https://api.datadoghq.eu/api/v2/teams/{team_id}https://api.ddog-gov.com/api/v2/teams/{team_id}https://api.datadoghq.com/api/v2/teams/{team_id}https://api.us3.datadoghq.com/api/v2/teams/{team_id}https://api.us5.datadoghq.com/api/v2/teams/{team_id}
Get details of an incident team. If the include[users]
query parameter is provided,
the included attribute will contain the users related to these incident teams.
This endpoint requires the incident_read
permission.
OAuth apps require the incident_read
authorization scope to access this endpoint.
이름
유형
설명
team_id [required]
string
The ID of the incident team.
이름
유형
설명
include
enum
Specifies which types of related objects should be included in the response.
Allowed enum values: users, attachments
OK
Response with an incident team payload.
항목
유형
설명
data [required]
object
Incident Team data from a response.
attributes
object
The incident team's attributes from a response.
created
date-time
Timestamp of when the incident team was created.
modified
date-time
Timestamp of when the incident team was modified.
name
string
Name of the incident team.
id
string
The incident team's ID.
relationships
object
The incident team's relationships.
created_by
object
Relationship to user.
data [required]
object
Relationship to user object.
id [required]
string
A unique identifier that represents the user.
type [required]
enum
Users resource type.
Allowed enum values: users
default: users
last_modified_by
object
Relationship to user.
data [required]
object
Relationship to user object.
id [required]
string
A unique identifier that represents the user.
type [required]
enum
Users resource type.
Allowed enum values: users
default: users
type
enum
Incident Team resource type.
Allowed enum values: teams
default: teams
included
[ <oneOf>]
Included objects from relationships.
Option 1
object
User object returned by the API.
attributes
object
Attributes of user object returned by the API.
created_at
date-time
Creation time of the user.
disabled
boolean
Whether the user is disabled.
string
Email of the user.
handle
string
Handle of the user.
icon
string
URL of the user's icon.
mfa_enabled
boolean
If user has MFA enabled.
modified_at
date-time
Time that the user was last modified.
name
string
Name of the user.
service_account
boolean
Whether the user is a service account.
status
string
Status of the user.
title
string
Title of the user.
verified
boolean
Whether the user is verified.
id
string
ID of the user.
relationships
object
Relationships of the user object returned by the API.
org
object
Relationship to an organization.
data [required]
object
Relationship to organization object.
id [required]
string
ID of the organization.
type [required]
enum
Organizations resource type.
Allowed enum values: orgs
default: orgs
other_orgs
object
Relationship to organizations.
data [required]
[object]
Relationships to organization objects.
id [required]
string
ID of the organization.
type [required]
enum
Organizations resource type.
Allowed enum values: orgs
default: orgs
other_users
object
Relationship to users.
data [required]
[object]
Relationships to user objects.
id [required]
string
A unique identifier that represents the user.
type [required]
enum
Users resource type.
Allowed enum values: users
default: users
roles
object
Relationship to roles.
data
[object]
An array containing type and the unique identifier of a role.
id
string
The unique identifier of the role.
type
enum
Roles type.
Allowed enum values: roles
default: roles
type
enum
Users resource type.
Allowed enum values: users
default: users
{
"data": {
"attributes": {
"created": "2019-09-19T10:00:00.000Z",
"modified": "2019-09-19T10:00:00.000Z",
"name": "team name"
},
"id": "00000000-7ea3-0000-000a-000000000000",
"relationships": {
"created_by": {
"data": {
"id": "00000000-0000-0000-2345-000000000000",
"type": "users"
}
},
"last_modified_by": {
"data": {
"id": "00000000-0000-0000-2345-000000000000",
"type": "users"
}
}
},
"type": "teams"
},
"included": [
{
"attributes": {
"created_at": "2019-09-19T10:00:00.000Z",
"disabled": false,
"email": "string",
"handle": "string",
"icon": "string",
"mfa_enabled": false,
"modified_at": "2019-09-19T10:00:00.000Z",
"name": "string",
"service_account": false,
"status": "string",
"title": "string",
"verified": false
},
"id": "string",
"relationships": {
"org": {
"data": {
"id": "00000000-0000-beef-0000-000000000000",
"type": "orgs"
}
},
"other_orgs": {
"data": [
{
"id": "00000000-0000-beef-0000-000000000000",
"type": "orgs"
}
]
},
"other_users": {
"data": [
{
"id": "00000000-0000-0000-2345-000000000000",
"type": "users"
}
]
},
"roles": {
"data": [
{
"id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d",
"type": "roles"
}
]
}
},
"type": "users"
}
]
}
Bad Request
API error response.
{
"errors": [
"Bad Request"
]
}
Unauthorized
API error response.
{
"errors": [
"Bad Request"
]
}
Forbidden
API error response.
{
"errors": [
"Bad Request"
]
}
Not Found
API error response.
{
"errors": [
"Bad Request"
]
}
Too many requests
API error response.
{
"errors": [
"Bad Request"
]
}
// Get details of an incident team returns "OK" response
import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.IncidentTeamsApi;
import com.datadog.api.client.v2.model.IncidentTeamResponse;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setUnstableOperationEnabled("v2.getIncidentTeam", true);
IncidentTeamsApi apiInstance = new IncidentTeamsApi(defaultClient);
// there is a valid "team" in the system
String TEAM_DATA_ID = System.getenv("TEAM_DATA_ID");
try {
IncidentTeamResponse result = apiInstance.getIncidentTeam(TEAM_DATA_ID);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling IncidentTeamsApi#getIncidentTeam");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
First install the library and its dependencies and then save the example to Example.java
and run following commands:
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
Note: This endpoint is deprecated. See the Teams API endpoints.
DELETE https://api.ap1.datadoghq.com/api/v2/teams/{team_id}https://api.datadoghq.eu/api/v2/teams/{team_id}https://api.ddog-gov.com/api/v2/teams/{team_id}https://api.datadoghq.com/api/v2/teams/{team_id}https://api.us3.datadoghq.com/api/v2/teams/{team_id}https://api.us5.datadoghq.com/api/v2/teams/{team_id}
Deletes an existing incident team.
This endpoint requires the incident_settings_write
permission.
OAuth apps require the incident_settings_write
authorization scope to access this endpoint.
이름
유형
설명
team_id [required]
string
The ID of the incident team.
OK
Bad Request
API error response.
{
"errors": [
"Bad Request"
]
}
Unauthorized
API error response.
{
"errors": [
"Bad Request"
]
}
Forbidden
API error response.
{
"errors": [
"Bad Request"
]
}
Not Found
API error response.
{
"errors": [
"Bad Request"
]
}
Too many requests
API error response.
{
"errors": [
"Bad Request"
]
}
// Delete an existing incident team returns "OK" response
import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.IncidentTeamsApi;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setUnstableOperationEnabled("v2.deleteIncidentTeam", true);
IncidentTeamsApi apiInstance = new IncidentTeamsApi(defaultClient);
// there is a valid "team" in the system
String TEAM_DATA_ID = System.getenv("TEAM_DATA_ID");
try {
apiInstance.deleteIncidentTeam(TEAM_DATA_ID);
} catch (ApiException e) {
System.err.println("Exception when calling IncidentTeamsApi#deleteIncidentTeam");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
First install the library and its dependencies and then save the example to Example.java
and run following commands:
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
Note: This endpoint is deprecated. See the Teams API endpoints.
PATCH https://api.ap1.datadoghq.com/api/v2/teams/{team_id}https://api.datadoghq.eu/api/v2/teams/{team_id}https://api.ddog-gov.com/api/v2/teams/{team_id}https://api.datadoghq.com/api/v2/teams/{team_id}https://api.us3.datadoghq.com/api/v2/teams/{team_id}https://api.us5.datadoghq.com/api/v2/teams/{team_id}
Updates an existing incident team. Only provide the attributes which should be updated as this request is a partial update.
This endpoint requires the incident_settings_write
permission.
OAuth apps require the incident_settings_write
authorization scope to access this endpoint.
이름
유형
설명
team_id [required]
string
The ID of the incident team.
Incident Team Payload.
항목
유형
설명
data [required]
object
Incident Team data for an update request.
attributes
object
The incident team's attributes for an update request.
name [required]
string
Name of the incident team.
id
string
The incident team's ID.
relationships
object
The incident team's relationships.
created_by
object
Relationship to user.
data [required]
object
Relationship to user object.
id [required]
string
A unique identifier that represents the user.
type [required]
enum
Users resource type.
Allowed enum values: users
default: users
last_modified_by
object
Relationship to user.
data [required]
object
Relationship to user object.
id [required]
string
A unique identifier that represents the user.
type [required]
enum
Users resource type.
Allowed enum values: users
default: users
type [required]
enum
Incident Team resource type.
Allowed enum values: teams
default: teams
{
"data": {
"type": "teams",
"attributes": {
"name": "team name-updated"
}
}
}
OK
Response with an incident team payload.
항목
유형
설명
data [required]
object
Incident Team data from a response.
attributes
object
The incident team's attributes from a response.
created
date-time
Timestamp of when the incident team was created.
modified
date-time
Timestamp of when the incident team was modified.
name
string
Name of the incident team.
id
string
The incident team's ID.
relationships
object
The incident team's relationships.
created_by
object
Relationship to user.
data [required]
object
Relationship to user object.
id [required]
string
A unique identifier that represents the user.
type [required]
enum
Users resource type.
Allowed enum values: users
default: users
last_modified_by
object
Relationship to user.
data [required]
object
Relationship to user object.
id [required]
string
A unique identifier that represents the user.
type [required]
enum
Users resource type.
Allowed enum values: users
default: users
type
enum
Incident Team resource type.
Allowed enum values: teams
default: teams
included
[ <oneOf>]
Included objects from relationships.
Option 1
object
User object returned by the API.
attributes
object
Attributes of user object returned by the API.
created_at
date-time
Creation time of the user.
disabled
boolean
Whether the user is disabled.
string
Email of the user.
handle
string
Handle of the user.
icon
string
URL of the user's icon.
mfa_enabled
boolean
If user has MFA enabled.
modified_at
date-time
Time that the user was last modified.
name
string
Name of the user.
service_account
boolean
Whether the user is a service account.
status
string
Status of the user.
title
string
Title of the user.
verified
boolean
Whether the user is verified.
id
string
ID of the user.
relationships
object
Relationships of the user object returned by the API.
org
object
Relationship to an organization.
data [required]
object
Relationship to organization object.
id [required]
string
ID of the organization.
type [required]
enum
Organizations resource type.
Allowed enum values: orgs
default: orgs
other_orgs
object
Relationship to organizations.
data [required]
[object]
Relationships to organization objects.
id [required]
string
ID of the organization.
type [required]
enum
Organizations resource type.
Allowed enum values: orgs
default: orgs
other_users
object
Relationship to users.
data [required]
[object]
Relationships to user objects.
id [required]
string
A unique identifier that represents the user.
type [required]
enum
Users resource type.
Allowed enum values: users
default: users
roles
object
Relationship to roles.
data
[object]
An array containing type and the unique identifier of a role.
id
string
The unique identifier of the role.
type
enum
Roles type.
Allowed enum values: roles
default: roles
type
enum
Users resource type.
Allowed enum values: users
default: users
{
"data": {
"attributes": {
"created": "2019-09-19T10:00:00.000Z",
"modified": "2019-09-19T10:00:00.000Z",
"name": "team name"
},
"id": "00000000-7ea3-0000-000a-000000000000",
"relationships": {
"created_by": {
"data": {
"id": "00000000-0000-0000-2345-000000000000",
"type": "users"
}
},
"last_modified_by": {
"data": {
"id": "00000000-0000-0000-2345-000000000000",
"type": "users"
}
}
},
"type": "teams"
},
"included": [
{
"attributes": {
"created_at": "2019-09-19T10:00:00.000Z",
"disabled": false,
"email": "string",
"handle": "string",
"icon": "string",
"mfa_enabled": false,
"modified_at": "2019-09-19T10:00:00.000Z",
"name": "string",
"service_account": false,
"status": "string",
"title": "string",
"verified": false
},
"id": "string",
"relationships": {
"org": {
"data": {
"id": "00000000-0000-beef-0000-000000000000",
"type": "orgs"
}
},
"other_orgs": {
"data": [
{
"id": "00000000-0000-beef-0000-000000000000",
"type": "orgs"
}
]
},
"other_users": {
"data": [
{
"id": "00000000-0000-0000-2345-000000000000",
"type": "users"
}
]
},
"roles": {
"data": [
{
"id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d",
"type": "roles"
}
]
}
},
"type": "users"
}
]
}
Bad Request
API error response.
{
"errors": [
"Bad Request"
]
}
Unauthorized
API error response.
{
"errors": [
"Bad Request"
]
}
Forbidden
API error response.
{
"errors": [
"Bad Request"
]
}
Not Found
API error response.
{
"errors": [
"Bad Request"
]
}
Too many requests
API error response.
{
"errors": [
"Bad Request"
]
}
// Update an existing incident team returns "OK" response
import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.IncidentTeamsApi;
import com.datadog.api.client.v2.model.IncidentTeamResponse;
import com.datadog.api.client.v2.model.IncidentTeamType;
import com.datadog.api.client.v2.model.IncidentTeamUpdateAttributes;
import com.datadog.api.client.v2.model.IncidentTeamUpdateData;
import com.datadog.api.client.v2.model.IncidentTeamUpdateRequest;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setUnstableOperationEnabled("v2.updateIncidentTeam", true);
IncidentTeamsApi apiInstance = new IncidentTeamsApi(defaultClient);
// there is a valid "team" in the system
String TEAM_DATA_ATTRIBUTES_NAME = System.getenv("TEAM_DATA_ATTRIBUTES_NAME");
String TEAM_DATA_ID = System.getenv("TEAM_DATA_ID");
IncidentTeamUpdateRequest body =
new IncidentTeamUpdateRequest()
.data(
new IncidentTeamUpdateData()
.type(IncidentTeamType.TEAMS)
.attributes(new IncidentTeamUpdateAttributes().name("team name-updated")));
try {
IncidentTeamResponse result = apiInstance.updateIncidentTeam(TEAM_DATA_ID, body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling IncidentTeamsApi#updateIncidentTeam");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
First install the library and its dependencies and then save the example to Example.java
and run following commands:
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
Note: This endpoint is deprecated. See the Teams API endpoints.
GET https://api.ap1.datadoghq.com/api/v2/teamshttps://api.datadoghq.eu/api/v2/teamshttps://api.ddog-gov.com/api/v2/teamshttps://api.datadoghq.com/api/v2/teamshttps://api.us3.datadoghq.com/api/v2/teamshttps://api.us5.datadoghq.com/api/v2/teams
Get all incident teams for the requesting user’s organization. If the include[users]
query parameter is provided, the included attribute will contain the users related to these incident teams.
This endpoint requires the incident_read
permission.
OAuth apps require the incident_read
authorization scope to access this endpoint.
이름
유형
설명
include
enum
Specifies which types of related objects should be included in the response.
Allowed enum values: users, attachments
page[size]
integer
Size for a given page. The maximum allowed value is 100.
page[offset]
integer
Specific offset to use as the beginning of the returned page.
filter
string
A search query that filters teams by name.
OK
Response with a list of incident team payloads.
항목
유형
설명
data [required]
[object]
An array of incident teams.
attributes
object
The incident team's attributes from a response.
created
date-time
Timestamp of when the incident team was created.
modified
date-time
Timestamp of when the incident team was modified.
name
string
Name of the incident team.
id
string
The incident team's ID.
relationships
object
The incident team's relationships.
created_by
object
Relationship to user.
data [required]
object
Relationship to user object.
id [required]
string
A unique identifier that represents the user.
type [required]
enum
Users resource type.
Allowed enum values: users
default: users
last_modified_by
object
Relationship to user.
data [required]
object
Relationship to user object.
id [required]
string
A unique identifier that represents the user.
type [required]
enum
Users resource type.
Allowed enum values: users
default: users
type
enum
Incident Team resource type.
Allowed enum values: teams
default: teams
included
[ <oneOf>]
Included related resources which the user requested.
Option 1
object
User object returned by the API.
attributes
object
Attributes of user object returned by the API.
created_at
date-time
Creation time of the user.
disabled
boolean
Whether the user is disabled.
string
Email of the user.
handle
string
Handle of the user.
icon
string
URL of the user's icon.
mfa_enabled
boolean
If user has MFA enabled.
modified_at
date-time
Time that the user was last modified.
name
string
Name of the user.
service_account
boolean
Whether the user is a service account.
status
string
Status of the user.
title
string
Title of the user.
verified
boolean
Whether the user is verified.
id
string
ID of the user.
relationships
object
Relationships of the user object returned by the API.
org
object
Relationship to an organization.
data [required]
object
Relationship to organization object.
id [required]
string
ID of the organization.
type [required]
enum
Organizations resource type.
Allowed enum values: orgs
default: orgs
other_orgs
object
Relationship to organizations.
data [required]
[object]
Relationships to organization objects.
id [required]
string
ID of the organization.
type [required]
enum
Organizations resource type.
Allowed enum values: orgs
default: orgs
other_users
object
Relationship to users.
data [required]
[object]
Relationships to user objects.
id [required]
string
A unique identifier that represents the user.
type [required]
enum
Users resource type.
Allowed enum values: users
default: users
roles
object
Relationship to roles.
data
[object]
An array containing type and the unique identifier of a role.
id
string
The unique identifier of the role.
type
enum
Roles type.
Allowed enum values: roles
default: roles
type
enum
Users resource type.
Allowed enum values: users
default: users
meta
object
The metadata object containing pagination metadata.
pagination
object
Pagination properties.
next_offset
int64
The index of the first element in the next page of results. Equal to page size added to the current offset.
offset
int64
The index of the first element in the results.
size
int64
Maximum size of pages to return.
{
"data": [
{
"attributes": {
"created": "2019-09-19T10:00:00.000Z",
"modified": "2019-09-19T10:00:00.000Z",
"name": "team name"
},
"id": "00000000-7ea3-0000-000a-000000000000",
"relationships": {
"created_by": {
"data": {
"id": "00000000-0000-0000-2345-000000000000",
"type": "users"
}
},
"last_modified_by": {
"data": {
"id": "00000000-0000-0000-2345-000000000000",
"type": "users"
}
}
},
"type": "teams"
}
],
"included": [
{
"attributes": {
"created_at": "2019-09-19T10:00:00.000Z",
"disabled": false,
"email": "string",
"handle": "string",
"icon": "string",
"mfa_enabled": false,
"modified_at": "2019-09-19T10:00:00.000Z",
"name": "string",
"service_account": false,
"status": "string",
"title": "string",
"verified": false
},
"id": "string",
"relationships": {
"org": {
"data": {
"id": "00000000-0000-beef-0000-000000000000",
"type": "orgs"
}
},
"other_orgs": {
"data": [
{
"id": "00000000-0000-beef-0000-000000000000",
"type": "orgs"
}
]
},
"other_users": {
"data": [
{
"id": "00000000-0000-0000-2345-000000000000",
"type": "users"
}
]
},
"roles": {
"data": [
{
"id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d",
"type": "roles"
}
]
}
},
"type": "users"
}
],
"meta": {
"pagination": {
"next_offset": 1000,
"offset": 10,
"size": 1000
}
}
}
Bad Request
API error response.
{
"errors": [
"Bad Request"
]
}
Unauthorized
API error response.
{
"errors": [
"Bad Request"
]
}
Forbidden
API error response.
{
"errors": [
"Bad Request"
]
}
Not Found
API error response.
{
"errors": [
"Bad Request"
]
}
Too many requests
API error response.
{
"errors": [
"Bad Request"
]
}
// Get a list of all incident teams returns "OK" response
import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.IncidentTeamsApi;
import com.datadog.api.client.v2.api.IncidentTeamsApi.ListIncidentTeamsOptionalParameters;
import com.datadog.api.client.v2.model.IncidentTeamsResponse;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setUnstableOperationEnabled("v2.listIncidentTeams", true);
IncidentTeamsApi apiInstance = new IncidentTeamsApi(defaultClient);
// there is a valid "team" in the system
String TEAM_DATA_ATTRIBUTES_NAME = System.getenv("TEAM_DATA_ATTRIBUTES_NAME");
try {
IncidentTeamsResponse result =
apiInstance.listIncidentTeams(
new ListIncidentTeamsOptionalParameters().filter(TEAM_DATA_ATTRIBUTES_NAME));
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling IncidentTeamsApi#listIncidentTeams");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
First install the library and its dependencies and then save the example to Example.java
and run following commands:
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"
Note: This endpoint is deprecated. See the Teams API endpoints.
POST https://api.ap1.datadoghq.com/api/v2/teamshttps://api.datadoghq.eu/api/v2/teamshttps://api.ddog-gov.com/api/v2/teamshttps://api.datadoghq.com/api/v2/teamshttps://api.us3.datadoghq.com/api/v2/teamshttps://api.us5.datadoghq.com/api/v2/teams
Creates a new incident team.
This endpoint requires the incident_settings_write
permission.
OAuth apps require the incident_settings_write
authorization scope to access this endpoint.
Incident Team Payload.
항목
유형
설명
data [required]
object
Incident Team data for a create request.
attributes
object
The incident team's attributes for a create request.
name [required]
string
Name of the incident team.
relationships
object
The incident team's relationships.
created_by
object
Relationship to user.
data [required]
object
Relationship to user object.
id [required]
string
A unique identifier that represents the user.
type [required]
enum
Users resource type.
Allowed enum values: users
default: users
last_modified_by
object
Relationship to user.
data [required]
object
Relationship to user object.
id [required]
string
A unique identifier that represents the user.
type [required]
enum
Users resource type.
Allowed enum values: users
default: users
type [required]
enum
Incident Team resource type.
Allowed enum values: teams
default: teams
{
"data": {
"type": "teams",
"attributes": {
"name": "Example-Incident-Team"
}
}
}
CREATED
Response with an incident team payload.
항목
유형
설명
data [required]
object
Incident Team data from a response.
attributes
object
The incident team's attributes from a response.
created
date-time
Timestamp of when the incident team was created.
modified
date-time
Timestamp of when the incident team was modified.
name
string
Name of the incident team.
id
string
The incident team's ID.
relationships
object
The incident team's relationships.
created_by
object
Relationship to user.
data [required]
object
Relationship to user object.
id [required]
string
A unique identifier that represents the user.
type [required]
enum
Users resource type.
Allowed enum values: users
default: users
last_modified_by
object
Relationship to user.
data [required]
object
Relationship to user object.
id [required]
string
A unique identifier that represents the user.
type [required]
enum
Users resource type.
Allowed enum values: users
default: users
type
enum
Incident Team resource type.
Allowed enum values: teams
default: teams
included
[ <oneOf>]
Included objects from relationships.
Option 1
object
User object returned by the API.
attributes
object
Attributes of user object returned by the API.
created_at
date-time
Creation time of the user.
disabled
boolean
Whether the user is disabled.
string
Email of the user.
handle
string
Handle of the user.
icon
string
URL of the user's icon.
mfa_enabled
boolean
If user has MFA enabled.
modified_at
date-time
Time that the user was last modified.
name
string
Name of the user.
service_account
boolean
Whether the user is a service account.
status
string
Status of the user.
title
string
Title of the user.
verified
boolean
Whether the user is verified.
id
string
ID of the user.
relationships
object
Relationships of the user object returned by the API.
org
object
Relationship to an organization.
data [required]
object
Relationship to organization object.
id [required]
string
ID of the organization.
type [required]
enum
Organizations resource type.
Allowed enum values: orgs
default: orgs
other_orgs
object
Relationship to organizations.
data [required]
[object]
Relationships to organization objects.
id [required]
string
ID of the organization.
type [required]
enum
Organizations resource type.
Allowed enum values: orgs
default: orgs
other_users
object
Relationship to users.
data [required]
[object]
Relationships to user objects.
id [required]
string
A unique identifier that represents the user.
type [required]
enum
Users resource type.
Allowed enum values: users
default: users
roles
object
Relationship to roles.
data
[object]
An array containing type and the unique identifier of a role.
id
string
The unique identifier of the role.
type
enum
Roles type.
Allowed enum values: roles
default: roles
type
enum
Users resource type.
Allowed enum values: users
default: users
{
"data": {
"attributes": {
"created": "2019-09-19T10:00:00.000Z",
"modified": "2019-09-19T10:00:00.000Z",
"name": "team name"
},
"id": "00000000-7ea3-0000-000a-000000000000",
"relationships": {
"created_by": {
"data": {
"id": "00000000-0000-0000-2345-000000000000",
"type": "users"
}
},
"last_modified_by": {
"data": {
"id": "00000000-0000-0000-2345-000000000000",
"type": "users"
}
}
},
"type": "teams"
},
"included": [
{
"attributes": {
"created_at": "2019-09-19T10:00:00.000Z",
"disabled": false,
"email": "string",
"handle": "string",
"icon": "string",
"mfa_enabled": false,
"modified_at": "2019-09-19T10:00:00.000Z",
"name": "string",
"service_account": false,
"status": "string",
"title": "string",
"verified": false
},
"id": "string",
"relationships": {
"org": {
"data": {
"id": "00000000-0000-beef-0000-000000000000",
"type": "orgs"
}
},
"other_orgs": {
"data": [
{
"id": "00000000-0000-beef-0000-000000000000",
"type": "orgs"
}
]
},
"other_users": {
"data": [
{
"id": "00000000-0000-0000-2345-000000000000",
"type": "users"
}
]
},
"roles": {
"data": [
{
"id": "3653d3c6-0c75-11ea-ad28-fb5701eabc7d",
"type": "roles"
}
]
}
},
"type": "users"
}
]
}
Bad Request
API error response.
{
"errors": [
"Bad Request"
]
}
Unauthorized
API error response.
{
"errors": [
"Bad Request"
]
}
Forbidden
API error response.
{
"errors": [
"Bad Request"
]
}
Not Found
API error response.
{
"errors": [
"Bad Request"
]
}
Too many requests
API error response.
{
"errors": [
"Bad Request"
]
}
// Create a new incident team returns "CREATED" response
import com.datadog.api.client.ApiClient;
import com.datadog.api.client.ApiException;
import com.datadog.api.client.v2.api.IncidentTeamsApi;
import com.datadog.api.client.v2.model.IncidentTeamCreateAttributes;
import com.datadog.api.client.v2.model.IncidentTeamCreateData;
import com.datadog.api.client.v2.model.IncidentTeamCreateRequest;
import com.datadog.api.client.v2.model.IncidentTeamResponse;
import com.datadog.api.client.v2.model.IncidentTeamType;
public class Example {
public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
defaultClient.setUnstableOperationEnabled("v2.createIncidentTeam", true);
IncidentTeamsApi apiInstance = new IncidentTeamsApi(defaultClient);
IncidentTeamCreateRequest body =
new IncidentTeamCreateRequest()
.data(
new IncidentTeamCreateData()
.type(IncidentTeamType.TEAMS)
.attributes(new IncidentTeamCreateAttributes().name("Example-Incident-Team")));
try {
IncidentTeamResponse result = apiInstance.createIncidentTeam(body);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling IncidentTeamsApi#createIncidentTeam");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
First install the library and its dependencies and then save the example to Example.java
and run following commands:
DD_SITE="datadoghq.comus3.datadoghq.comus5.datadoghq.comdatadoghq.euap1.datadoghq.comddog-gov.com" DD_API_KEY="<DD_API_KEY>" DD_APP_KEY="<DD_APP_KEY>" java "Example.java"