-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Regenerate client from commit 7813bcbf of spec repo
- Loading branch information
ci.datadog-api-spec
committed
Oct 23, 2023
1 parent
29646b1
commit e4ecf4c
Showing
14 changed files
with
343 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...92301/Get-all-teams-with-fields_team-parameter-returns-OK-response_3146995176/frozen.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
"2023-10-11T17:40:11.903Z" |
64 changes: 64 additions & 0 deletions
64
...301/Get-all-teams-with-fields_team-parameter-returns-OK-response_3146995176/recording.har
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
{ | ||
"log": { | ||
"_recordingName": "Teams/Get all teams with fields_team parameter returns \"OK\" response", | ||
"creator": { | ||
"comment": "persister:fs", | ||
"name": "Polly.JS", | ||
"version": "6.0.5" | ||
}, | ||
"entries": [ | ||
{ | ||
"_id": "e8920722757839c9ea01a896837e687d", | ||
"_order": 0, | ||
"cache": {}, | ||
"request": { | ||
"bodySize": 0, | ||
"cookies": [], | ||
"headers": [ | ||
{ | ||
"_fromType": "array", | ||
"name": "accept", | ||
"value": "application/json" | ||
} | ||
], | ||
"headersSize": 530, | ||
"httpVersion": "HTTP/1.1", | ||
"method": "GET", | ||
"queryString": [ | ||
{ | ||
"name": "fields", | ||
"value": { | ||
"team": "id,name,handle" | ||
} | ||
} | ||
], | ||
"url": "https://api.datadoghq.com/api/v2/team?fields%5Bteam%5D=id%2Cname%2Chandle" | ||
}, | ||
"response": { | ||
"bodySize": 938, | ||
"content": { | ||
"mimeType": "application/json", | ||
"size": 938, | ||
"text": "{\"data\":[{\"type\":\"team\",\"id\":\"ac73040e-c8d4-11ed-b2ea-da7ad0900002\",\"attributes\":{\"name\":\"Example Team\",\"handle\":\"api-spec-test-team\"}},{\"type\":\"team\",\"id\":\"cc338b02-405b-11ee-835e-da7ad0900002\",\"attributes\":{\"name\":\"test-name-12938712938\",\"handle\":\"test-handle-12938712938\"}},{\"type\":\"team\",\"id\":\"ecc8affc-27d6-11ee-b33c-da7ad0900002\",\"attributes\":{\"name\":\"tf-testaccteamlinkbasic-local-1689951453\",\"handle\":\"tf-testaccteamlinkbasic-local-1689951453\"}}],\"meta\":{\"pagination\":{\"offset\":0,\"first_offset\":0,\"prev_offset\":0,\"next_offset\":100,\"last_offset\":0,\"limit\":100,\"type\":\"offset_limit\",\"total\":3}},\"links\":{\"self\":\"https://api.datadoghq.com/api/v2/team?fields%5Bteam%5D=id,name,handle\",\"last\":null,\"next\":\"https://api.datadoghq.com/api/v2/team?fields%5Bteam%5D=id,name,handle&page[offset]=100&page[limit]=100\",\"prev\":null,\"first\":\"https://api.datadoghq.com/api/v2/team?fields%5Bteam%5D=id,name,handle&page[offset]=0&page[limit]=100\"}}\n" | ||
}, | ||
"cookies": [], | ||
"headers": [ | ||
{ | ||
"name": "content-type", | ||
"value": "application/json" | ||
} | ||
], | ||
"headersSize": 653, | ||
"httpVersion": "HTTP/1.1", | ||
"redirectURL": "", | ||
"status": 200, | ||
"statusText": "OK" | ||
}, | ||
"startedDateTime": "2023-10-11T17:40:11.911Z", | ||
"time": 202 | ||
} | ||
], | ||
"pages": [], | ||
"version": "1.2" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
/** | ||
* Get all teams with fields_team parameter returns "OK" response | ||
*/ | ||
|
||
import { client, v2 } from "@datadog/datadog-api-client"; | ||
|
||
const configuration = client.createConfiguration(); | ||
const apiInstance = new v2.TeamsApi(configuration); | ||
|
||
const params: v2.TeamsApiListTeamsRequest = { | ||
fieldsTeam: ["id", "name", "handle"], | ||
}; | ||
|
||
apiInstance | ||
.listTeams(params) | ||
.then((data: v2.TeamsResponse) => { | ||
console.log( | ||
"API called successfully. Returned data: " + JSON.stringify(data) | ||
); | ||
}) | ||
.catch((error: any) => console.error(error)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.