Skip to content

Commit 466f670

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spectherve
authored
Regenerate client from commit 5a2248e0 of spec repo (#953)
Co-authored-by: ci.datadog-api-spec <[email protected]> Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com> Co-authored-by: Thomas Hervé <[email protected]>
1 parent 7b2f636 commit 466f670

File tree

29 files changed

+674
-21
lines changed

29 files changed

+674
-21
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.2",
7-
"regenerated": "2022-04-13 07:37:36.635647",
8-
"spec_repo_commit": "a87e717d"
7+
"regenerated": "2022-04-13 14:43:33.545001",
8+
"spec_repo_commit": "5a2248e0"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.2",
12-
"regenerated": "2022-04-13 07:37:36.647488",
13-
"spec_repo_commit": "a87e717d"
12+
"regenerated": "2022-04-13 14:43:33.557153",
13+
"spec_repo_commit": "5a2248e0"
1414
}
1515
}
1616
}

examples/v1/service-level-objectives/ListSLOs.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,6 @@
1212
configuration = Configuration()
1313
with ApiClient(configuration) as api_client:
1414
api_instance = ServiceLevelObjectivesApi(api_client)
15-
response = api_instance.list_sl_os(ids=SLO_DATA_0_ID)
15+
response = api_instance.list_slos(ids=SLO_DATA_0_ID)
1616

1717
print(response)

