Skip to content

Commit 5658e9c

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 50c16e5f of spec repo
1 parent 0a91af4 commit 5658e9c

File tree

9 files changed

+124
-38
lines changed

9 files changed

+124
-38
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.6",
7-
"regenerated": "2025-01-02 17:32:11.649371",
8-
"spec_repo_commit": "733cf3ea"
7+
"regenerated": "2025-01-03 15:57:09.265800",
8+
"spec_repo_commit": "50c16e5f"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.6",
12-
"regenerated": "2025-01-02 17:32:11.666424",
13-
"spec_repo_commit": "733cf3ea"
12+
"regenerated": "2025-01-03 15:57:09.282748",
13+
"spec_repo_commit": "50c16e5f"
1414
}
1515
}
1616
}

.generator/schemas/v2/openapi.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38621,7 +38621,7 @@ paths:
3862138621
[Results are paginated][1].
3862238622

3862338623

38624-
Use this endpoint to see your latest logs.
38624+
Use this endpoint to search and filter your logs.
3862538625

3862638626

3862738627
**If you are considering archiving logs for your organization,
@@ -38718,7 +38718,7 @@ paths:
3871838718
$ref: '#/components/responses/NotAuthorizedResponse'
3871938719
'429':
3872038720
$ref: '#/components/responses/TooManyRequestsResponse'
38721-
summary: Get a list of logs
38721+
summary: Search logs (GET)
3872238722
tags:
3872338723
- Logs
3872438724
x-pagination:
@@ -38737,7 +38737,7 @@ paths:
3873738737
[Results are paginated][1].
3873838738

3873938739

38740-
Use this endpoint to build complex logs filtering and search.
38740+
Use this endpoint to search and filter your logs.
3874138741

3874238742

3874338743
**If you are considering archiving logs for your organization,
@@ -38770,7 +38770,7 @@ paths:
3877038770
$ref: '#/components/responses/NotAuthorizedResponse'
3877138771
'429':
3877238772
$ref: '#/components/responses/TooManyRequestsResponse'
38773-
summary: Search logs
38773+
summary: Search logs (POST)
3877438774
tags:
3877538775
- Logs
3877638776
x-codegen-request-body-name: body

examples/v2/logs/ListLogs.rb

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,27 @@
1-
# Search logs returns "OK" response
1+
# Search logs (POST) returns "OK" response
22

33
require "datadog_api_client"
44
api_instance = DatadogAPIClient::V2::LogsAPI.new
55

