Skip to content

Commit 4cac52a

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 152f19fb of spec repo
1 parent fb5d15b commit 4cac52a

File tree

7 files changed

+37
-27
lines changed

7 files changed

+37
-27
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.5",
7-
"regenerated": "2023-07-04 16:12:29.169633",
8-
"spec_repo_commit": "dcb95a4a"
7+
"regenerated": "2023-07-05 21:06:44.940149",
8+
"spec_repo_commit": "152f19fb"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.5",
12-
"regenerated": "2023-07-04 16:12:29.188201",
13-
"spec_repo_commit": "dcb95a4a"
12+
"regenerated": "2023-07-05 21:06:45.004967",
13+
"spec_repo_commit": "152f19fb"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21255,15 +21255,20 @@ paths:
2125521255
required: false
2125621256
schema:
2125721257
type: string
21258-
- description: 'For customers with multiple indexes, the indexes to search
21258+
- description: 'For customers with multiple indexes, the indexes to search.
2125921259

2126021260
Defaults to ''*'' which means all indexes'
21261-
example: main
21261+
example:
21262+
- main
21263+
- web
2126221264
in: query
21263-
name: filter[index]
21265+
name: filter[indexes]
2126421266
required: false
2126521267
schema:
21266-
type: string
21268+
items:
21269+
description: The name of a log index.
21270+
type: string
21271+
type: array
2126721272
- description: Minimum timestamp for requested logs.
2126821273
example: '2019-01-02T09:42:36.320Z'
2126921274
in: query

