Skip to content

Commit ce341ce

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add default values for NDM ListDevices endpoint parameters (#3170)
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
1 parent 926ff5f commit ce341ce

File tree

2 files changed

+32
-10
lines changed

2 files changed

+32
-10
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -783,6 +783,27 @@ components:
783783
required: false
784784
schema:
785785
type: string
786+
NDMPageNumber:
787+
description: Specific page number to return. Defaults to 0.
788+
in: query
789+
name: page[number]
790+
required: false
791+
schema:
792+
default: 0
793+
example: 0
794+
format: int64
795+
type: integer
796+
NDMPageSize:
797+
description: Size for a given page. The maximum allowed value is 500. Defaults
798+
to 50.
799+
in: query
800+
name: page[size]
801+
required: false
802+
schema:
803+
default: 50
804+
example: 50
805+
format: int64
806+
type: integer
786807
NotificationRuleIDPathParameter:
787808
description: Notification Rule UUID
788809
example: e555e290-ed65-49bd-ae18-8acbfcf18db7
@@ -86135,14 +86156,15 @@ paths:
8613586156
description: Get the list of devices.
8613686157
operationId: ListDevices
8613786158
parameters:
86138-
- $ref: '#/components/parameters/PageSize'
86139-
- $ref: '#/components/parameters/PageNumber'
86140-
- description: The field to sort the devices by.
86159+
- $ref: '#/components/parameters/NDMPageSize'
86160+
- $ref: '#/components/parameters/NDMPageNumber'
86161+
- description: The field to sort the devices by. Defaults to `name`.
8614186162
example: status
8614286163
in: query
8614386164
name: sort
8614486165
required: false
8614586166
schema:
86167+
default: name
8614686168
type: string
8614786169
- description: Filter devices by tag.
8614886170
example: status:ok

src/datadog_api_client/v2/api/network_device_monitoring_api.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -221,11 +221,11 @@ def list_devices(
221221
222222
Get the list of devices.
223223
224-
:param page_size: Size for a given page. The maximum allowed value is 100.
224+
:param page_size: Size for a given page. The maximum allowed value is 500. Defaults to 50.
225225
:type page_size: int, optional
226-
:param page_number: Specific page number to return.
226+
:param page_number: Specific page number to return. Defaults to 0.
227227
:type page_number: int, optional
228-
:param sort: The field to sort the devices by.
228+
:param sort: The field to sort the devices by. Defaults to ``name``.
229229
:type sort: str, optional
230230
:param filter_tag: Filter devices by tag.
231231
:type filter_tag: str, optional
@@ -258,11 +258,11 @@ def list_devices_with_pagination(
258258
259259
Provide a paginated version of :meth:`list_devices`, returning all items.
260260
261-
:param page_size: Size for a given page. The maximum allowed value is 100.
261+
:param page_size: Size for a given page. The maximum allowed value is 500. Defaults to 50.
262262
:type page_size: int, optional
263-
:param page_number: Specific page number to return.
263+
:param page_number: Specific page number to return. Defaults to 0.
264264
:type page_number: int, optional
265-
:param sort: The field to sort the devices by.
265+
:param sort: The field to sort the devices by. Defaults to ``name``.
266266
:type sort: str, optional
267267
:param filter_tag: Filter devices by tag.
268268
:type filter_tag: str, optional
@@ -283,7 +283,7 @@ def list_devices_with_pagination(
283283
if filter_tag is not unset:
284284
kwargs["filter_tag"] = filter_tag
285285

286-
local_page_size = get_attribute_from_path(kwargs, "page_size", 10)
286+
local_page_size = get_attribute_from_path(kwargs, "page_size", 50)
287287
endpoint = self._list_devices_endpoint
288288
set_attribute_from_path(kwargs, "page_size", local_page_size, endpoint.params_map)
289289
pagination = {

0 commit comments

Comments
 (0)