Skip to content

Commit 674c46c

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 71ce972 of spec repo
1 parent c72520d commit 674c46c

32 files changed

Lines changed: 3995 additions & 25 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 978 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
/**
2+
* Create an incident user-defined field returns "CREATED" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
configuration.unstableOperations["v2.createIncidentUserDefinedField"] = true;
9+
const apiInstance = new v2.IncidentsApi(configuration);
10+
11+
const params: v2.IncidentsApiCreateIncidentUserDefinedFieldRequest = {
12+
body: {
13+
data: {
14+
attributes: {
15+
category: "what_happened",
16+
collected: "active",
17+
defaultValue: "critical",
18+
displayName: "Root Cause",
19+
name: "root_cause",
20+
ordinal: "1.5",
21+
required: false,
22+
tagKey: "datacenter",
23+
type: 3,
24+
validValues: [
25+
{
26+
description: "A critical severity incident.",
27+
displayName: "Critical",
28+
shortDescription: "Critical",
29+
value: "critical",
30+
},
31+
],
32+
},
33+
relationships: {
34+
incidentType: {
35+
data: {
36+
id: "00000000-0000-0000-0000-000000000000",
37+
type: "incident_types",
38+
},
39+
},
40+
},
41+
type: "user_defined_field",
42+
},
43+
},
44+
};
45+
46+
apiInstance
47+
.createIncidentUserDefinedField(params)
48+
.then((data: v2.IncidentUserDefinedFieldResponse) => {
49+
console.log(
50+
"API called successfully. Returned data: " + JSON.stringify(data)
51+
);
52+
})
53+
.catch((error: any) => console.error(error));
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/**
2+
* Delete an incident user-defined field returns "No Content" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
configuration.unstableOperations["v2.deleteIncidentUserDefinedField"] = true;
9+
const apiInstance = new v2.IncidentsApi(configuration);
10+
11+
const params: v2.IncidentsApiDeleteIncidentUserDefinedFieldRequest = {
12+
fieldId: "00000000-0000-0000-0000-000000000000",
13+
};
14+
15+
apiInstance
16+
.deleteIncidentUserDefinedField(params)
17+
.then((data: any) => {
18+
console.log(
19+
"API called successfully. Returned data: " + JSON.stringify(data)
20+
);
21+
})
22+
.catch((error: any) => console.error(error));
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/**
2+
* Get an incident user-defined field returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
configuration.unstableOperations["v2.getIncidentUserDefinedField"] = true;
9+
const apiInstance = new v2.IncidentsApi(configuration);
10+
11+
const params: v2.IncidentsApiGetIncidentUserDefinedFieldRequest = {
12+
fieldId: "00000000-0000-0000-0000-000000000000",
13+
};
14+
15+
apiInstance
16+
.getIncidentUserDefinedField(params)
17+
.then((data: v2.IncidentUserDefinedFieldResponse) => {
18+
console.log(
19+
"API called successfully. Returned data: " + JSON.stringify(data)
20+
);
21+
})
22+
.catch((error: any) => console.error(error));
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/**
2+
* Import values for an incident user-defined field returns "CREATED" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
configuration.unstableOperations["v2.importIncidentUserDefinedFieldValues"] =
9+
true;
10+
const apiInstance = new v2.IncidentsApi(configuration);
11+
12+
const params: v2.IncidentsApiImportIncidentUserDefinedFieldValuesRequest = {
13+
fieldId: "00000000-0000-0000-0000-000000000000",
14+
};
15+
16+
apiInstance
17+
.importIncidentUserDefinedFieldValues(params)
18+
.then((data: v2.IncidentUserDefinedFieldResponse) => {
19+
console.log(
20+
"API called successfully. Returned data: " + JSON.stringify(data)
21+
);
22+
})
23+
.catch((error: any) => console.error(error));
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
/**
2+
* Get a list of incident user-defined fields returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
configuration.unstableOperations["v2.listIncidentUserDefinedFields"] = true;
9+
const apiInstance = new v2.IncidentsApi(configuration);
10+
11+
apiInstance
12+
.listIncidentUserDefinedFields()
13+
.then((data: v2.IncidentUserDefinedFieldListResponse) => {
14+
console.log(
15+
"API called successfully. Returned data: " + JSON.stringify(data)
16+
);
17+
})
18+
.catch((error: any) => console.error(error));
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/**
2+
* Update an incident user-defined field returns "OK" response
3+
*/
4+
5+
import { client, v2 } from "@datadog/datadog-api-client";
6+
7+
const configuration = client.createConfiguration();
8+
configuration.unstableOperations["v2.updateIncidentUserDefinedField"] = true;
9+
const apiInstance = new v2.IncidentsApi(configuration);
10+
11+
const params: v2.IncidentsApiUpdateIncidentUserDefinedFieldRequest = {
12+
body: {
13+
data: {
14+
attributes: {
15+
category: "what_happened",
16+
collected: "active",
17+
defaultValue: "critical",
18+
displayName: "Root Cause",
19+
ordinal: "1.5",
20+
required: false,
21+
validValues: [
22+
{
23+
description: "A critical severity incident.",
24+
displayName: "Critical",
25+
shortDescription: "Critical",
26+
value: "critical",
27+
},
28+
],
29+
},
30+
id: "00000000-0000-0000-0000-000000000000",
31+
type: "user_defined_field",
32+
},
33+
},
34+
fieldId: "00000000-0000-0000-0000-000000000000",
35+
};
36+
37+
apiInstance
38+
.updateIncidentUserDefinedField(params)
39+
.then((data: v2.IncidentUserDefinedFieldResponse) => {
40+
console.log(
41+
"API called successfully. Returned data: " + JSON.stringify(data)
42+
);
43+
})
44+
.catch((error: any) => console.error(error));