examples/v2/logs/ListLogsGet_2034110533.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@
1212
api_instance = LogsApi(api_client)
1313
response = api_instance.list_logs_get(
1414
filter_query="datadog-agent",
15-
filter_index="main",
15+
filter_indexes=[
16+
"main",
17+
],
1618
filter_from=datetime(2020, 9, 17, 11, 48, 36, tzinfo=tzoffset(None, 3600)),
1719
filter_to=datetime(2020, 9, 17, 12, 48, 36, tzinfo=tzoffset(None, 3600)),
1820
page_limit=5,

src/datadog_api_client/v2/api/logs_api.py

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from __future__ import annotations
55

66
import collections
7-
from typing import Any, Dict, Union
7+
from typing import Any, Dict, List, Union
88

99
from datadog_api_client.api_client import ApiClient, Endpoint as _Endpoint
1010
from datadog_api_client.configuration import Configuration
@@ -90,10 +90,11 @@ def __init__(self, api_client=None):
9090
"attribute": "filter[query]",
9191
"location": "query",
9292
},
93-
"filter_index": {
94-
"openapi_types": (str,),
95-
"attribute": "filter[index]",
93+
"filter_indexes": {
94+
"openapi_types": ([str],),
95+
"attribute": "filter[indexes]",
9696
"location": "query",
97+
"collection_format": "multi",
9798
},
9899
"filter_from": {
99100
"openapi_types": (datetime,),
@@ -294,7 +295,7 @@ def list_logs_get(
294295
self,
295296
*,
296297
filter_query: Union[str, UnsetType] = unset,
297-
filter_index: Union[str, UnsetType] = unset,
298+
filter_indexes: Union[List[str], UnsetType] = unset,
298299
filter_from: Union[datetime, UnsetType] = unset,
299300
filter_to: Union[datetime, UnsetType] = unset,
300301
filter_storage_tier: Union[LogsStorageTier, UnsetType] = unset,
@@ -315,9 +316,9 @@ def list_logs_get(
315316
316317
:param filter_query: Search query following logs syntax.
317318
:type filter_query: str, optional
318-
:param filter_index: For customers with multiple indexes, the indexes to search
319+
:param filter_indexes: For customers with multiple indexes, the indexes to search.
319320
Defaults to '*' which means all indexes
320-
:type filter_index: str, optional
321+
:type filter_indexes: [str], optional
321322
:param filter_from: Minimum timestamp for requested logs.
322323
:type filter_from: datetime, optional
323324
:param filter_to: Maximum timestamp for requested logs.
@@ -336,8 +337,8 @@ def list_logs_get(
336337
if filter_query is not unset:
337338
kwargs["filter_query"] = filter_query
338339

339-
if filter_index is not unset:
340-
kwargs["filter_index"] = filter_index
340+
if filter_indexes is not unset:
341+
kwargs["filter_indexes"] = filter_indexes
341342

342343
if filter_from is not unset:
343344
kwargs["filter_from"] = filter_from
@@ -363,7 +364,7 @@ def list_logs_get_with_pagination(
363364
self,
364365
*,
365366
filter_query: Union[str, UnsetType] = unset,
366-
filter_index: Union[str, UnsetType] = unset,
367+
filter_indexes: Union[List[str], UnsetType] = unset,
367368
filter_from: Union[datetime, UnsetType] = unset,
368369
filter_to: Union[datetime, UnsetType] = unset,
369370
filter_storage_tier: Union[LogsStorageTier, UnsetType] = unset,
@@ -377,9 +378,9 @@ def list_logs_get_with_pagination(
377378
378379
:param filter_query: Search query following logs syntax.
379380
:type filter_query: str, optional
380-
:param filter_index: For customers with multiple indexes, the indexes to search
381+
:param filter_indexes: For customers with multiple indexes, the indexes to search.
381382
Defaults to '*' which means all indexes
382-
:type filter_index: str, optional
383+
:type filter_indexes: [str], optional
383384
:param filter_from: Minimum timestamp for requested logs.
384385
:type filter_from: datetime, optional
385386
:param filter_to: Maximum timestamp for requested logs.
@@ -400,8 +401,8 @@ def list_logs_get_with_pagination(
400401
if filter_query is not unset:
401402
kwargs["filter_query"] = filter_query
402403

403-
if filter_index is not unset:
404-
kwargs["filter_index"] = filter_index
404+
if filter_indexes is not unset:
405+
kwargs["filter_indexes"] = filter_indexes
405406

406407
if filter_from is not unset:
407408
kwargs["filter_from"] = filter_from
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2022-01-06T00:51:50.622Z
1+
2023-07-05T20:27:06.820Z

tests/v2/cassettes/test_scenarios/test_get_a_quick_list_of_logs_returns_ok_response.yaml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@ interactions:
55
accept:
66
- application/json
77
method: GET
8-
uri: https://api.datadoghq.com/api/v2/logs/events?filter%5Bquery%5D=datadog-agent&filter%5Bindex%5D=main&filter%5Bfrom%5D=2020-09-17T11%3A48%3A36%2B01%3A00&filter%5Bto%5D=2020-09-17T12%3A48%3A36%2B01%3A00&page%5Blimit%5D=5
8+
uri: https://api.datadoghq.com/api/v2/logs/events?filter%5Bquery%5D=datadog-agent&filter%5Bindexes%5D=main&filter%5Bfrom%5D=2020-09-17T11%3A48%3A36%2B01%3A00&filter%5Bto%5D=2020-09-17T12%3A48%3A36%2B01%3A00&page%5Blimit%5D=5
99
response:
1010
body:
11-
string: '{"data":[]}'
11+
string: '{"data":[],"meta":{"elapsed":0,"request_id":"pddv1ChZVZjdFSUNKdlM3LVBKNXNPcjR6R1hnIiwKHP4qJC1KWavJCGIvcezlUg3AhhLxU4JfitQ_QFESDFVjhmcEEEIN8NN7KA","status":"done"}}
12+
13+
'
1214
headers:
1315
content-type:
1416
- application/json

tests/v2/features/logs.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ Feature: Logs
6969
Given a valid "appKeyAuth" key in the system
7070
And new "ListLogsGet" request
7171
And request contains "filter[query]" parameter with value "datadog-agent"
72-
And request contains "filter[index]" parameter with value "main"
72+
And request contains "filter[indexes]" parameter with value ["main"]
7373
And request contains "filter[from]" parameter with value "2020-09-17T11:48:36+01:00"
7474
And request contains "filter[to]" parameter with value "2020-09-17T12:48:36+01:00"
7575
And request contains "page[limit]" parameter with value 5

0 commit comments

Comments
 (0)