From 48e3de82dd9f03adaefaa76277d2de3e9692e061 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Mon, 12 Oct 2026 13:07:22 +0000 Subject: [PATCH] Regenerate client from commit 1ee8c19 of spec repo --- .generator/schemas/v2/openapi.yaml | 171 +++++++++++++++++- src/datadog_api_client/v2/api/rum_api.py | 141 ++++++++++++++- .../v2/model/js_sourcemap_attributes.py | 9 + .../v2/model/sourcemap_search_by.py | 35 ++++ .../v2/model/sourcemaps_list_meta_page.py | 20 +- src/datadog_api_client/v2/models/__init__.py | 2 + 6 files changed, 357 insertions(+), 21 deletions(-) create mode 100644 src/datadog_api_client/v2/model/sourcemap_search_by.py diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 91955c670c..d086bab5d0 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -65561,6 +65561,12 @@ components: example: "2024-01-01T00:00:00Z" format: date-time type: string + debug_id: + description: |- + The debug identifier (UUID format) that uniquely identifies this + JavaScript source map. Returned for source maps indexed by debug ID. + example: 00000000-0000-4000-8000-000000000001 + type: string domain: description: The domain associated with the source map. example: example.com @@ -120829,6 +120835,14 @@ components: - ELF - NDK - IL2CPP + SourcemapSearchBy: + description: The search mode for listing JavaScript source maps. + enum: + - debug_id + example: debug_id + type: string + x-enum-varnames: + - DEBUG_ID SourcemapsData: description: List of source map data objects. items: @@ -120849,8 +120863,17 @@ components: description: Whether there are more results available beyond the current page. example: false type: boolean + next_cursor: + description: |- + Cursor for the next page of a JavaScript cursor-based listing. Pass + this value as `page[after]` with the same search mode and filters. + Only returned when another page is available. + type: string total_filtered_count: - description: Total number of source maps matching the filter criteria. + description: |- + Total number of matching source maps for legacy page-number pagination. + Cursor-based listings do not compute a total; this field may be zero + even when records are returned. Use `has_more_results` to continue. example: 100 format: int64 type: integer @@ -231547,33 +231570,140 @@ paths: If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/sourcemaps/list: get: - description: Retrieves a paginated list of source maps matching the specified filter criteria. + description: |- + Retrieves a paginated list of source maps. Send filters as query parameters, + not in a JSON request body. `mapkind` defaults to `js`. + + For JavaScript source maps, choose one of the three request shapes below. + + **Examples:** the following commands use the US1 API host. Replace the host with + the API host for your site, and the service, version, debug ID, and cursor with + values from your organization. Use `--get` so curl sends the filters in the query + string; `-X GET` with `--data-urlencode` sends them in the request body instead. + + **1. List by service and version** + + Provide both `filter[service]` and `filter[version]` to search source maps + indexed by service and version. Omit `search_by`. + + **Pagination:** prefer cursor pagination. Omit `page[after]` and `page[number]` + on the first request. To get the next page, pass `meta.page.next_cursor` as + `page[after]`, keeping the same filters. Continue until + `meta.page.has_more_results` is `false`. Do not decode or modify the cursor. + Legacy page-number pagination is also supported, starting at `page[number]=1`. + + ```bash + curl -sS --get "https://api.datadoghq.com/api/v2/sourcemaps/list" \ + -H "Accept: application/json" \ + -H "Authorization: Bearer ${DD_BEARER_TOKEN}" \ + --data-urlencode "mapkind=js" \ + --data-urlencode "filter[service]=my-web-service" \ + --data-urlencode "filter[version]=1.0.0" \ + --data-urlencode "page[size]=10" + ``` + + **2. Find a specific JavaScript debug ID** + + Provide `filter[debug_id]` with a UUID. Service and version filters are not + required. Omit `search_by`. + + **Pagination:** the lookup returns at most one result, so no pagination is + needed. `page[after]` is not supported. + + ```bash + curl -sS --get "https://api.datadoghq.com/api/v2/sourcemaps/list" \ + -H "Accept: application/json" \ + -H "Authorization: Bearer ${DD_BEARER_TOKEN}" \ + --data-urlencode "mapkind=js" \ + --data-urlencode "filter[debug_id]=00000000-0000-4000-8000-000000000001" + ``` + + **3. Browse source maps indexed by debug ID** + + Set `search_by=debug_id` without specifying a debug ID. Do not send service, + version, or filename filters in this mode. + + **Pagination:** this mode requires cursor pagination; `page[number]` is not + supported. Omit `page[after]` on the first request. To get the next page, pass + `meta.page.next_cursor` as `page[after]`, keeping the same search mode and + filters. Continue until `meta.page.has_more_results` is `false`. Do not decode + or modify the cursor. + + First page: + + ```bash + curl -sS --get "https://api.datadoghq.com/api/v2/sourcemaps/list" \ + -H "Accept: application/json" \ + -H "Authorization: Bearer ${DD_BEARER_TOKEN}" \ + --data-urlencode "mapkind=js" \ + --data-urlencode "search_by=debug_id" \ + --data-urlencode "page[size]=10" + ``` + + Next page: + + ```bash + curl -sS --get "https://api.datadoghq.com/api/v2/sourcemaps/list" \ + -H "Accept: application/json" \ + -H "Authorization: Bearer ${DD_BEARER_TOKEN}" \ + --data-urlencode "mapkind=js" \ + --data-urlencode "search_by=debug_id" \ + --data-urlencode "page[size]=10" \ + --data-urlencode "page[after]=" + ``` + + For other map kinds, use `page[number]`, starting at 1. operationId: ListSourcemaps parameters: + - description: |- + Set to `debug_id` to browse JavaScript source maps indexed by debug ID. + Only supported for `mapkind=js`. Omit for service/version searches or a + specific `filter[debug_id]` lookup. In debug-ID browse mode, service, + version, and filename filters are not supported. + example: debug_id + in: query + name: search_by + schema: + $ref: "#/components/schemas/SourcemapSearchBy" + x-docs-curl-required: true - description: The type of source map. Defaults to `js`. in: query name: mapkind schema: $ref: "#/components/schemas/SourcemapMapKind" - - description: The number of results to return per page. Must be at least 1. + - description: |- + Cursor for the next page of a JavaScript listing. Use the value from + `meta.page.next_cursor` and keep the same search mode and filters. + Omit on the first request. Not supported for other map kinds or for + a specific `filter[debug_id]` lookup without `search_by=debug_id`. + in: query + name: page[after] + schema: + type: string + - description: The number of results per page. Defaults to 100. Must be at least 1; values above 1000 are capped at 1000. in: query name: page[size] schema: - default: 20 - example: 20 + default: 100 + example: 10 format: int64 + minimum: 1 type: integer - - description: The page number to retrieve, starting from 1. + - description: |- + Legacy page number, starting from 1. Prefer `page[after]` for JavaScript + listings. Not supported with `search_by=debug_id`. Other map kinds + default to page 1 when pagination parameters are omitted. in: query name: page[number] schema: - default: 1 example: 1 format: int64 + minimum: 1 type: integer - description: |- Filter by service names (multiple values allowed). Required for - `js`, `jvm`, `react`, and `flutter` map kinds. + `jvm`, `react`, and `flutter` map kinds. Also required for `js` unless + searching by `filter[debug_id]` or browsing with `search_by=debug_id`. explode: true in: query name: filter[service] @@ -231586,7 +231716,8 @@ paths: style: form - description: |- Filter by version values (multiple values allowed). Required for - `js`, `jvm`, `react`, and `flutter` map kinds. + `jvm`, `react`, and `flutter` map kinds. Also required for `js` unless + searching by `filter[debug_id]` or browsing with `search_by=debug_id`. explode: true in: query name: filter[version] @@ -231703,10 +231834,14 @@ paths: name: filter[filename] schema: type: string - - description: Filter by debug ID (single value). Supported for `react`. + - description: |- + Filter by a single debug ID in UUID format. Supported for `js` and `react`. + For `js`, the lookup returns at most one result and does not require + service/version filters. For `react`, service/version filters remain required. in: query name: filter[debug_id] schema: + format: uuid type: string - description: Filter by GNU build ID (single value). Supported for `elf`. in: query @@ -231728,6 +231863,22 @@ paths: content: application/json: examples: + debug_id_listing: + summary: Browse JavaScript source maps by debug ID + value: + data: + - attributes: + created_at: "2024-01-01T00:00:00Z" + debug_id: 00000000-0000-4000-8000-000000000001 + mapkind: js + size: 1024 + id: "7" + type: sourcemaps + meta: + page: + has_more_results: true + next_cursor: opaque-debug-id-cursor + total_filtered_count: 0 default: value: data: diff --git a/src/datadog_api_client/v2/api/rum_api.py b/src/datadog_api_client/v2/api/rum_api.py index df66f8482b..8543f1c4c8 100644 --- a/src/datadog_api_client/v2/api/rum_api.py +++ b/src/datadog_api_client/v2/api/rum_api.py @@ -14,6 +14,7 @@ get_attribute_from_path, UnsetType, unset, + UUID, ) from datadog_api_client.v2.model.rum_analytics_aggregate_response import RUMAnalyticsAggregateResponse from datadog_api_client.v2.model.rum_aggregate_request import RUMAggregateRequest @@ -29,6 +30,7 @@ from datadog_api_client.v2.model.sourcemap_map_kind import SourcemapMapKind from datadog_api_client.v2.model.sourcemap_file_response import SourcemapFileResponse from datadog_api_client.v2.model.list_sourcemaps_response import ListSourcemapsResponse +from datadog_api_client.v2.model.sourcemap_search_by import SourcemapSearchBy from datadog_api_client.v2.model.service_repository_info_response import ServiceRepositoryInfoResponse from datadog_api_client.v2.model.service_repository_info_request import ServiceRepositoryInfoRequest @@ -392,17 +394,33 @@ def __init__(self, api_client=None): "version": "v2", }, params_map={ + "search_by": { + "openapi_types": (SourcemapSearchBy,), + "attribute": "search_by", + "location": "query", + }, "mapkind": { "openapi_types": (SourcemapMapKind,), "attribute": "mapkind", "location": "query", }, + "page_after": { + "openapi_types": (str,), + "attribute": "page[after]", + "location": "query", + }, "page_size": { + "validation": { + "inclusive_minimum": 1, + }, "openapi_types": (int,), "attribute": "page[size]", "location": "query", }, "page_number": { + "validation": { + "inclusive_minimum": 1, + }, "openapi_types": (int,), "attribute": "page[number]", "location": "query", @@ -491,7 +509,7 @@ def __init__(self, api_client=None): "location": "query", }, "filter_debug_id": { - "openapi_types": (str,), + "openapi_types": (UUID,), "attribute": "filter[debug_id]", "location": "query", }, @@ -1073,7 +1091,9 @@ def list_rum_events_with_pagination( def list_sourcemaps( self, *, + search_by: Union[SourcemapSearchBy, UnsetType] = unset, mapkind: Union[SourcemapMapKind, UnsetType] = unset, + page_after: Union[str, UnsetType] = unset, page_size: Union[int, UnsetType] = unset, page_number: Union[int, UnsetType] = unset, filter_service: Union[List[str], UnsetType] = unset, @@ -1090,26 +1110,121 @@ def list_sourcemaps( filter_origin: Union[List[str], UnsetType] = unset, filter_origin_version: Union[List[str], UnsetType] = unset, filter_filename: Union[str, UnsetType] = unset, - filter_debug_id: Union[str, UnsetType] = unset, + filter_debug_id: Union[UUID, UnsetType] = unset, filter_gnu_build_id: Union[str, UnsetType] = unset, filter_go_build_id: Union[str, UnsetType] = unset, filter_file_hash: Union[str, UnsetType] = unset, ) -> ListSourcemapsResponse: """List source maps. - Retrieves a paginated list of source maps matching the specified filter criteria. + Retrieves a paginated list of source maps. Send filters as query parameters, + not in a JSON request body. ``mapkind`` defaults to ``js``. + + For JavaScript source maps, choose one of the three request shapes below. + + **Examples:** the following commands use the US1 API host. Replace the host with + the API host for your site, and the service, version, debug ID, and cursor with + values from your organization. Use ``--get`` so curl sends the filters in the query + string; ``-X GET`` with ``--data-urlencode`` sends them in the request body instead. + + **1. List by service and version** + + Provide both ``filter[service]`` and ``filter[version]`` to search source maps + indexed by service and version. Omit ``search_by``. + + **Pagination:** prefer cursor pagination. Omit ``page[after]`` and ``page[number]`` + on the first request. To get the next page, pass ``meta.page.next_cursor`` as + ``page[after]`` , keeping the same filters. Continue until + ``meta.page.has_more_results`` is ``false``. Do not decode or modify the cursor. + Legacy page-number pagination is also supported, starting at ``page[number]=1``. + + .. code-block:: bash + + curl -sS --get "https://api.datadoghq.com/api/v2/sourcemaps/list" \ + -H "Accept: application/json" \ + -H "Authorization: Bearer ${DD_BEARER_TOKEN}" \ + --data-urlencode "mapkind=js" \ + --data-urlencode "filter[service]=my-web-service" \ + --data-urlencode "filter[version]=1.0.0" \ + --data-urlencode "page[size]=10" + + **2. Find a specific JavaScript debug ID** + + Provide ``filter[debug_id]`` with a UUID. Service and version filters are not + required. Omit ``search_by``. + **Pagination:** the lookup returns at most one result, so no pagination is + needed. ``page[after]`` is not supported. + + .. code-block:: bash + + curl -sS --get "https://api.datadoghq.com/api/v2/sourcemaps/list" \ + -H "Accept: application/json" \ + -H "Authorization: Bearer ${DD_BEARER_TOKEN}" \ + --data-urlencode "mapkind=js" \ + --data-urlencode "filter[debug_id]=00000000-0000-4000-8000-000000000001" + + **3. Browse source maps indexed by debug ID** + + Set ``search_by=debug_id`` without specifying a debug ID. Do not send service, + version, or filename filters in this mode. + + **Pagination:** this mode requires cursor pagination; ``page[number]`` is not + supported. Omit ``page[after]`` on the first request. To get the next page, pass + ``meta.page.next_cursor`` as ``page[after]`` , keeping the same search mode and + filters. Continue until ``meta.page.has_more_results`` is ``false``. Do not decode + or modify the cursor. + + First page: + + .. code-block:: bash + + curl -sS --get "https://api.datadoghq.com/api/v2/sourcemaps/list" \ + -H "Accept: application/json" \ + -H "Authorization: Bearer ${DD_BEARER_TOKEN}" \ + --data-urlencode "mapkind=js" \ + --data-urlencode "search_by=debug_id" \ + --data-urlencode "page[size]=10" + + Next page: + + .. code-block:: bash + + curl -sS --get "https://api.datadoghq.com/api/v2/sourcemaps/list" \ + -H "Accept: application/json" \ + -H "Authorization: Bearer ${DD_BEARER_TOKEN}" \ + --data-urlencode "mapkind=js" \ + --data-urlencode "search_by=debug_id" \ + --data-urlencode "page[size]=10" \ + --data-urlencode "page[after]=" + + For other map kinds, use ``page[number]`` , starting at 1. + + :param search_by: Set to ``debug_id`` to browse JavaScript source maps indexed by debug ID. + Only supported for ``mapkind=js``. Omit for service/version searches or a + specific ``filter[debug_id]`` lookup. In debug-ID browse mode, service, + version, and filename filters are not supported. + :type search_by: SourcemapSearchBy, optional :param mapkind: The type of source map. Defaults to ``js``. :type mapkind: SourcemapMapKind, optional - :param page_size: The number of results to return per page. Must be at least 1. + :param page_after: Cursor for the next page of a JavaScript listing. Use the value from + ``meta.page.next_cursor`` and keep the same search mode and filters. + Omit on the first request. Not supported for other map kinds or for + a specific ``filter[debug_id]`` lookup without ``search_by=debug_id``. + :type page_after: str, optional + :param page_size: The number of results per page. Defaults to 100. Must be at least 1; values above 1000 are capped at 1000. :type page_size: int, optional - :param page_number: The page number to retrieve, starting from 1. + :param page_number: Legacy page number, starting from 1. Prefer ``page[after]`` for JavaScript + listings. Not supported with ``search_by=debug_id``. Other map kinds + default to page 1 when pagination parameters are omitted. :type page_number: int, optional :param filter_service: Filter by service names (multiple values allowed). Required for - ``js`` , ``jvm`` , ``react`` , and ``flutter`` map kinds. + ``jvm`` , ``react`` , and ``flutter`` map kinds. Also required for ``js`` unless + searching by ``filter[debug_id]`` or browsing with ``search_by=debug_id``. :type filter_service: [str], optional :param filter_version: Filter by version values (multiple values allowed). Required for - ``js`` , ``jvm`` , ``react`` , and ``flutter`` map kinds. + ``jvm`` , ``react`` , and ``flutter`` map kinds. Also required for ``js`` unless + searching by ``filter[debug_id]`` or browsing with ``search_by=debug_id``. :type filter_version: [str], optional :param filter_variant: Filter by variant values (multiple values allowed). Supported for ``jvm``. :type filter_variant: [str], optional @@ -1136,8 +1251,10 @@ def list_sourcemaps( :type filter_origin_version: [str], optional :param filter_filename: Filter by filename (single value). Supported for ``js`` , ``elf`` , and ``ndk``. :type filter_filename: str, optional - :param filter_debug_id: Filter by debug ID (single value). Supported for ``react``. - :type filter_debug_id: str, optional + :param filter_debug_id: Filter by a single debug ID in UUID format. Supported for ``js`` and ``react``. + For ``js`` , the lookup returns at most one result and does not require + service/version filters. For ``react`` , service/version filters remain required. + :type filter_debug_id: UUID, optional :param filter_gnu_build_id: Filter by GNU build ID (single value). Supported for ``elf``. :type filter_gnu_build_id: str, optional :param filter_go_build_id: Filter by Go build ID (single value). Supported for ``elf``. @@ -1147,9 +1264,15 @@ def list_sourcemaps( :rtype: ListSourcemapsResponse """ kwargs: Dict[str, Any] = {} + if search_by is not unset: + kwargs["search_by"] = search_by + if mapkind is not unset: kwargs["mapkind"] = mapkind + if page_after is not unset: + kwargs["page_after"] = page_after + if page_size is not unset: kwargs["page_size"] = page_size diff --git a/src/datadog_api_client/v2/model/js_sourcemap_attributes.py b/src/datadog_api_client/v2/model/js_sourcemap_attributes.py index f10a500ac2..fefdcd1e0b 100644 --- a/src/datadog_api_client/v2/model/js_sourcemap_attributes.py +++ b/src/datadog_api_client/v2/model/js_sourcemap_attributes.py @@ -22,6 +22,7 @@ def openapi_types(_): "blob_storage_sourcemap_path": (str,), "build_id": (str,), "created_at": (datetime,), + "debug_id": (str,), "domain": (str,), "file_name": (str,), "mapkind": (str,), @@ -37,6 +38,7 @@ def openapi_types(_): "blob_storage_sourcemap_path": "blob_storage_sourcemap_path", "build_id": "build_id", "created_at": "created_at", + "debug_id": "debug_id", "domain": "domain", "file_name": "file_name", "mapkind": "mapkind", @@ -55,6 +57,7 @@ def __init__( absolute_path: Union[str, UnsetType] = unset, blob_storage_sourcemap_path: Union[str, UnsetType] = unset, build_id: Union[str, UnsetType] = unset, + debug_id: Union[str, UnsetType] = unset, domain: Union[str, UnsetType] = unset, file_name: Union[str, UnsetType] = unset, service: Union[str, UnsetType] = unset, @@ -78,6 +81,10 @@ def __init__( :param created_at: The timestamp when the source map was created. :type created_at: datetime + :param debug_id: The debug identifier (UUID format) that uniquely identifies this + JavaScript source map. Returned for source maps indexed by debug ID. + :type debug_id: str, optional + :param domain: The domain associated with the source map. :type domain: str, optional @@ -108,6 +115,8 @@ def __init__( kwargs["blob_storage_sourcemap_path"] = blob_storage_sourcemap_path if build_id is not unset: kwargs["build_id"] = build_id + if debug_id is not unset: + kwargs["debug_id"] = debug_id if domain is not unset: kwargs["domain"] = domain if file_name is not unset: diff --git a/src/datadog_api_client/v2/model/sourcemap_search_by.py b/src/datadog_api_client/v2/model/sourcemap_search_by.py new file mode 100644 index 0000000000..dd8f3cf377 --- /dev/null +++ b/src/datadog_api_client/v2/model/sourcemap_search_by.py @@ -0,0 +1,35 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class SourcemapSearchBy(ModelSimple): + """ + The search mode for listing JavaScript source maps. + + :param value: If omitted defaults to "debug_id". Must be one of ["debug_id"]. + :type value: str + """ + + allowed_values = { + "debug_id", + } + DEBUG_ID: ClassVar["SourcemapSearchBy"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +SourcemapSearchBy.DEBUG_ID = SourcemapSearchBy("debug_id") diff --git a/src/datadog_api_client/v2/model/sourcemaps_list_meta_page.py b/src/datadog_api_client/v2/model/sourcemaps_list_meta_page.py index b57dfcc212..dca268efd7 100644 --- a/src/datadog_api_client/v2/model/sourcemaps_list_meta_page.py +++ b/src/datadog_api_client/v2/model/sourcemaps_list_meta_page.py @@ -3,10 +3,13 @@ # Copyright 2019-Present Datadog, Inc. from __future__ import annotations +from typing import Union from datadog_api_client.model_utils import ( ModelNormal, cached_property, + unset, + UnsetType, ) @@ -15,24 +18,37 @@ class SourcemapsListMetaPage(ModelNormal): def openapi_types(_): return { "has_more_results": (bool,), + "next_cursor": (str,), "total_filtered_count": (int,), } attribute_map = { "has_more_results": "has_more_results", + "next_cursor": "next_cursor", "total_filtered_count": "total_filtered_count", } - def __init__(self_, has_more_results: bool, total_filtered_count: int, **kwargs): + def __init__( + self_, has_more_results: bool, total_filtered_count: int, next_cursor: Union[str, UnsetType] = unset, **kwargs + ): """ Page information for the source maps list response. :param has_more_results: Whether there are more results available beyond the current page. :type has_more_results: bool - :param total_filtered_count: Total number of source maps matching the filter criteria. + :param next_cursor: Cursor for the next page of a JavaScript cursor-based listing. Pass + this value as ``page[after]`` with the same search mode and filters. + Only returned when another page is available. + :type next_cursor: str, optional + + :param total_filtered_count: Total number of matching source maps for legacy page-number pagination. + Cursor-based listings do not compute a total; this field may be zero + even when records are returned. Use ``has_more_results`` to continue. :type total_filtered_count: int """ + if next_cursor is not unset: + kwargs["next_cursor"] = next_cursor super().__init__(kwargs) self_.has_more_results = has_more_results diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index 7f88beb832..fc812de9b0 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -10932,6 +10932,7 @@ from datadog_api_client.v2.model.sourcemap_file_response import SourcemapFileResponse from datadog_api_client.v2.model.sourcemap_item import SourcemapItem from datadog_api_client.v2.model.sourcemap_map_kind import SourcemapMapKind +from datadog_api_client.v2.model.sourcemap_search_by import SourcemapSearchBy from datadog_api_client.v2.model.sourcemaps_list_meta import SourcemapsListMeta from datadog_api_client.v2.model.sourcemaps_list_meta_page import SourcemapsListMetaPage from datadog_api_client.v2.model.sourcemaps_response import SourcemapsResponse @@ -19827,6 +19828,7 @@ "SourcemapFileResponse", "SourcemapItem", "SourcemapMapKind", + "SourcemapSearchBy", "SourcemapsListMeta", "SourcemapsListMetaPage", "SourcemapsResponse",