-
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 0cf3784b of spec repo
- Loading branch information
ci.datadog-api-spec
committed
Sep 12, 2024
1 parent
6207114
commit a06d3b0
Showing
14 changed files
with
658 additions
and
4 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
...ics_2658572017/Fetch-uptime-for-multiple-tests-returns-OK-response_2057501027/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 @@ | ||
"2024-09-11T13:09:28.349Z" |
67 changes: 67 additions & 0 deletions
67
...s_2658572017/Fetch-uptime-for-multiple-tests-returns-OK-response_2057501027/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,67 @@ | ||
{ | ||
"log": { | ||
"_recordingName": "Synthetics/Fetch uptime for multiple tests returns \"OK.\" response", | ||
"creator": { | ||
"comment": "persister:fs", | ||
"name": "Polly.JS", | ||
"version": "6.0.5" | ||
}, | ||
"entries": [ | ||
{ | ||
"_id": "5bb349ef4e2317c9387395651078521d", | ||
"_order": 0, | ||
"cache": {}, | ||
"request": { | ||
"bodySize": 70, | ||
"cookies": [], | ||
"headers": [ | ||
{ | ||
"_fromType": "array", | ||
"name": "accept", | ||
"value": "application/json" | ||
}, | ||
{ | ||
"_fromType": "array", | ||
"name": "content-type", | ||
"value": "application/json" | ||
} | ||
], | ||
"headersSize": 570, | ||
"httpVersion": "HTTP/1.1", | ||
"method": "POST", | ||
"postData": { | ||
"mimeType": "application/json", | ||
"params": [], | ||
"text": "{\"from_ts\":1726041488,\"public_ids\":[\"p8m-9gw-nte\"],\"to_ts\":1726055954}" | ||
}, | ||
"queryString": [], | ||
"url": "https://api.datadoghq.com/api/v1/synthetics/tests/uptimes" | ||
}, | ||
"response": { | ||
"bodySize": 314, | ||
"content": { | ||
"mimeType": "application/json", | ||
"size": 314, | ||
"text": "[{\"from_ts\":1726041488,\"to_ts\":1726055954,\"overall\":{\"name\":\"[Synthetics] Synthetics test\",\"preview\":false,\"monitor_type\":\"synthetics alert\",\"monitor_modified\":1726060063,\"errors\":null,\"span_precision\":0,\"history\":[[1726004543,0],[1726053503,1]],\"uptime\":83.05682373046875},\"public_id\":\"p8m-9gw-nte\",\"groups\":[]}]\n" | ||
}, | ||
"cookies": [], | ||
"headers": [ | ||
{ | ||
"name": "content-type", | ||
"value": "application/json" | ||
} | ||
], | ||
"headersSize": 665, | ||
"httpVersion": "HTTP/1.1", | ||
"redirectURL": "", | ||
"status": 200, | ||
"statusText": "OK" | ||
}, | ||
"startedDateTime": "2024-09-11T13:09:28.358Z", | ||
"time": 508 | ||
} | ||
], | ||
"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,25 @@ | ||
/** | ||
* Fetch uptime for multiple tests returns "OK." response | ||
*/ | ||
|
||
import { client, v1 } from "@datadog/datadog-api-client"; | ||
|
||
const configuration = client.createConfiguration(); | ||
const apiInstance = new v1.SyntheticsApi(configuration); | ||
|
||
const params: v1.SyntheticsApiFetchUptimesRequest = { | ||
body: { | ||
fromTs: 1726041488, | ||
publicIds: ["p8m-9gw-nte"], | ||
toTs: 1726055954, | ||
}, | ||
}; | ||
|
||
apiInstance | ||
.fetchUptimes(params) | ||
.then((data: v1.SyntheticsTestUptime[]) => { | ||
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
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.