src/datadog_api_client/rest.py

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ def request(
131131
headers["Content-Type"] = "application/json"
132132
if query_params:
133133
url += "?" + urlencode(query_params)
134-
if "Content-Type" not in headers or re.search("json", headers["Content-Type"], re.IGNORECASE):
134+
if ("Content-Type" not in headers) or (re.search("json", headers["Content-Type"], re.IGNORECASE)):
135135
request_body = None
136136
if body is not None:
137137
request_body = json.dumps(body)
@@ -269,21 +269,7 @@ async def request(
269269
(connection, read) timeouts.
270270
"""
271271
assert not post_params, "not supported for now"
272-
request_body = None
273-
if (
274-
"Content-Type" not in headers
275-
or re.search("json", headers["Content-Type"], re.IGNORECASE)
276-
and body is not None
277-
):
278-
request_body = json.dumps(body)
279-
if headers.get("Content-Encoding") == "gzip":
280-
compress = zlib.compressobj(wbits=16 + zlib.MAX_WBITS)
281-
request_body = compress.compress(request_body.encode("utf-8")) + compress.flush()
282-
elif headers.get("Content-Encoding") == "deflate":
283-
request_body = zlib.compress(request_body.encode("utf-8"))
284-
response = await self._client.request(
285-
url, method, headers, query_params, request_body, timeouts=_request_timeout
286-
)
272+
response = await self._client.request(url, method, headers, query_params, body, timeouts=_request_timeout)
287273

288274
if not 200 <= response.status_code <= 299:
289275
data = b""
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2022-04-13T09:30:15.478Z
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
interactions:
2+
- request:
3+
body: null
4+
headers:
5+
accept:
6+
- application/json
7+
method: GET
8+
uri: https://api.datadoghq.com/api/v2/audit/events?page%5Blimit%5D=2
9+
response:
10+
body:
11+
string: '{"meta":{"page":{"after":"eyJhZnRlciI6IkFRQUFBWUFpUWhuWTNTSHVVUUFBQUFCQldVRnBVV2h4UmtGQlEwczJhSGMyTWtoNGNuUjNRVUUifQ"}},"data":[{"attributes":{"attributes":{"status":"info","tags":["agent_hostname:i-086c6dfaa6bd27468","agent_version:7.35.0","root_config_version:4","old_snapshot_version:1419839","last_snapshot_version:1419845"],"timestamp":"2022-04-13T09:29:59Z","usr":{"id":"1ad9c690-ee90-4dca-80ad-034e916623ab","email":"1ad9c690-ee90-4dca-80ad-034e916623ab"},"action":"update_config","org":{"uuid":"8dee7c38-00cb-11ea-a77b-8b5a08d3b091"},"evt":{"actor":{"type":"Other"}},"auth_method":"API
12+
+ App Key"},"message":"Agent configuration successfuly updated","tags":["source:audit"],"timestamp":"2022-04-13T09:29:59.000Z"},"type":"audit","id":"AQAAAYAiQhnY3SfuUQAAAABBWUFpUWhxSEFBQ0s2aHc2Mkh4cnZRQUE"},{"attributes":{"attributes":{"status":"info","tags":["agent_hostname:i-0a31006532ef57785","agent_version:7.35.0","root_config_version:4","old_snapshot_version:1419839","last_snapshot_version:1419845"],"timestamp":"2022-04-13T09:29:59Z","usr":{"id":"1ad9c690-ee90-4dca-80ad-034e916623ab","email":"1ad9c690-ee90-4dca-80ad-034e916623ab"},"action":"update_config","org":{"uuid":"8dee7c38-00cb-11ea-a77b-8b5a08d3b091"},"evt":{"actor":{"type":"Other"}},"auth_method":"API
13+
+ App Key"},"message":"Agent configuration successfuly updated","tags":["source:audit"],"timestamp":"2022-04-13T09:29:59.000Z"},"type":"audit","id":"AQAAAYAiQhnY3SHuUQAAAABBWUFpUWhxRkFBQ0s2aHc2Mkh4cnR3QUE"}],"links":{"next":"https://api.datadoghq.com/api/v2/audit/events?page%5Bcursor%5D=eyJhZnRlciI6IkFRQUFBWUFpUWhuWTNTSHVVUUFBQUFCQldVRnBVV2h4UmtGQlEwczJhSGMyTWtoNGNuUjNRVUUifQ&page%5Blimit%5D=2"}}'
14+
headers:
15+
content-type:
16+
- application/json
17+
status:
18+
code: 200
19+
message: OK
20+
- request:
21+
body: null
22+
headers:
23+
accept:
24+
- application/json
25+
method: GET
26+
uri: https://api.datadoghq.com/api/v2/audit/events?page%5Blimit%5D=2&page%5Bcursor%5D=eyJhZnRlciI6IkFRQUFBWUFpUWhuWTNTSHVVUUFBQUFCQldVRnBVV2h4UmtGQlEwczJhSGMyTWtoNGNuUjNRVUUifQ
27+
response:
28+
body:
29+
string: '{"meta":{"page":{"after":"eyJhZnRlciI6IkFRQUFBWUFpUWhuWTNRM3VVUUFBQUFCQldVRnBVV2h3YmtGQlEwczJhSGMyTWtoNGNtOTNRVUUifQ"}},"data":[{"attributes":{"attributes":{"status":"info","tags":["agent_hostname:i-029aff430be77ea83","agent_version:7.35.0","root_config_version:4","old_snapshot_version:1419839","last_snapshot_version:1419845"],"timestamp":"2022-04-13T09:29:59Z","usr":{"id":"1ad9c690-ee90-4dca-80ad-034e916623ab","email":"1ad9c690-ee90-4dca-80ad-034e916623ab"},"action":"update_config","org":{"uuid":"8dee7c38-00cb-11ea-a77b-8b5a08d3b091"},"evt":{"actor":{"type":"Other"}},"auth_method":"API
30+
+ App Key"},"message":"Agent configuration successfuly updated","tags":["source:audit"],"timestamp":"2022-04-13T09:29:59.000Z"},"type":"audit","id":"AQAAAYAiQhnY3RvuUQAAAABBWUFpUWhwekFBQ0s2aHc2Mkh4cnNRQUE"}],"links":{"next":"https://api.datadoghq.com/api/v2/audit/events?page%5Bcursor%5D=eyJhZnRlciI6IkFRQUFBWUFpUWhuWTNRM3VVUUFBQUFCQldVRnBVV2h3YmtGQlEwczJhSGMyTWtoNGNtOTNRVUUifQ&page%5Blimit%5D=2"}}'
31+
headers:
32+
content-type:
33+
- application/json
34+
status:
35+
code: 200
36+
message: OK
37+
version: 1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2022-04-12T13:28:59.942Z
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
interactions:
2+
- request:
3+
body: null
4+
headers:
5+
accept:
6+
- application/json
7+
method: GET
8+
uri: https://api.datadoghq.com/api/v2/incidents?page%5Bsize%5D=2
9+
response:
10+
body:
11+
string: '{"meta":{"pagination":{"size":2,"next_offset":2,"offset":0}},"data":[{"type":"incidents","id":"ed3ff75e-6ce6-5b00-8ab4-665fcaeda9f8","attributes":{"public_id":62105,"title":"Test-Ruby-Get_the_details_of_an_incident_returns_OK_response-1631710219","resolved":null,"customer_impact_scope":null,"customer_impact_start":null,"customer_impact_end":null,"customer_impacted":false,"notification_handles":null,"last_modified_by_uuid":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","created":"2021-09-15T12:50:19.743510+00:00","modified":"2021-09-15T12:50:19.743510+00:00","detected":"2021-09-15T12:50:19.741188+00:00","created_by_uuid":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","creation_idempotency_key":null,"customer_impact_duration":0,"time_to_detect":0,"time_to_repair":0,"time_to_internal_response":0,"time_to_resolve":0,"fields":{"severity":{"type":"dropdown","value":"UNKNOWN"},"detection_method":{"type":"dropdown","value":"unknown"},"root_cause":{"type":"textbox","value":null},"teams":{"type":"autocomplete","value":null},"state":{"type":"dropdown","value":"active"},"services":{"type":"autocomplete","value":null},"summary":{"type":"textbox","value":null}},"field_analytics":null,"severity":"UNKNOWN","state":"active","non_datadog_creator":null,"visibility":null},"relationships":{"created_by_user":{"data":{"type":"users","id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}},"last_modified_by_user":{"data":{"type":"users","id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}},"commander_user":{"data":{"type":"users","id":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}},"user_defined_fields":{"data":[{"type":"user_defined_field","id":"4148ead2-da45-548e-b6be-8e319bafc425"},{"type":"user_defined_field","id":"66b62f59-48f6-5fee-969a-0886b1db6dcd"},{"type":"user_defined_field","id":"299616f7-8acd-5403-886b-991656d6b982"},{"type":"user_defined_field","id":"ad2b9456-eaec-5bbd-9bae-e502d74e23f8"},{"type":"user_defined_field","id":"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e"},{"type":"user_defined_field","id":"623af0a5-f30c-577e-8146-09b8324bdb2d"},{"type":"user_defined_field","id":"ccfc9e6c-f586-58e5-b502-03c466c72e6f"}]},"integrations":{"data":[]},"attachments":{"data":[]},"responders":{"data":[]},"impacts":{"data":[]}}},{"type":"incidents","id":"00037f9b-dd47-5b21-bcf3-f8dd30e907da","attributes":{"public_id":62582,"title":"Test-Get_a_list_of_incidents_returns_OK_response-1631884327","resolved":null,"customer_impact_scope":null,"customer_impact_start":null,"customer_impact_end":null,"customer_impacted":false,"notification_handles":null,"last_modified_by_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","created":"2021-09-17T13:12:08.512729+00:00","modified":"2021-09-17T13:12:08.512729+00:00","detected":"2021-09-17T13:12:08.510606+00:00","created_by_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","creation_idempotency_key":null,"customer_impact_duration":0,"time_to_detect":0,"time_to_repair":0,"time_to_internal_response":0,"time_to_resolve":0,"fields":{"severity":{"type":"dropdown","value":"UNKNOWN"},"detection_method":{"type":"dropdown","value":"unknown"},"root_cause":{"type":"textbox","value":null},"teams":{"type":"autocomplete","value":null},"state":{"type":"dropdown","value":"active"},"services":{"type":"autocomplete","value":null},"summary":{"type":"textbox","value":null}},"field_analytics":null,"severity":"UNKNOWN","state":"active","non_datadog_creator":null,"visibility":null},"relationships":{"created_by_user":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"last_modified_by_user":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"commander_user":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"user_defined_fields":{"data":[{"type":"user_defined_field","id":"4148ead2-da45-548e-b6be-8e319bafc425"},{"type":"user_defined_field","id":"66b62f59-48f6-5fee-969a-0886b1db6dcd"},{"type":"user_defined_field","id":"299616f7-8acd-5403-886b-991656d6b982"},{"type":"user_defined_field","id":"ad2b9456-eaec-5bbd-9bae-e502d74e23f8"},{"type":"user_defined_field","id":"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e"},{"type":"user_defined_field","id":"623af0a5-f30c-577e-8146-09b8324bdb2d"},{"type":"user_defined_field","id":"ccfc9e6c-f586-58e5-b502-03c466c72e6f"}]},"integrations":{"data":[]},"attachments":{"data":[]},"responders":{"data":[]},"impacts":{"data":[]}}}]}'
12+
headers:
13+
content-type:
14+
- application/json
15+
status:
16+
code: 200
17+
message: OK
18+
- request:
19+
body: null
20+
headers:
21+
accept:
22+
- application/json
23+
method: GET
24+
uri: https://api.datadoghq.com/api/v2/incidents?page%5Bsize%5D=2&page%5Boffset%5D=2
25+
response:
26+
body:
27+
string: '{"meta":{"pagination":{"size":1,"offset":2}},"data":[{"type":"incidents","id":"1524396f-fa67-5e6d-a27d-78e7bd85f14d","attributes":{"public_id":62583,"title":"Test-Update_an_existing_incident_returns_OK_response-1631884336","resolved":null,"customer_impact_scope":null,"customer_impact_start":null,"customer_impact_end":null,"customer_impacted":false,"notification_handles":null,"last_modified_by_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","created":"2021-09-17T13:12:17.076724+00:00","modified":"2021-09-17T13:12:17.076724+00:00","detected":"2021-09-17T13:12:17.075124+00:00","created_by_uuid":"3ad549bf-eba0-11e9-a77a-0705486660d0","creation_idempotency_key":null,"customer_impact_duration":0,"time_to_detect":0,"time_to_repair":0,"time_to_internal_response":0,"time_to_resolve":0,"fields":{"severity":{"type":"dropdown","value":"UNKNOWN"},"detection_method":{"type":"dropdown","value":"unknown"},"root_cause":{"type":"textbox","value":null},"teams":{"type":"autocomplete","value":null},"state":{"type":"dropdown","value":"active"},"services":{"type":"autocomplete","value":null},"summary":{"type":"textbox","value":null}},"field_analytics":null,"severity":"UNKNOWN","state":"active","non_datadog_creator":null,"visibility":null},"relationships":{"created_by_user":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"last_modified_by_user":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"commander_user":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}},"user_defined_fields":{"data":[{"type":"user_defined_field","id":"4148ead2-da45-548e-b6be-8e319bafc425"},{"type":"user_defined_field","id":"66b62f59-48f6-5fee-969a-0886b1db6dcd"},{"type":"user_defined_field","id":"299616f7-8acd-5403-886b-991656d6b982"},{"type":"user_defined_field","id":"ad2b9456-eaec-5bbd-9bae-e502d74e23f8"},{"type":"user_defined_field","id":"d8a54f16-8b2a-5ab4-87b8-5f0fa575c83e"},{"type":"user_defined_field","id":"623af0a5-f30c-577e-8146-09b8324bdb2d"},{"type":"user_defined_field","id":"ccfc9e6c-f586-58e5-b502-03c466c72e6f"}]},"integrations":{"data":[]},"attachments":{"data":[]},"responders":{"data":[]},"impacts":{"data":[]}}}]}'
28+
headers:
29+
content-type:
30+
- application/json
31+
status:
32+
code: 200
33+
message: OK
34+
version: 1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2022-04-12T09:52:05.170Z
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
interactions:
2+
- request:
3+
body: null
4+
headers:
5+
accept:
6+
- application/json
7+
method: GET
8+
uri: https://api.datadoghq.com/api/v2/logs/events?page%5Blimit%5D=2
9+
response:
10+
body:
11+
string: '{"meta":{"page":{"after":"eyJhZnRlciI6IkFRQUFBWUFkTDlRUW1jT2g2Z0FBQUFCQldVRmtUQzFPUzBGQlFucExkREpLZFZOYVlrTjNRVVEifQ"}},"data":[{"attributes":{"status":"info","timestamp":"2022-04-12T09:51:55.414Z","host":"fe74f1c9-b3bb-45a9-6610-ea12","message":"-
12+
-> /","tags":["source:sinatra","env:integrations-lab","source:sinatra","application_id:a7bebd67-1991-4e9e-8d44-399acf2f13e8","application_name:logs-backend-demo","cf_instance_ip:10.0.40.5","env:integrations-lab","instance_index:0","space_name:system","uri:logs-backend-demo.apps.integrations-lab.devenv.dog","datadog.pipelines:false"]},"type":"log","id":"AQAAAYAdL9QWY-VoZwAAAABBWUFkTDlZNEFBQ3RpUllvSWd4TWlRQUQ"},{"attributes":{"status":"info","timestamp":"2022-04-12T09:51:55.408Z","host":"59fe9540-24f4-48c4-4fc4-1c34","message":"-
13+
-> /","tags":["source:sinatra","env:integrations-lab","source:sinatra","application_id:41256269-671b-4d79-91d5-3bf848376425","application_name:test-space-org-cc","cf_instance_ip:10.0.40.11","env:integrations-lab","instance_index:1","space_name:datadog-application-monitoring-space","uri:test-space-org-cc.apps.integrations-lab.devenv.dog","datadog.pipelines:false"]},"type":"log","id":"AQAAAYAdL9QQmcOh6gAAAABBWUFkTC1OS0FBQnpLdDJKdVNaYkN3QUQ"}],"links":{"next":"https://api.datadoghq.com/api/v2/logs/events?page%5Bcursor%5D=eyJhZnRlciI6IkFRQUFBWUFkTDlRUW1jT2g2Z0FBQUFCQldVRmtUQzFPUzBGQlFucExkREpLZFZOYVlrTjNRVVEifQ&page%5Blimit%5D=2"}}'
14+
headers:
15+
content-type:
16+
- application/json
17+
status:
18+
code: 200
19+
message: OK
20+
- request:
21+
body: null
22+
headers:
23+
accept:
24+
- application/json
25+
method: GET
26+
uri: https://api.datadoghq.com/api/v2/logs/events?page%5Blimit%5D=2&page%5Bcursor%5D=eyJhZnRlciI6IkFRQUFBWUFkTDlRUW1jT2g2Z0FBQUFCQldVRmtUQzFPUzBGQlFucExkREpLZFZOYVlrTjNRVVEifQ
27+
response:
28+
body:
29+
string: '{"meta":{"page":{"after":"eyJhZnRlciI6IkFRQUFBWUFkTDlKNG1jT2g2QUFBQUFCQldVRmtUQzFPUzBGQlFucExkREpLZFZOYVlrTjNRVUkifQ"}},"data":[{"attributes":{"status":"ok","tags":["source:sinatra","env:integrations-lab","source:sinatra","application_id:a7bebd67-1991-4e9e-8d44-399acf2f13e8","application_name:logs-backend-demo","cf_instance_ip:10.0.40.5","env:integrations-lab","instance_index:0","space_name:system","uri:logs-backend-demo.apps.integrations-lab.devenv.dog"],"timestamp":"2022-04-12T09:51:55.000Z","host":"fe74f1c9-b3bb-45a9-6610-ea12","attributes":{"duration":1800000.0,"http":{"url_details":{"path":"/"},"status_category":"OK","url":"/","status_code":200,"version":"1.1","method":"GET"},"network":{"client":{"ip":"169.254.0.1"},"bytes_written":117},"date_access":1649757115000},"message":"169.254.0.1
30+
- - [12/Apr/2022:09:51:55 +0000] \"GET / HTTP/1.1\" 200 117 0.0018"},"type":"log","id":"AQAAAYAdL9J4Y-VoZQAAAABBWUFkTDlZNEFBQ3RpUllvSWd4TWlRQUI"}],"links":{"next":"https://api.datadoghq.com/api/v2/logs/events?page%5Bcursor%5D=eyJhZnRlciI6IkFRQUFBWUFkTDlKNG1jT2g2QUFBQUFCQldVRmtUQzFPUzBGQlFucExkREpLZFZOYVlrTjNRVUkifQ&page%5Blimit%5D=2"}}'
31+
headers:
32+
content-type:
33+
- application/json
34+
status:
35+
code: 200
36+
message: OK
37+
version: 1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2022-04-12T10:04:40.820Z

0 commit comments

Comments
 (0)