66
body = DatadogAPIClient::V2::LogsListRequest.new({
77
filter: DatadogAPIClient::V2::LogsQueryFilter.new({
8-
query: "datadog-agent",
8+
from: "now-15m",
99
indexes: [
1010
"main",
11+
"web",
1112
],
12-
from: "2020-09-17T11:48:36+01:00",
13-
to: "2020-09-17T12:48:36+01:00",
13+
query: "service:web* AND @http.status_code:[200 TO 299]",
14+
storage_tier: DatadogAPIClient::V2::LogsStorageTier::INDEXES,
15+
to: "now",
16+
}),
17+
options: DatadogAPIClient::V2::LogsQueryOptions.new({
18+
timezone: "GMT",
1419
}),
15-
sort: DatadogAPIClient::V2::LogsSort::TIMESTAMP_ASCENDING,
1620
page: DatadogAPIClient::V2::LogsListRequestPage.new({
17-
limit: 5,
21+
cursor: "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==",
22+
limit: 25,
1823
}),
24+
sort: DatadogAPIClient::V2::LogsSort::TIMESTAMP_ASCENDING,
1925
})
2026
opts = {
2127
body: body,

examples/v2/logs/ListLogsGet.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Get a list of logs returns "OK" response
1+
# Search logs (GET) returns "OK" response
22

33
require "datadog_api_client"
44
api_instance = DatadogAPIClient::V2::LogsAPI.new
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Search logs (GET) returns "OK" response with pagination
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::LogsAPI.new
5+
api_instance.list_logs_get_with_pagination() { |item| puts item }
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Search logs returns "OK" response
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::LogsAPI.new
5+
6+
body = DatadogAPIClient::V2::LogsListRequest.new({
7+
filter: DatadogAPIClient::V2::LogsQueryFilter.new({
8+
query: "datadog-agent",
9+
indexes: [
10+
"main",
11+
],
12+
from: "2020-09-17T11:48:36+01:00",
13+
to: "2020-09-17T12:48:36+01:00",
14+
}),
15+
sort: DatadogAPIClient::V2::LogsSort::TIMESTAMP_ASCENDING,
16+
page: DatadogAPIClient::V2::LogsListRequestPage.new({
17+
limit: 5,
18+
}),
19+
})
20+
opts = {
21+
body: body,
22+
}
23+
p api_instance.list_logs(opts)
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Search logs (POST) returns "OK" response with pagination
2+
3+
require "datadog_api_client"
4+
api_instance = DatadogAPIClient::V2::LogsAPI.new
5+
6+
body = DatadogAPIClient::V2::LogsListRequest.new({
7+
filter: DatadogAPIClient::V2::LogsQueryFilter.new({
8+
from: "now-15m",
9+
indexes: [
10+
"main",
11+
"web",
12+
],
13+
query: "service:web* AND @http.status_code:[200 TO 299]",
14+
storage_tier: DatadogAPIClient::V2::LogsStorageTier::INDEXES,
15+
to: "now",
16+
}),
17+
options: DatadogAPIClient::V2::LogsQueryOptions.new({
18+
timezone: "GMT",
19+
}),
20+
page: DatadogAPIClient::V2::LogsListRequestPage.new({
21+
cursor: "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==",
22+
limit: 25,
23+
}),
24+
sort: DatadogAPIClient::V2::LogsSort::TIMESTAMP_ASCENDING,
25+
})
26+
opts = {
27+
body: body,
28+
}
29+
api_instance.list_logs_with_pagination(opts) { |item| puts item }

features/v2/logs.feature

Lines changed: 38 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -43,20 +43,6 @@ Feature: Logs
4343
Then the response status is 200 OK
4444
And the response "meta.status" is equal to "done"
4545

46-
@generated @skip @team:DataDog/logs-app
47-
Scenario: Get a list of logs returns "Bad Request" response
48-
Given a valid "appKeyAuth" key in the system
49-
And new "ListLogsGet" request
50-
When the request is sent
51-
Then the response status is 400 Bad Request
52-
53-
@generated @skip @team:DataDog/logs-app
54-
Scenario: Get a list of logs returns "OK" response
55-
Given a valid "appKeyAuth" key in the system
56-
And new "ListLogsGet" request
57-
When the request is sent
58-
Then the response status is 200 OK
59-
6046
@replay-only @skip-validation @team:DataDog/logs-app @with-pagination
6147
Scenario: Get a list of logs returns "OK" response with pagination
6248
Given a valid "appKeyAuth" key in the system
@@ -80,13 +66,50 @@ Feature: Logs
8066
And the response "data" has length 0
8167

8268
@generated @skip @team:DataDog/logs-app
83-
Scenario: Search logs returns "Bad Request" response
69+
Scenario: Search logs (GET) returns "Bad Request" response
70+
Given a valid "appKeyAuth" key in the system
71+
And new "ListLogsGet" request
72+
When the request is sent
73+
Then the response status is 400 Bad Request
74+
75+
@generated @skip @team:DataDog/logs-app
76+
Scenario: Search logs (GET) returns "OK" response
77+
Given a valid "appKeyAuth" key in the system
78+
And new "ListLogsGet" request
79+
When the request is sent
80+
Then the response status is 200 OK
81+
82+
@generated @skip @team:DataDog/logs-app @with-pagination
83+
Scenario: Search logs (GET) returns "OK" response with pagination
84+
Given a valid "appKeyAuth" key in the system
85+
And new "ListLogsGet" request
86+
When the request with pagination is sent
87+
Then the response status is 200 OK
88+
89+
@generated @skip @team:DataDog/logs-app
90+
Scenario: Search logs (POST) returns "Bad Request" response
8491
Given a valid "appKeyAuth" key in the system
8592
And new "ListLogs" request
8693
And body with value {"filter": {"from": "now-15m", "indexes": ["main", "web"], "query": "service:web* AND @http.status_code:[200 TO 299]", "storage_tier": "indexes", "to": "now"}, "options": {"timezone": "GMT"}, "page": {"cursor": "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==", "limit": 25}, "sort": "timestamp"}
8794
When the request is sent
8895
Then the response status is 400 Bad Request
8996

97+
@generated @skip @team:DataDog/logs-app
98+
Scenario: Search logs (POST) returns "OK" response
99+
Given a valid "appKeyAuth" key in the system
100+
And new "ListLogs" request
101+
And body with value {"filter": {"from": "now-15m", "indexes": ["main", "web"], "query": "service:web* AND @http.status_code:[200 TO 299]", "storage_tier": "indexes", "to": "now"}, "options": {"timezone": "GMT"}, "page": {"cursor": "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==", "limit": 25}, "sort": "timestamp"}
102+
When the request is sent
103+
Then the response status is 200 OK
104+
105+
@generated @skip @team:DataDog/logs-app @with-pagination
106+
Scenario: Search logs (POST) returns "OK" response with pagination
107+
Given a valid "appKeyAuth" key in the system
108+
And new "ListLogs" request
109+
And body with value {"filter": {"from": "now-15m", "indexes": ["main", "web"], "query": "service:web* AND @http.status_code:[200 TO 299]", "storage_tier": "indexes", "to": "now"}, "options": {"timezone": "GMT"}, "page": {"cursor": "eyJzdGFydEF0IjoiQVFBQUFYS2tMS3pPbm40NGV3QUFBQUJCV0V0clRFdDZVbG8zY3pCRmNsbHJiVmxDWlEifQ==", "limit": 25}, "sort": "timestamp"}
110+
When the request with pagination is sent
111+
Then the response status is 200 OK
112+
90113
@team:DataDog/logs-app
91114
Scenario: Search logs returns "OK" response
92115
Given a valid "appKeyAuth" key in the system

lib/datadog_api_client/v2/api/logs_api.rb

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -90,20 +90,20 @@ def aggregate_logs_with_http_info(body, opts = {})
9090
return data, status_code, headers
9191
end
9292

93-
# Search logs.
93+
# Search logs (POST).
9494
#
9595
# @see #list_logs_with_http_info
9696
def list_logs(opts = {})
9797
data, _status_code, _headers = list_logs_with_http_info(opts)
9898
data
9999
end
100100

101-
# Search logs.
101+
# Search logs (POST).
102102
#
103103
# List endpoint returns logs that match a log search query.
104104
# [Results are paginated][1].
105105
#
106-
# Use this endpoint to build complex logs filtering and search.
106+
# Use this endpoint to search and filter your logs.
107107
#
108108
# **If you are considering archiving logs for your organization,
109109
# consider use of the Datadog archive capabilities instead of the log list API.
@@ -163,7 +163,7 @@ def list_logs_with_http_info(opts = {})
163163
return data, status_code, headers
164164
end
165165

166-
# Search logs.
166+
# Search logs (POST).
167167
#
168168
# Provide a paginated version of {#list_logs}, returning all items.
169169
#
@@ -184,20 +184,20 @@ def list_logs_with_pagination(opts = {})
184184
end
185185
end
186186

187-
# Get a list of logs.
187+
# Search logs (GET).
188188
#
189189
# @see #list_logs_get_with_http_info
190190
def list_logs_get(opts = {})
191191
data, _status_code, _headers = list_logs_get_with_http_info(opts)
192192
data
193193
end
194194

195-
# Get a list of logs.
195+
# Search logs (GET).
196196
#
197197
# List endpoint returns logs that match a log search query.
198198
# [Results are paginated][1].
199199
#
200-
# Use this endpoint to see your latest logs.
200+
# Use this endpoint to search and filter your logs.
201201
#
202202
# **If you are considering archiving logs for your organization,
203203
# consider use of the Datadog archive capabilities instead of the log list API.
@@ -281,7 +281,7 @@ def list_logs_get_with_http_info(opts = {})
281281
return data, status_code, headers
282282
end
283283

284-
# Get a list of logs.
284+
# Search logs (GET).
285285
#
286286
# Provide a paginated version of {#list_logs_get}, returning all items.
287287
#

0 commit comments

Comments
 (0)