features/support/scenarios_model_mapping.ts

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6149,6 +6149,21 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
61496149
},
61506150
"operationResponseType": "IncidentResponse",
61516151
},
6152+
"v2.ImportIncidentUserDefinedFieldValues": {
6153+
"fieldId": {
6154+
"type": "string",
6155+
"format": "",
6156+
},
6157+
"replaceValues": {
6158+
"type": "string",
6159+
"format": "",
6160+
},
6161+
"file": {
6162+
"type": "HttpFile",
6163+
"format": "binary",
6164+
},
6165+
"operationResponseType": "IncidentUserDefinedFieldResponse",
6166+
},
61526167
"v2.ListGlobalIncidentHandles": {
61536168
"include": {
61546169
"type": "string",
@@ -6371,6 +6386,73 @@ export const ScenariosModelMappings: {[key: string]: {[key: string]: any}} = {
63716386
},
63726387
"operationResponseType": "IncidentTypeResponse",
63736388
},
6389+
"v2.ListIncidentUserDefinedFields": {
6390+
"pageSize": {
6391+
"type": "number",
6392+
"format": "int64",
6393+
},
6394+
"pageNumber": {
6395+
"type": "number",
6396+
"format": "int64",
6397+
},
6398+
"includeDeleted": {
6399+
"type": "boolean",
6400+
"format": "",
6401+
},
6402+
"filterIncidentType": {
6403+
"type": "string",
6404+
"format": "",
6405+
},
6406+
"include": {
6407+
"type": "string",
6408+
"format": "",
6409+
},
6410+
"operationResponseType": "IncidentUserDefinedFieldListResponse",
6411+
},
6412+
"v2.CreateIncidentUserDefinedField": {
6413+
"include": {
6414+
"type": "string",
6415+
"format": "",
6416+
},
6417+
"body": {
6418+
"type": "IncidentUserDefinedFieldCreateRequest",
6419+
"format": "",
6420+
},
6421+
"operationResponseType": "IncidentUserDefinedFieldResponse",
6422+
},
6423+
"v2.GetIncidentUserDefinedField": {
6424+
"fieldId": {
6425+
"type": "string",
6426+
"format": "",
6427+
},
6428+
"include": {
6429+
"type": "string",
6430+
"format": "",
6431+
},
6432+
"operationResponseType": "IncidentUserDefinedFieldResponse",
6433+
},
6434+
"v2.DeleteIncidentUserDefinedField": {
6435+
"fieldId": {
6436+
"type": "string",
6437+
"format": "",
6438+
},
6439+
"operationResponseType": "{}",
6440+
},
6441+
"v2.UpdateIncidentUserDefinedField": {
6442+
"fieldId": {
6443+
"type": "string",
6444+
"format": "",
6445+
},
6446+
"include": {
6447+
"type": "string",
6448+
"format": "",
6449+
},
6450+
"body": {
6451+
"type": "IncidentUserDefinedFieldUpdateRequest",
6452+
"format": "",
6453+
},
6454+
"operationResponseType": "IncidentUserDefinedFieldResponse",
6455+
},
63746456
"v2.ImportIncident": {
63756457
"include": {
63766458
"type": "Array<IncidentImportRelatedObject>",

0 commit comments

Comments
 (0)