Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 25 additions & 3 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -783,6 +783,27 @@ components:
required: false
schema:
type: string
NDMPageNumber:
description: Specific page number to return. Defaults to 0.
in: query
name: page[number]
required: false
schema:
default: 0
example: 0
format: int64
type: integer
NDMPageSize:
description: Size for a given page. The maximum allowed value is 500. Defaults
to 50.
in: query
name: page[size]
required: false
schema:
default: 50
example: 50
format: int64
type: integer
NotificationRuleIDPathParameter:
description: Notification Rule UUID
example: e555e290-ed65-49bd-ae18-8acbfcf18db7
Expand Down Expand Up @@ -85569,14 +85590,15 @@ paths:
description: Get the list of devices.
operationId: ListDevices
parameters:
- $ref: '#/components/parameters/PageSize'
- $ref: '#/components/parameters/PageNumber'
- description: The field to sort the devices by.
- $ref: '#/components/parameters/NDMPageSize'
- $ref: '#/components/parameters/NDMPageNumber'
- description: The field to sort the devices by. Defaults to `name`.
example: status
in: query
name: sort
required: false
schema:
default: name
type: string
- description: Filter devices by tag.
example: status:ok
Expand Down
14 changes: 7 additions & 7 deletions src/datadog_api_client/v2/api/network_device_monitoring_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,11 +221,11 @@ def list_devices(

Get the list of devices.

:param page_size: Size for a given page. The maximum allowed value is 100.
:param page_size: Size for a given page. The maximum allowed value is 500. Defaults to 50.
:type page_size: int, optional
:param page_number: Specific page number to return.
:param page_number: Specific page number to return. Defaults to 0.
:type page_number: int, optional
:param sort: The field to sort the devices by.
:param sort: The field to sort the devices by. Defaults to ``name``.
:type sort: str, optional
:param filter_tag: Filter devices by tag.
:type filter_tag: str, optional
Expand Down Expand Up @@ -258,11 +258,11 @@ def list_devices_with_pagination(

Provide a paginated version of :meth:`list_devices`, returning all items.

:param page_size: Size for a given page. The maximum allowed value is 100.
:param page_size: Size for a given page. The maximum allowed value is 500. Defaults to 50.
:type page_size: int, optional
:param page_number: Specific page number to return.
:param page_number: Specific page number to return. Defaults to 0.
:type page_number: int, optional
:param sort: The field to sort the devices by.
:param sort: The field to sort the devices by. Defaults to ``name``.
:type sort: str, optional
:param filter_tag: Filter devices by tag.
:type filter_tag: str, optional
Expand All @@ -283,7 +283,7 @@ def list_devices_with_pagination(
if filter_tag is not unset:
kwargs["filter_tag"] = filter_tag

local_page_size = get_attribute_from_path(kwargs, "page_size", 10)
local_page_size = get_attribute_from_path(kwargs, "page_size", 50)
endpoint = self._list_devices_endpoint
set_attribute_from_path(kwargs, "page_size", local_page_size, endpoint.params_map)
pagination = {
Expand Down
Loading