File tree Expand file tree Collapse file tree 10 files changed +87
-47
lines changed
cassettes/v2/Usage-Metering_938753175
GetEstimatedCostByOrg-with-both-start_month-and-start_date-returns-Bad-Request-response_3256531067
GetEstimatedCostByOrg-with-start_month-returns-OK-response_1716803506
examples/v2/usage-metering
packages/datadog-api-client-v2/apis Expand file tree Collapse file tree 10 files changed +87
-47
lines changed Original file line number Diff line number Diff line change 4
4
"spec_versions": {
5
5
"v1": {
6
6
"apigentools_version": "1.6.4",
7
- "regenerated": "2022-11-02 20:10:44.572413 ",
8
- "spec_repo_commit": "7c5579df "
7
+ "regenerated": "2022-11-04 18:42:23.483568 ",
8
+ "spec_repo_commit": "af3f11fc "
9
9
},
10
10
"v2": {
11
11
"apigentools_version": "1.6.4",
12
- "regenerated": "2022-11-02 20:10:44.593267 ",
13
- "spec_repo_commit": "7c5579df "
12
+ "regenerated": "2022-11-04 18:42:23.501734 ",
13
+ "spec_repo_commit": "af3f11fc "
14
14
}
15
15
}
16
16
}
Original file line number Diff line number Diff line change @@ -16461,7 +16461,9 @@ paths:
16461
16461
get:
16462
16462
description: 'Get estimated cost across multi-org and single root-org accounts.
16463
16463
16464
- Estimated cost data is only available for the current month and previous month.
16464
+ Estimated cost data is only available for the current month and previous month
16465
+
16466
+ and is delayed by up to 72 hours from when it was incurred.
16465
16467
16466
16468
To access historical costs prior to this, use the `/historical_cost` endpoint.'
16467
16469
operationId: GetEstimatedCostByOrg
Original file line number Diff line number Diff line change 1
- " 2022-09-23T14:04:15.545Z "
1
+ " 2022-11-03T21:08:41.229Z "
Original file line number Diff line number Diff line change 8
8
},
9
9
"entries" : [
10
10
{
11
- "_id" : " 6f83bc6b9f6d8855ab2010ced5adc5f0 " ,
11
+ "_id" : " f0e71e06e09bdc333a8e4a09733b118a " ,
12
12
"_order" : 0 ,
13
13
"cache" : {},
14
14
"request" : {
21
21
"value" : " application/json;datetime-format=rfc3339"
22
22
}
23
23
],
24
- "headersSize" : 640 ,
24
+ "headersSize" : 639 ,
25
25
"httpVersion" : " HTTP/1.1" ,
26
26
"method" : " GET" ,
27
27
"queryString" : [
31
31
},
32
32
{
33
33
"name" : " start_month" ,
34
- "value" : " 2022-09-20T14:04:15.545Z "
34
+ "value" : " 2022-11-03T21:08:41.229Z "
35
35
},
36
36
{
37
37
"name" : " start_date" ,
38
- "value" : " 2022-09-20T14:04:15.545Z "
38
+ "value" : " 2022-10-31T21:08:41.229Z "
39
39
}
40
40
],
41
- "url" : " https://api.datadoghq.com/api/v2/usage/estimated_cost?view=sub-org&start_month=2022-09-20T14%3A04%3A15.545Z &start_date=2022-09-20T14%3A04%3A15.545Z "
41
+ "url" : " https://api.datadoghq.com/api/v2/usage/estimated_cost?view=sub-org&start_month=2022-11-03T21%3A08%3A41.229Z &start_date=2022-10-31T21%3A08%3A41.229Z "
42
42
},
43
43
"response" : {
44
44
"bodySize" : 96 ,
60
60
"status" : 400 ,
61
61
"statusText" : " Bad Request"
62
62
},
63
- "startedDateTime" : " 2022-09-23T14:04:15.571Z " ,
64
- "time" : 624
63
+ "startedDateTime" : " 2022-11-03T21:08:41.248Z " ,
64
+ "time" : 712
65
65
}
66
66
],
67
67
"pages" : [],
Original file line number Diff line number Diff line change
1
+ " 2022-11-04T18:40:14.021Z"
Original file line number Diff line number Diff line change
1
+ {
2
+ "log" : {
3
+ "_recordingName" : " Usage Metering/GetEstimatedCostByOrg with start_month returns \" OK\" response" ,
4
+ "creator" : {
5
+ "comment" : " persister:fs" ,
6
+ "name" : " Polly.JS" ,
7
+ "version" : " 6.0.4"
8
+ },
9
+ "entries" : [
10
+ {
11
+ "_id" : " 4ad0a8d9835df4c06695ca3d93866e34" ,
12
+ "_order" : 0 ,
13
+ "cache" : {},
14
+ "request" : {
15
+ "bodySize" : 0 ,
16
+ "cookies" : [],
17
+ "headers" : [
18
+ {
19
+ "_fromType" : " array" ,
20
+ "name" : " accept" ,
21
+ "value" : " application/json;datetime-format=rfc3339"
22
+ }
23
+ ],
24
+ "headersSize" : 600 ,
25
+ "httpVersion" : " HTTP/1.1" ,
26
+ "method" : " GET" ,
27
+ "queryString" : [
28
+ {
29
+ "name" : " view" ,
30
+ "value" : " sub-org"
31
+ },
32
+ {
33
+ "name" : " start_month" ,
34
+ "value" : " 2022-11-04T18:40:14.021Z"
35
+ }
36
+ ],
37
+ "url" : " https://api.datadoghq.com/api/v2/usage/estimated_cost?view=sub-org&start_month=2022-11-04T18%3A40%3A14.021Z"
38
+ },
39
+ "response" : {
40
+ "bodySize" : 12 ,
41
+ "content" : {
42
+ "mimeType" : " application/json" ,
43
+ "size" : 12 ,
44
+ "text" : " {\" data\" :[]}\n "
45
+ },
46
+ "cookies" : [],
47
+ "headers" : [
48
+ {
49
+ "name" : " content-type" ,
50
+ "value" : " application/json"
51
+ }
52
+ ],
53
+ "headersSize" : 596 ,
54
+ "httpVersion" : " HTTP/1.1" ,
55
+ "redirectURL" : " " ,
56
+ "status" : 200 ,
57
+ "statusText" : " OK"
58
+ },
59
+ "startedDateTime" : " 2022-11-04T18:40:14.030Z" ,
60
+ "time" : 241
61
+ }
62
+ ],
63
+ "pages" : [],
64
+ "version" : " 1.2"
65
+ }
66
+ }
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ const apiInstance = new v2.UsageMeteringApi(configuration);
9
9
10
10
const params : v2 . UsageMeteringApiGetEstimatedCostByOrgRequest = {
11
11
view : "sub-org" ,
12
- startMonth : new Date ( new Date ( ) . getTime ( ) + - 5 * 86400 * 1000 ) ,
12
+ startMonth : new Date ( ) ,
13
13
} ;
14
14
15
15
apiInstance
Original file line number Diff line number Diff line change @@ -166,23 +166,15 @@ Feature: Usage Metering
166
166
Scenario : GetEstimatedCostByOrg with both start_month and start_date returns "Bad Request" response
167
167
Given new "GetEstimatedCostByOrg" request
168
168
And request contains "view" parameter with value "sub-org"
169
- And request contains "start_month" parameter with value "{{ timeISO('now - 3d ') }}"
169
+ And request contains "start_month" parameter with value "{{ timeISO('now') }}"
170
170
And request contains "start_date" parameter with value "{{ timeISO('now - 3d') }}"
171
171
When the request is sent
172
172
Then the response status is 400 Bad Request
173
173
174
174
@replay-only @team:DataDog/red-zone-revenue-query
175
- Scenario : GetEstimatedCostByOrg with start_date returns "OK" response
176
- Given new "GetEstimatedCostByOrg" request
177
- And request contains "view" parameter with value "sub-org"
178
- And request contains "start_date" parameter with value "{{ timeISO('now - 5d') }}"
179
- When the request is sent
180
- Then the response status is 200 OK
181
-
182
- @skip @team:DataDog/red-zone-revenue-query
183
175
Scenario : GetEstimatedCostByOrg with start_month returns "OK" response
184
176
Given new "GetEstimatedCostByOrg" request
185
177
And request contains "view" parameter with value "sub-org"
186
- And request contains "start_month" parameter with value "{{ timeISO('now - 5d ') }}"
178
+ And request contains "start_month" parameter with value "{{ timeISO('now') }}"
187
179
When the request is sent
188
180
Then the response status is 200 OK
Original file line number Diff line number Diff line change @@ -1086,7 +1086,8 @@ export class UsageMeteringApi {
1086
1086
1087
1087
/**
1088
1088
* Get estimated cost across multi-org and single root-org accounts.
1089
- * Estimated cost data is only available for the current month and previous month.
1089
+ * Estimated cost data is only available for the current month and previous month
1090
+ * and is delayed by up to 72 hours from when it was incurred.
1090
1091
* To access historical costs prior to this, use the `/historical_cost` endpoint.
1091
1092
* @param param The request object
1092
1093
*/
You can’t perform that action at this time.
0 commit comments