diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index a8908359f4..afaf75af0f 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -18223,6 +18223,310 @@ components: $ref: '#/components/schemas/DashboardListItemResponse' type: array type: object + DashboardSearchAggregationBucketKey: + description: Aggregation bucket with a single key value. + properties: + count: + description: Number of results in this bucket. + example: 18 + format: int64 + type: integer + value: + description: Key value for this bucket. + example: team:dashboards-backend + type: string + required: + - count + - value + type: object + DashboardSearchAggregationBucketMultiKey: + description: Aggregation bucket with multiple key values. + properties: + count: + description: Number of results in this bucket. + example: 8 + format: int64 + type: integer + value: + description: Key values for this bucket. + example: + - David Leonard + - david.leonard@datadoghq.com + items: + type: string + type: array + required: + - count + - value + type: object + DashboardSearchAggregations: + description: Aggregations of dashboard search results. + properties: + author: + description: Aggregation by author. + items: + $ref: '#/components/schemas/DashboardSearchAggregationBucketMultiKey' + type: array + is_shared: + description: Aggregation by share status. + items: + $ref: '#/components/schemas/DashboardSearchAggregationBucketKey' + type: array + share_type: + description: Aggregation by share type. + items: + $ref: '#/components/schemas/DashboardSearchAggregationBucketKey' + type: array + shared_by.handle: + description: Aggregation by who shared the dashboard. + items: + $ref: '#/components/schemas/DashboardSearchAggregationBucketKey' + type: array + status: + description: Aggregation by status. + items: + $ref: '#/components/schemas/DashboardSearchAggregationBucketKey' + type: array + tags: + description: Aggregation by tags. + items: + $ref: '#/components/schemas/DashboardSearchAggregationBucketKey' + type: array + template_variables.name: + description: Aggregation by template variable names. + items: + $ref: '#/components/schemas/DashboardSearchAggregationBucketKey' + type: array + type: + description: Aggregation by dashboard type. + items: + $ref: '#/components/schemas/DashboardSearchAggregationBucketKey' + type: array + widgets.metrics: + description: Aggregation by widget metrics. + items: + $ref: '#/components/schemas/DashboardSearchAggregationBucketKey' + type: array + widgets.type: + description: Aggregation by widget type. + items: + $ref: '#/components/schemas/DashboardSearchAggregationBucketKey' + type: array + type: object + DashboardSearchAttributes: + description: Dashboard search result attributes. + properties: + tags: + description: List of tags for the dashboard. + example: + - team:dashboards-backend + items: + type: string + type: array + title: + description: Title of the dashboard. + example: Public Dashboard Metadata caching + type: string + required: + - tags + - title + type: object + DashboardSearchMetadata: + description: Metadata about the dashboard. + properties: + author: + $ref: '#/components/schemas/DashboardSearchUser' + created_at: + description: Time at which the dashboard was created. + example: '2021-10-28T19:10:04.601117Z' + format: date-time + type: string + deleted_at: + description: Time at which the dashboard was deleted, or null if not deleted. + example: null + format: date-time + nullable: true + type: string + embeddable_domains: + description: List of domains the dashboard is allowed to be embedded in. + example: null + items: + type: string + nullable: true + type: array + experience_type: + description: Dashboard experience type. + example: default + type: string + expiration: + description: When the public dashboard link will expire. + example: null + format: date-time + nullable: true + type: string + has_monitors: + description: Whether the dashboard has monitors. + example: null + nullable: true + type: boolean + is_favorited: + description: Whether the dashboard is favorited by the user. + example: false + type: boolean + is_public_dashboard_ownerless: + description: Whether the public dashboard owner is deactivated. + example: false + type: boolean + is_shared: + description: Whether the dashboard is shared publicly. + example: true + type: boolean + last_accessed: + description: Last time the dashboard was accessed. + example: null + format: date-time + nullable: true + type: string + modified_at: + description: Time at which the dashboard was last updated. + example: '2024-02-16T12:43:31.942554Z' + format: date-time + type: string + popularity: + description: Relative measure of dashboard popularity. + example: 0 + format: double + type: number + public_title: + description: Published title of the public dashboard. + example: Public Dashboard Metadata caching + type: string + quality_score: + description: Quality score of the dashboard. + example: null + format: double + nullable: true + type: number + share_list: + description: List of email addresses for invite-only public dashboards. + example: [] + items: + type: string + nullable: true + type: array + share_type: + description: Share type of the public dashboard. + example: invite + type: string + shared_by: + $ref: '#/components/schemas/DashboardSearchUser' + status: + description: Status of the public dashboard. + example: active + type: string + token: + description: Unique public dashboard token. + example: yB5yjZ-f0d1a5802e21f5576f5e34feb9cddc4c + type: string + type: + description: Dashboard type. + example: custom_timeboard + type: string + url: + description: URL path to the dashboard. + example: /dashboard/e8y-qtx-r3w/public-dashboard-metadata-caching + type: string + widget_count: + description: Number of widgets in the dashboard. + example: 1 + format: int64 + type: integer + required: + - author + - created_at + - deleted_at + - is_favorited + - is_shared + - modified_at + - popularity + - quality_score + - has_monitors + - type + - url + - experience_type + - widget_count + - public_title + - shared_by + - is_public_dashboard_ownerless + - share_type + - share_list + - embeddable_domains + - last_accessed + - expiration + - status + - token + type: object + DashboardSearchResponse: + description: Response containing dashboard search results. + properties: + data: + description: List of dashboard search results. + items: + $ref: '#/components/schemas/DashboardSearchResultData' + type: array + meta: + $ref: '#/components/schemas/DashboardSearchResponseMeta' + required: + - data + - meta + type: object + DashboardSearchResponseMeta: + description: Metadata about the dashboard search results. + properties: + aggregations: + $ref: '#/components/schemas/DashboardSearchAggregations' + total: + description: Total number of dashboards found. + example: 18 + format: int64 + type: integer + required: + - total + type: object + DashboardSearchResultData: + description: A dashboard search result. + properties: + attributes: + $ref: '#/components/schemas/DashboardSearchAttributes' + id: + description: Dashboard identifier. + example: e8y-qtx-r3w + type: string + meta: + $ref: '#/components/schemas/DashboardSearchMetadata' + type: + $ref: '#/components/schemas/MetricDashboardType' + required: + - id + - type + - attributes + - meta + type: object + DashboardSearchUser: + description: User information. + properties: + handle: + description: User handle or email. + example: david.leonard@datadoghq.com + type: string + name: + description: User display name. + example: David Leonard + type: string + required: + - handle + - name + type: object DashboardTriggerWrapper: description: Schema for a Dashboard-based trigger. properties: @@ -37764,6 +38068,235 @@ components: meta: $ref: '#/components/schemas/MonthlyCostAttributionMeta' type: object + NotebookSearchAggregationBucketKey: + description: Aggregation bucket with a single key value. + properties: + count: + description: Number of results in this bucket. + example: 10 + format: int64 + type: integer + value: + description: Key value for this bucket. + example: team:notebooks-backend + type: string + required: + - count + - value + type: object + NotebookSearchAggregationBucketMultiKey: + description: Aggregation bucket with multiple key values. + properties: + count: + description: Number of results in this bucket. + example: 5 + format: int64 + type: integer + value: + description: Key values for this bucket. + example: + - User Name + - user@datadoghq.com + items: + type: string + type: array + required: + - count + - value + type: object + NotebookSearchAggregations: + description: Aggregations of notebook search results. + properties: + author: + description: Aggregation by author. + items: + $ref: '#/components/schemas/NotebookSearchAggregationBucketMultiKey' + type: array + tags: + description: Aggregation by tags. + items: + $ref: '#/components/schemas/NotebookSearchAggregationBucketKey' + type: array + template_variables.name: + description: Aggregation by template variable names. + items: + $ref: '#/components/schemas/NotebookSearchAggregationBucketKey' + type: array + type: + description: Aggregation by notebook type. + items: + $ref: '#/components/schemas/NotebookSearchAggregationBucketKey' + type: array + type: object + NotebookSearchAttributes: + description: Notebook search result attributes. + properties: + meta: + $ref: '#/components/schemas/NotebookSearchMetadata' + name: + description: Name of the notebook. + example: My Notebook + type: string + tags: + description: List of tags for the notebook. + example: + - team:notebooks-backend + items: + type: string + type: array + required: + - name + - tags + - meta + type: object + NotebookSearchHighlight: + description: Highlighted fields from the notebook search. + properties: + cells.text: + description: Highlighted cell text matches. + items: + type: string + type: array + cells.title: + description: Highlighted cell title matches. + items: + type: string + type: array + name: + description: Highlighted notebook name matches. + items: + type: string + type: array + type: object + NotebookSearchMetadata: + description: Metadata about the notebook. + properties: + author: + $ref: '#/components/schemas/NotebookSearchUser' + cell_count: + description: Number of cells in the notebook. + example: 5 + format: int64 + type: integer + created_at: + description: Time at which the notebook was created. + example: '2021-10-28T19:10:04.601117Z' + format: date-time + type: string + deleted_at: + description: Time at which the notebook was deleted, or null if not deleted. + example: null + format: date-time + nullable: true + type: string + experience_type: + description: Experience type of the notebook. + example: null + nullable: true + type: string + has_computational_cells: + description: Whether the notebook has computational cells. + example: false + type: boolean + is_favorited: + description: Whether the notebook is favorited by the user. + example: false + type: boolean + is_template: + description: Whether the notebook is a template. + example: false + type: boolean + modified_at: + description: Time at which the notebook was last updated. + example: '2024-02-16T12:43:31.942554Z' + format: date-time + type: string + status: + description: Status of the notebook. + example: published + type: string + take_snapshots: + description: Whether the notebook can take a snapshot. + example: false + type: boolean + type: + description: Notebook type. + example: notebook + type: string + required: + - author + - cell_count + - created_at + - deleted_at + - is_favorited + - is_template + - modified_at + - status + - take_snapshots + - type + - has_computational_cells + - experience_type + type: object + NotebookSearchResponse: + description: Response containing notebook search results. + properties: + data: + description: List of notebook search results. + items: + $ref: '#/components/schemas/NotebookSearchResultData' + type: array + meta: + $ref: '#/components/schemas/NotebookSearchResponseMeta' + required: + - data + - meta + type: object + NotebookSearchResponseMeta: + description: Metadata about the notebook search results. + properties: + aggregations: + $ref: '#/components/schemas/NotebookSearchAggregations' + total: + description: Total number of notebooks found. + example: 25 + format: int64 + type: integer + required: + - total + type: object + NotebookSearchResultData: + description: A notebook search result. + properties: + highlight: + $ref: '#/components/schemas/NotebookSearchHighlight' + id: + description: Notebook identifier. + example: '123456' + type: string + notebook_data: + $ref: '#/components/schemas/NotebookSearchAttributes' + type: + $ref: '#/components/schemas/MetricNotebookType' + required: + - id + - type + - notebook_data + type: object + NotebookSearchUser: + description: User information. + properties: + handle: + description: User handle or email. + example: user@datadoghq.com + type: string + name: + description: User display name. + example: User Name + type: string + required: + - handle + - name + type: object NotebookTriggerWrapper: description: Schema for a Notebook-based trigger. properties: @@ -75312,6 +75845,73 @@ paths: tags: - Dashboard Lists x-codegen-request-body-name: body + /api/v2/dashboards/search: + get: + description: Search for dashboards using a query string. + operationId: SearchDashboards + parameters: + - description: Search query string. + in: query + name: query + required: false + schema: + example: team:dashboards-backend + type: string + - description: Sort field for results. + in: query + name: sort + required: false + schema: + example: metadata.created_at + type: string + - description: Additional data to include in the response. + in: query + name: include + required: false + schema: + example: meta.aggregations + type: string + - description: Page number for pagination. + in: query + name: page + required: false + schema: + example: 0 + type: integer + - description: Maximum number of results to return. + in: query + name: limit + required: false + schema: + example: 10 + type: integer + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/DashboardSearchResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + '503': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Service Unavailable + summary: Search dashboards + tags: + - Dashboards + x-unstable: '**Note**: This endpoint is in preview and is subject to change. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' /api/v2/datasets: get: description: Get all datasets that have been configured for an organization. @@ -85387,6 +85987,79 @@ paths: summary: Get all aggregated DNS traffic tags: - Cloud Network Monitoring + /api/v2/notebooks/search: + get: + description: Search for notebooks using a query string. + operationId: SearchNotebooks + parameters: + - description: Search query string. + in: query + name: query + required: false + schema: + example: team:notebooks-backend + type: string + - description: Sort field for results. + in: query + name: sort + required: false + schema: + example: metadata.created_at + type: string + - description: Additional data to include in the response. + in: query + name: include + required: false + schema: + example: meta.aggregations + type: string + - description: Page number for pagination. + in: query + name: page + required: false + schema: + example: 0 + type: integer + - description: Maximum number of results to return. + in: query + name: limit + required: false + schema: + example: 10 + type: integer + responses: + '200': + content: + application/json: + schema: + $ref: '#/components/schemas/NotebookSearchResponse' + description: OK + '400': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Bad Request + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + '500': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Internal Server Error + '503': + content: + application/json: + schema: + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Service Unavailable + summary: Search notebooks + tags: + - Notebooks + x-unstable: '**Note**: This endpoint is in preview and is subject to change. + + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).' /api/v2/obs-pipelines/pipelines: get: description: Retrieve a list of pipelines. @@ -102442,6 +103115,9 @@ tags: organization.' name: Dashboard Lists +- description: Interact with your dashboards through the API to search and retrieve + dashboards. + name: Dashboards - description: The Data Deletion API allows the user to target and delete data from the allowed products. It's currently enabled for Logs and RUM and depends on `logs_delete_data` and `rum_delete_data` permissions respectively. @@ -102686,6 +103362,9 @@ tags: and their attributes. See the [Network Device Monitoring page](https://docs.datadoghq.com/network_monitoring/) for more information. name: Network Device Monitoring +- description: Interact with your notebooks through the API to search and retrieve + notebooks. + name: Notebooks - description: Auto-generated tag OCI Integration name: OCI Integration - description: Observability Pipelines allows you to collect and process logs within diff --git a/docs/datadog_api_client.v2.api.rst b/docs/datadog_api_client.v2.api.rst index 44f19cd202..0adf3cdcda 100644 --- a/docs/datadog_api_client.v2.api.rst +++ b/docs/datadog_api_client.v2.api.rst @@ -193,6 +193,13 @@ datadog\_api\_client.v2.api.dashboard\_lists\_api module :members: :show-inheritance: +datadog\_api\_client.v2.api.dashboards\_api module +-------------------------------------------------- + +.. automodule:: datadog_api_client.v2.api.dashboards_api + :members: + :show-inheritance: + datadog\_api\_client.v2.api.data\_deletion\_api module ------------------------------------------------------ @@ -389,6 +396,13 @@ datadog\_api\_client.v2.api.network\_device\_monitoring\_api module :members: :show-inheritance: +datadog\_api\_client.v2.api.notebooks\_api module +------------------------------------------------- + +.. automodule:: datadog_api_client.v2.api.notebooks_api + :members: + :show-inheritance: + datadog\_api\_client.v2.api.observability\_pipelines\_api module ---------------------------------------------------------------- diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index fe0c2aa3ef..f17b284244 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -7116,6 +7116,69 @@ datadog\_api\_client.v2.model.dashboard\_list\_update\_items\_response module :members: :show-inheritance: +datadog\_api\_client.v2.model.dashboard\_search\_aggregation\_bucket\_key module +-------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.dashboard_search_aggregation_bucket_key + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.dashboard\_search\_aggregation\_bucket\_multi\_key module +--------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.dashboard_search_aggregation_bucket_multi_key + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.dashboard\_search\_aggregations module +-------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.dashboard_search_aggregations + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.dashboard\_search\_attributes module +------------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.dashboard_search_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.dashboard\_search\_metadata module +---------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.dashboard_search_metadata + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.dashboard\_search\_response module +---------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.dashboard_search_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.dashboard\_search\_response\_meta module +---------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.dashboard_search_response_meta + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.dashboard\_search\_result\_data module +-------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.dashboard_search_result_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.dashboard\_search\_user module +------------------------------------------------------------ + +.. automodule:: datadog_api_client.v2.model.dashboard_search_user + :members: + :show-inheritance: + datadog\_api\_client.v2.model.dashboard\_trigger\_wrapper module ---------------------------------------------------------------- @@ -16454,6 +16517,76 @@ datadog\_api\_client.v2.model.ms\_teams\_integration\_metadata\_teams\_item modu :members: :show-inheritance: +datadog\_api\_client.v2.model.notebook\_search\_aggregation\_bucket\_key module +------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.notebook_search_aggregation_bucket_key + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.notebook\_search\_aggregation\_bucket\_multi\_key module +-------------------------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.notebook_search_aggregation_bucket_multi_key + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.notebook\_search\_aggregations module +------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.notebook_search_aggregations + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.notebook\_search\_attributes module +----------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.notebook_search_attributes + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.notebook\_search\_highlight module +---------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.notebook_search_highlight + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.notebook\_search\_metadata module +--------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.notebook_search_metadata + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.notebook\_search\_response module +--------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.notebook_search_response + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.notebook\_search\_response\_meta module +--------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.notebook_search_response_meta + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.notebook\_search\_result\_data module +------------------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.notebook_search_result_data + :members: + :show-inheritance: + +datadog\_api\_client.v2.model.notebook\_search\_user module +----------------------------------------------------------- + +.. automodule:: datadog_api_client.v2.model.notebook_search_user + :members: + :show-inheritance: + datadog\_api\_client.v2.model.notebook\_trigger\_wrapper module --------------------------------------------------------------- diff --git a/examples/v2/dashboards/SearchDashboards.py b/examples/v2/dashboards/SearchDashboards.py new file mode 100644 index 0000000000..ff6bf3d45b --- /dev/null +++ b/examples/v2/dashboards/SearchDashboards.py @@ -0,0 +1,14 @@ +""" +Search dashboards returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.dashboards_api import DashboardsApi + +configuration = Configuration() +configuration.unstable_operations["search_dashboards"] = True +with ApiClient(configuration) as api_client: + api_instance = DashboardsApi(api_client) + response = api_instance.search_dashboards() + + print(response) diff --git a/examples/v2/notebooks/SearchNotebooks.py b/examples/v2/notebooks/SearchNotebooks.py new file mode 100644 index 0000000000..fdfecd880a --- /dev/null +++ b/examples/v2/notebooks/SearchNotebooks.py @@ -0,0 +1,14 @@ +""" +Search notebooks returns "OK" response +""" + +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.notebooks_api import NotebooksApi + +configuration = Configuration() +configuration.unstable_operations["search_notebooks"] = True +with ApiClient(configuration) as api_client: + api_instance = NotebooksApi(api_client) + response = api_instance.search_notebooks() + + print(response) diff --git a/src/datadog_api_client/configuration.py b/src/datadog_api_client/configuration.py index f4ec0cd2a5..b33e50288e 100644 --- a/src/datadog_api_client/configuration.py +++ b/src/datadog_api_client/configuration.py @@ -288,6 +288,7 @@ def __init__( "v2.mute_findings": False, "v2.run_threat_hunting_job": False, "v2.search_security_monitoring_histsignals": False, + "v2.search_dashboards": False, "v2.create_dataset": False, "v2.delete_dataset": False, "v2.get_all_datasets": False, @@ -385,6 +386,7 @@ def __init__( "v2.update_monitor_user_template": False, "v2.validate_existing_monitor_user_template": False, "v2.validate_monitor_user_template": False, + "v2.search_notebooks": False, "v2.list_role_templates": False, "v2.create_connection": False, "v2.delete_connection": False, diff --git a/src/datadog_api_client/v2/api/dashboards_api.py b/src/datadog_api_client/v2/api/dashboards_api.py new file mode 100644 index 0000000000..34cb822538 --- /dev/null +++ b/src/datadog_api_client/v2/api/dashboards_api.py @@ -0,0 +1,110 @@ +# 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 typing import Any, Dict, Union + +from datadog_api_client.api_client import ApiClient, Endpoint as _Endpoint +from datadog_api_client.configuration import Configuration +from datadog_api_client.model_utils import ( + UnsetType, + unset, +) +from datadog_api_client.v2.model.dashboard_search_response import DashboardSearchResponse + + +class DashboardsApi: + """ + Interact with your dashboards through the API to search and retrieve dashboards. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient(Configuration()) + self.api_client = api_client + + self._search_dashboards_endpoint = _Endpoint( + settings={ + "response_type": (DashboardSearchResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/dashboards/search", + "operation_id": "search_dashboards", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "query": { + "openapi_types": (str,), + "attribute": "query", + "location": "query", + }, + "sort": { + "openapi_types": (str,), + "attribute": "sort", + "location": "query", + }, + "include": { + "openapi_types": (str,), + "attribute": "include", + "location": "query", + }, + "page": { + "openapi_types": (int,), + "attribute": "page", + "location": "query", + }, + "limit": { + "openapi_types": (int,), + "attribute": "limit", + "location": "query", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + + def search_dashboards( + self, + *, + query: Union[str, UnsetType] = unset, + sort: Union[str, UnsetType] = unset, + include: Union[str, UnsetType] = unset, + page: Union[int, UnsetType] = unset, + limit: Union[int, UnsetType] = unset, + ) -> DashboardSearchResponse: + """Search dashboards. + + Search for dashboards using a query string. + + :param query: Search query string. + :type query: str, optional + :param sort: Sort field for results. + :type sort: str, optional + :param include: Additional data to include in the response. + :type include: str, optional + :param page: Page number for pagination. + :type page: int, optional + :param limit: Maximum number of results to return. + :type limit: int, optional + :rtype: DashboardSearchResponse + """ + kwargs: Dict[str, Any] = {} + if query is not unset: + kwargs["query"] = query + + if sort is not unset: + kwargs["sort"] = sort + + if include is not unset: + kwargs["include"] = include + + if page is not unset: + kwargs["page"] = page + + if limit is not unset: + kwargs["limit"] = limit + + return self._search_dashboards_endpoint.call_with_http_info(**kwargs) diff --git a/src/datadog_api_client/v2/api/notebooks_api.py b/src/datadog_api_client/v2/api/notebooks_api.py new file mode 100644 index 0000000000..5c23521c2e --- /dev/null +++ b/src/datadog_api_client/v2/api/notebooks_api.py @@ -0,0 +1,110 @@ +# 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 typing import Any, Dict, Union + +from datadog_api_client.api_client import ApiClient, Endpoint as _Endpoint +from datadog_api_client.configuration import Configuration +from datadog_api_client.model_utils import ( + UnsetType, + unset, +) +from datadog_api_client.v2.model.notebook_search_response import NotebookSearchResponse + + +class NotebooksApi: + """ + Interact with your notebooks through the API to search and retrieve notebooks. + """ + + def __init__(self, api_client=None): + if api_client is None: + api_client = ApiClient(Configuration()) + self.api_client = api_client + + self._search_notebooks_endpoint = _Endpoint( + settings={ + "response_type": (NotebookSearchResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/notebooks/search", + "operation_id": "search_notebooks", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "query": { + "openapi_types": (str,), + "attribute": "query", + "location": "query", + }, + "sort": { + "openapi_types": (str,), + "attribute": "sort", + "location": "query", + }, + "include": { + "openapi_types": (str,), + "attribute": "include", + "location": "query", + }, + "page": { + "openapi_types": (int,), + "attribute": "page", + "location": "query", + }, + "limit": { + "openapi_types": (int,), + "attribute": "limit", + "location": "query", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + + def search_notebooks( + self, + *, + query: Union[str, UnsetType] = unset, + sort: Union[str, UnsetType] = unset, + include: Union[str, UnsetType] = unset, + page: Union[int, UnsetType] = unset, + limit: Union[int, UnsetType] = unset, + ) -> NotebookSearchResponse: + """Search notebooks. + + Search for notebooks using a query string. + + :param query: Search query string. + :type query: str, optional + :param sort: Sort field for results. + :type sort: str, optional + :param include: Additional data to include in the response. + :type include: str, optional + :param page: Page number for pagination. + :type page: int, optional + :param limit: Maximum number of results to return. + :type limit: int, optional + :rtype: NotebookSearchResponse + """ + kwargs: Dict[str, Any] = {} + if query is not unset: + kwargs["query"] = query + + if sort is not unset: + kwargs["sort"] = sort + + if include is not unset: + kwargs["include"] = include + + if page is not unset: + kwargs["page"] = page + + if limit is not unset: + kwargs["limit"] = limit + + return self._search_notebooks_endpoint.call_with_http_info(**kwargs) diff --git a/src/datadog_api_client/v2/apis/__init__.py b/src/datadog_api_client/v2/apis/__init__.py index 210ab0dd47..a435d06b1e 100644 --- a/src/datadog_api_client/v2/apis/__init__.py +++ b/src/datadog_api_client/v2/apis/__init__.py @@ -26,6 +26,7 @@ from datadog_api_client.v2.api.containers_api import ContainersApi from datadog_api_client.v2.api.dora_metrics_api import DORAMetricsApi from datadog_api_client.v2.api.dashboard_lists_api import DashboardListsApi +from datadog_api_client.v2.api.dashboards_api import DashboardsApi from datadog_api_client.v2.api.data_deletion_api import DataDeletionApi from datadog_api_client.v2.api.datasets_api import DatasetsApi from datadog_api_client.v2.api.deployment_gates_api import DeploymentGatesApi @@ -53,6 +54,7 @@ from datadog_api_client.v2.api.microsoft_teams_integration_api import MicrosoftTeamsIntegrationApi from datadog_api_client.v2.api.monitors_api import MonitorsApi from datadog_api_client.v2.api.network_device_monitoring_api import NetworkDeviceMonitoringApi +from datadog_api_client.v2.api.notebooks_api import NotebooksApi from datadog_api_client.v2.api.oci_integration_api import OCIIntegrationApi from datadog_api_client.v2.api.observability_pipelines_api import ObservabilityPipelinesApi from datadog_api_client.v2.api.okta_integration_api import OktaIntegrationApi @@ -125,6 +127,7 @@ "ContainersApi", "DORAMetricsApi", "DashboardListsApi", + "DashboardsApi", "DataDeletionApi", "DatasetsApi", "DeploymentGatesApi", @@ -152,6 +155,7 @@ "MicrosoftTeamsIntegrationApi", "MonitorsApi", "NetworkDeviceMonitoringApi", + "NotebooksApi", "OCIIntegrationApi", "ObservabilityPipelinesApi", "OktaIntegrationApi", diff --git a/src/datadog_api_client/v2/model/dashboard_search_aggregation_bucket_key.py b/src/datadog_api_client/v2/model/dashboard_search_aggregation_bucket_key.py new file mode 100644 index 0000000000..8a188206a2 --- /dev/null +++ b/src/datadog_api_client/v2/model/dashboard_search_aggregation_bucket_key.py @@ -0,0 +1,39 @@ +# 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 ( + ModelNormal, + cached_property, +) + + +class DashboardSearchAggregationBucketKey(ModelNormal): + @cached_property + def openapi_types(_): + return { + "count": (int,), + "value": (str,), + } + + attribute_map = { + "count": "count", + "value": "value", + } + + def __init__(self_, count: int, value: str, **kwargs): + """ + Aggregation bucket with a single key value. + + :param count: Number of results in this bucket. + :type count: int + + :param value: Key value for this bucket. + :type value: str + """ + super().__init__(kwargs) + + self_.count = count + self_.value = value diff --git a/src/datadog_api_client/v2/model/dashboard_search_aggregation_bucket_multi_key.py b/src/datadog_api_client/v2/model/dashboard_search_aggregation_bucket_multi_key.py new file mode 100644 index 0000000000..ed33728412 --- /dev/null +++ b/src/datadog_api_client/v2/model/dashboard_search_aggregation_bucket_multi_key.py @@ -0,0 +1,40 @@ +# 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 typing import List + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class DashboardSearchAggregationBucketMultiKey(ModelNormal): + @cached_property + def openapi_types(_): + return { + "count": (int,), + "value": ([str],), + } + + attribute_map = { + "count": "count", + "value": "value", + } + + def __init__(self_, count: int, value: List[str], **kwargs): + """ + Aggregation bucket with multiple key values. + + :param count: Number of results in this bucket. + :type count: int + + :param value: Key values for this bucket. + :type value: [str] + """ + super().__init__(kwargs) + + self_.count = count + self_.value = value diff --git a/src/datadog_api_client/v2/model/dashboard_search_aggregations.py b/src/datadog_api_client/v2/model/dashboard_search_aggregations.py new file mode 100644 index 0000000000..ae6ce77947 --- /dev/null +++ b/src/datadog_api_client/v2/model/dashboard_search_aggregations.py @@ -0,0 +1,126 @@ +# 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 typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.dashboard_search_aggregation_bucket_multi_key import ( + DashboardSearchAggregationBucketMultiKey, + ) + from datadog_api_client.v2.model.dashboard_search_aggregation_bucket_key import DashboardSearchAggregationBucketKey + + +class DashboardSearchAggregations(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.dashboard_search_aggregation_bucket_multi_key import ( + DashboardSearchAggregationBucketMultiKey, + ) + from datadog_api_client.v2.model.dashboard_search_aggregation_bucket_key import ( + DashboardSearchAggregationBucketKey, + ) + + return { + "author": ([DashboardSearchAggregationBucketMultiKey],), + "is_shared": ([DashboardSearchAggregationBucketKey],), + "share_type": ([DashboardSearchAggregationBucketKey],), + "shared_by_handle": ([DashboardSearchAggregationBucketKey],), + "status": ([DashboardSearchAggregationBucketKey],), + "tags": ([DashboardSearchAggregationBucketKey],), + "template_variables_name": ([DashboardSearchAggregationBucketKey],), + "type": ([DashboardSearchAggregationBucketKey],), + "widgets_metrics": ([DashboardSearchAggregationBucketKey],), + "widgets_type": ([DashboardSearchAggregationBucketKey],), + } + + attribute_map = { + "author": "author", + "is_shared": "is_shared", + "share_type": "share_type", + "shared_by_handle": "shared_by.handle", + "status": "status", + "tags": "tags", + "template_variables_name": "template_variables.name", + "type": "type", + "widgets_metrics": "widgets.metrics", + "widgets_type": "widgets.type", + } + + def __init__( + self_, + author: Union[List[DashboardSearchAggregationBucketMultiKey], UnsetType] = unset, + is_shared: Union[List[DashboardSearchAggregationBucketKey], UnsetType] = unset, + share_type: Union[List[DashboardSearchAggregationBucketKey], UnsetType] = unset, + shared_by_handle: Union[List[DashboardSearchAggregationBucketKey], UnsetType] = unset, + status: Union[List[DashboardSearchAggregationBucketKey], UnsetType] = unset, + tags: Union[List[DashboardSearchAggregationBucketKey], UnsetType] = unset, + template_variables_name: Union[List[DashboardSearchAggregationBucketKey], UnsetType] = unset, + type: Union[List[DashboardSearchAggregationBucketKey], UnsetType] = unset, + widgets_metrics: Union[List[DashboardSearchAggregationBucketKey], UnsetType] = unset, + widgets_type: Union[List[DashboardSearchAggregationBucketKey], UnsetType] = unset, + **kwargs, + ): + """ + Aggregations of dashboard search results. + + :param author: Aggregation by author. + :type author: [DashboardSearchAggregationBucketMultiKey], optional + + :param is_shared: Aggregation by share status. + :type is_shared: [DashboardSearchAggregationBucketKey], optional + + :param share_type: Aggregation by share type. + :type share_type: [DashboardSearchAggregationBucketKey], optional + + :param shared_by_handle: Aggregation by who shared the dashboard. + :type shared_by_handle: [DashboardSearchAggregationBucketKey], optional + + :param status: Aggregation by status. + :type status: [DashboardSearchAggregationBucketKey], optional + + :param tags: Aggregation by tags. + :type tags: [DashboardSearchAggregationBucketKey], optional + + :param template_variables_name: Aggregation by template variable names. + :type template_variables_name: [DashboardSearchAggregationBucketKey], optional + + :param type: Aggregation by dashboard type. + :type type: [DashboardSearchAggregationBucketKey], optional + + :param widgets_metrics: Aggregation by widget metrics. + :type widgets_metrics: [DashboardSearchAggregationBucketKey], optional + + :param widgets_type: Aggregation by widget type. + :type widgets_type: [DashboardSearchAggregationBucketKey], optional + """ + if author is not unset: + kwargs["author"] = author + if is_shared is not unset: + kwargs["is_shared"] = is_shared + if share_type is not unset: + kwargs["share_type"] = share_type + if shared_by_handle is not unset: + kwargs["shared_by_handle"] = shared_by_handle + if status is not unset: + kwargs["status"] = status + if tags is not unset: + kwargs["tags"] = tags + if template_variables_name is not unset: + kwargs["template_variables_name"] = template_variables_name + if type is not unset: + kwargs["type"] = type + if widgets_metrics is not unset: + kwargs["widgets_metrics"] = widgets_metrics + if widgets_type is not unset: + kwargs["widgets_type"] = widgets_type + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/dashboard_search_attributes.py b/src/datadog_api_client/v2/model/dashboard_search_attributes.py new file mode 100644 index 0000000000..f211dfee40 --- /dev/null +++ b/src/datadog_api_client/v2/model/dashboard_search_attributes.py @@ -0,0 +1,40 @@ +# 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 typing import List + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class DashboardSearchAttributes(ModelNormal): + @cached_property + def openapi_types(_): + return { + "tags": ([str],), + "title": (str,), + } + + attribute_map = { + "tags": "tags", + "title": "title", + } + + def __init__(self_, tags: List[str], title: str, **kwargs): + """ + Dashboard search result attributes. + + :param tags: List of tags for the dashboard. + :type tags: [str] + + :param title: Title of the dashboard. + :type title: str + """ + super().__init__(kwargs) + + self_.tags = tags + self_.title = title diff --git a/src/datadog_api_client/v2/model/dashboard_search_metadata.py b/src/datadog_api_client/v2/model/dashboard_search_metadata.py new file mode 100644 index 0000000000..9e577095b8 --- /dev/null +++ b/src/datadog_api_client/v2/model/dashboard_search_metadata.py @@ -0,0 +1,200 @@ +# 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 typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + datetime, + none_type, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.dashboard_search_user import DashboardSearchUser + + +class DashboardSearchMetadata(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.dashboard_search_user import DashboardSearchUser + + return { + "author": (DashboardSearchUser,), + "created_at": (datetime,), + "deleted_at": (datetime, none_type), + "embeddable_domains": ([str], none_type), + "experience_type": (str,), + "expiration": (datetime, none_type), + "has_monitors": (bool, none_type), + "is_favorited": (bool,), + "is_public_dashboard_ownerless": (bool,), + "is_shared": (bool,), + "last_accessed": (datetime, none_type), + "modified_at": (datetime,), + "popularity": (float,), + "public_title": (str,), + "quality_score": (float, none_type), + "share_list": ([str], none_type), + "share_type": (str,), + "shared_by": (DashboardSearchUser,), + "status": (str,), + "token": (str,), + "type": (str,), + "url": (str,), + "widget_count": (int,), + } + + attribute_map = { + "author": "author", + "created_at": "created_at", + "deleted_at": "deleted_at", + "embeddable_domains": "embeddable_domains", + "experience_type": "experience_type", + "expiration": "expiration", + "has_monitors": "has_monitors", + "is_favorited": "is_favorited", + "is_public_dashboard_ownerless": "is_public_dashboard_ownerless", + "is_shared": "is_shared", + "last_accessed": "last_accessed", + "modified_at": "modified_at", + "popularity": "popularity", + "public_title": "public_title", + "quality_score": "quality_score", + "share_list": "share_list", + "share_type": "share_type", + "shared_by": "shared_by", + "status": "status", + "token": "token", + "type": "type", + "url": "url", + "widget_count": "widget_count", + } + + def __init__( + self_, + author: DashboardSearchUser, + created_at: datetime, + deleted_at: Union[datetime, none_type], + embeddable_domains: Union[List[str], none_type], + experience_type: str, + expiration: Union[datetime, none_type], + has_monitors: Union[bool, none_type], + is_favorited: bool, + is_public_dashboard_ownerless: bool, + is_shared: bool, + last_accessed: Union[datetime, none_type], + modified_at: datetime, + popularity: float, + public_title: str, + quality_score: Union[float, none_type], + share_list: Union[List[str], none_type], + share_type: str, + shared_by: DashboardSearchUser, + status: str, + token: str, + type: str, + url: str, + widget_count: int, + **kwargs, + ): + """ + Metadata about the dashboard. + + :param author: User information. + :type author: DashboardSearchUser + + :param created_at: Time at which the dashboard was created. + :type created_at: datetime + + :param deleted_at: Time at which the dashboard was deleted, or null if not deleted. + :type deleted_at: datetime, none_type + + :param embeddable_domains: List of domains the dashboard is allowed to be embedded in. + :type embeddable_domains: [str], none_type + + :param experience_type: Dashboard experience type. + :type experience_type: str + + :param expiration: When the public dashboard link will expire. + :type expiration: datetime, none_type + + :param has_monitors: Whether the dashboard has monitors. + :type has_monitors: bool, none_type + + :param is_favorited: Whether the dashboard is favorited by the user. + :type is_favorited: bool + + :param is_public_dashboard_ownerless: Whether the public dashboard owner is deactivated. + :type is_public_dashboard_ownerless: bool + + :param is_shared: Whether the dashboard is shared publicly. + :type is_shared: bool + + :param last_accessed: Last time the dashboard was accessed. + :type last_accessed: datetime, none_type + + :param modified_at: Time at which the dashboard was last updated. + :type modified_at: datetime + + :param popularity: Relative measure of dashboard popularity. + :type popularity: float + + :param public_title: Published title of the public dashboard. + :type public_title: str + + :param quality_score: Quality score of the dashboard. + :type quality_score: float, none_type + + :param share_list: List of email addresses for invite-only public dashboards. + :type share_list: [str], none_type + + :param share_type: Share type of the public dashboard. + :type share_type: str + + :param shared_by: User information. + :type shared_by: DashboardSearchUser + + :param status: Status of the public dashboard. + :type status: str + + :param token: Unique public dashboard token. + :type token: str + + :param type: Dashboard type. + :type type: str + + :param url: URL path to the dashboard. + :type url: str + + :param widget_count: Number of widgets in the dashboard. + :type widget_count: int + """ + super().__init__(kwargs) + + self_.author = author + self_.created_at = created_at + self_.deleted_at = deleted_at + self_.embeddable_domains = embeddable_domains + self_.experience_type = experience_type + self_.expiration = expiration + self_.has_monitors = has_monitors + self_.is_favorited = is_favorited + self_.is_public_dashboard_ownerless = is_public_dashboard_ownerless + self_.is_shared = is_shared + self_.last_accessed = last_accessed + self_.modified_at = modified_at + self_.popularity = popularity + self_.public_title = public_title + self_.quality_score = quality_score + self_.share_list = share_list + self_.share_type = share_type + self_.shared_by = shared_by + self_.status = status + self_.token = token + self_.type = type + self_.url = url + self_.widget_count = widget_count diff --git a/src/datadog_api_client/v2/model/dashboard_search_response.py b/src/datadog_api_client/v2/model/dashboard_search_response.py new file mode 100644 index 0000000000..dfa0909d55 --- /dev/null +++ b/src/datadog_api_client/v2/model/dashboard_search_response.py @@ -0,0 +1,48 @@ +# 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 typing import List, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.dashboard_search_result_data import DashboardSearchResultData + from datadog_api_client.v2.model.dashboard_search_response_meta import DashboardSearchResponseMeta + + +class DashboardSearchResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.dashboard_search_result_data import DashboardSearchResultData + from datadog_api_client.v2.model.dashboard_search_response_meta import DashboardSearchResponseMeta + + return { + "data": ([DashboardSearchResultData],), + "meta": (DashboardSearchResponseMeta,), + } + + attribute_map = { + "data": "data", + "meta": "meta", + } + + def __init__(self_, data: List[DashboardSearchResultData], meta: DashboardSearchResponseMeta, **kwargs): + """ + Response containing dashboard search results. + + :param data: List of dashboard search results. + :type data: [DashboardSearchResultData] + + :param meta: Metadata about the dashboard search results. + :type meta: DashboardSearchResponseMeta + """ + super().__init__(kwargs) + + self_.data = data + self_.meta = meta diff --git a/src/datadog_api_client/v2/model/dashboard_search_response_meta.py b/src/datadog_api_client/v2/model/dashboard_search_response_meta.py new file mode 100644 index 0000000000..943a46aefd --- /dev/null +++ b/src/datadog_api_client/v2/model/dashboard_search_response_meta.py @@ -0,0 +1,49 @@ +# 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 typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.dashboard_search_aggregations import DashboardSearchAggregations + + +class DashboardSearchResponseMeta(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.dashboard_search_aggregations import DashboardSearchAggregations + + return { + "aggregations": (DashboardSearchAggregations,), + "total": (int,), + } + + attribute_map = { + "aggregations": "aggregations", + "total": "total", + } + + def __init__(self_, total: int, aggregations: Union[DashboardSearchAggregations, UnsetType] = unset, **kwargs): + """ + Metadata about the dashboard search results. + + :param aggregations: Aggregations of dashboard search results. + :type aggregations: DashboardSearchAggregations, optional + + :param total: Total number of dashboards found. + :type total: int + """ + if aggregations is not unset: + kwargs["aggregations"] = aggregations + super().__init__(kwargs) + + self_.total = total diff --git a/src/datadog_api_client/v2/model/dashboard_search_result_data.py b/src/datadog_api_client/v2/model/dashboard_search_result_data.py new file mode 100644 index 0000000000..5082a3f700 --- /dev/null +++ b/src/datadog_api_client/v2/model/dashboard_search_result_data.py @@ -0,0 +1,69 @@ +# 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 typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.dashboard_search_attributes import DashboardSearchAttributes + from datadog_api_client.v2.model.dashboard_search_metadata import DashboardSearchMetadata + from datadog_api_client.v2.model.metric_dashboard_type import MetricDashboardType + + +class DashboardSearchResultData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.dashboard_search_attributes import DashboardSearchAttributes + from datadog_api_client.v2.model.dashboard_search_metadata import DashboardSearchMetadata + from datadog_api_client.v2.model.metric_dashboard_type import MetricDashboardType + + return { + "attributes": (DashboardSearchAttributes,), + "id": (str,), + "meta": (DashboardSearchMetadata,), + "type": (MetricDashboardType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "meta": "meta", + "type": "type", + } + + def __init__( + self_, + attributes: DashboardSearchAttributes, + id: str, + meta: DashboardSearchMetadata, + type: MetricDashboardType, + **kwargs, + ): + """ + A dashboard search result. + + :param attributes: Dashboard search result attributes. + :type attributes: DashboardSearchAttributes + + :param id: Dashboard identifier. + :type id: str + + :param meta: Metadata about the dashboard. + :type meta: DashboardSearchMetadata + + :param type: Dashboard resource type. + :type type: MetricDashboardType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.id = id + self_.meta = meta + self_.type = type diff --git a/src/datadog_api_client/v2/model/dashboard_search_user.py b/src/datadog_api_client/v2/model/dashboard_search_user.py new file mode 100644 index 0000000000..47cd4cfe28 --- /dev/null +++ b/src/datadog_api_client/v2/model/dashboard_search_user.py @@ -0,0 +1,39 @@ +# 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 ( + ModelNormal, + cached_property, +) + + +class DashboardSearchUser(ModelNormal): + @cached_property + def openapi_types(_): + return { + "handle": (str,), + "name": (str,), + } + + attribute_map = { + "handle": "handle", + "name": "name", + } + + def __init__(self_, handle: str, name: str, **kwargs): + """ + User information. + + :param handle: User handle or email. + :type handle: str + + :param name: User display name. + :type name: str + """ + super().__init__(kwargs) + + self_.handle = handle + self_.name = name diff --git a/src/datadog_api_client/v2/model/notebook_search_aggregation_bucket_key.py b/src/datadog_api_client/v2/model/notebook_search_aggregation_bucket_key.py new file mode 100644 index 0000000000..6f5289ff2e --- /dev/null +++ b/src/datadog_api_client/v2/model/notebook_search_aggregation_bucket_key.py @@ -0,0 +1,39 @@ +# 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 ( + ModelNormal, + cached_property, +) + + +class NotebookSearchAggregationBucketKey(ModelNormal): + @cached_property + def openapi_types(_): + return { + "count": (int,), + "value": (str,), + } + + attribute_map = { + "count": "count", + "value": "value", + } + + def __init__(self_, count: int, value: str, **kwargs): + """ + Aggregation bucket with a single key value. + + :param count: Number of results in this bucket. + :type count: int + + :param value: Key value for this bucket. + :type value: str + """ + super().__init__(kwargs) + + self_.count = count + self_.value = value diff --git a/src/datadog_api_client/v2/model/notebook_search_aggregation_bucket_multi_key.py b/src/datadog_api_client/v2/model/notebook_search_aggregation_bucket_multi_key.py new file mode 100644 index 0000000000..85707aedf1 --- /dev/null +++ b/src/datadog_api_client/v2/model/notebook_search_aggregation_bucket_multi_key.py @@ -0,0 +1,40 @@ +# 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 typing import List + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +class NotebookSearchAggregationBucketMultiKey(ModelNormal): + @cached_property + def openapi_types(_): + return { + "count": (int,), + "value": ([str],), + } + + attribute_map = { + "count": "count", + "value": "value", + } + + def __init__(self_, count: int, value: List[str], **kwargs): + """ + Aggregation bucket with multiple key values. + + :param count: Number of results in this bucket. + :type count: int + + :param value: Key values for this bucket. + :type value: [str] + """ + super().__init__(kwargs) + + self_.count = count + self_.value = value diff --git a/src/datadog_api_client/v2/model/notebook_search_aggregations.py b/src/datadog_api_client/v2/model/notebook_search_aggregations.py new file mode 100644 index 0000000000..152da83035 --- /dev/null +++ b/src/datadog_api_client/v2/model/notebook_search_aggregations.py @@ -0,0 +1,78 @@ +# 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 typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.notebook_search_aggregation_bucket_multi_key import ( + NotebookSearchAggregationBucketMultiKey, + ) + from datadog_api_client.v2.model.notebook_search_aggregation_bucket_key import NotebookSearchAggregationBucketKey + + +class NotebookSearchAggregations(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.notebook_search_aggregation_bucket_multi_key import ( + NotebookSearchAggregationBucketMultiKey, + ) + from datadog_api_client.v2.model.notebook_search_aggregation_bucket_key import ( + NotebookSearchAggregationBucketKey, + ) + + return { + "author": ([NotebookSearchAggregationBucketMultiKey],), + "tags": ([NotebookSearchAggregationBucketKey],), + "template_variables_name": ([NotebookSearchAggregationBucketKey],), + "type": ([NotebookSearchAggregationBucketKey],), + } + + attribute_map = { + "author": "author", + "tags": "tags", + "template_variables_name": "template_variables.name", + "type": "type", + } + + def __init__( + self_, + author: Union[List[NotebookSearchAggregationBucketMultiKey], UnsetType] = unset, + tags: Union[List[NotebookSearchAggregationBucketKey], UnsetType] = unset, + template_variables_name: Union[List[NotebookSearchAggregationBucketKey], UnsetType] = unset, + type: Union[List[NotebookSearchAggregationBucketKey], UnsetType] = unset, + **kwargs, + ): + """ + Aggregations of notebook search results. + + :param author: Aggregation by author. + :type author: [NotebookSearchAggregationBucketMultiKey], optional + + :param tags: Aggregation by tags. + :type tags: [NotebookSearchAggregationBucketKey], optional + + :param template_variables_name: Aggregation by template variable names. + :type template_variables_name: [NotebookSearchAggregationBucketKey], optional + + :param type: Aggregation by notebook type. + :type type: [NotebookSearchAggregationBucketKey], optional + """ + if author is not unset: + kwargs["author"] = author + if tags is not unset: + kwargs["tags"] = tags + if template_variables_name is not unset: + kwargs["template_variables_name"] = template_variables_name + if type is not unset: + kwargs["type"] = type + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/notebook_search_attributes.py b/src/datadog_api_client/v2/model/notebook_search_attributes.py new file mode 100644 index 0000000000..e1bfdf4e37 --- /dev/null +++ b/src/datadog_api_client/v2/model/notebook_search_attributes.py @@ -0,0 +1,52 @@ +# 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 typing import List, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.notebook_search_metadata import NotebookSearchMetadata + + +class NotebookSearchAttributes(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.notebook_search_metadata import NotebookSearchMetadata + + return { + "meta": (NotebookSearchMetadata,), + "name": (str,), + "tags": ([str],), + } + + attribute_map = { + "meta": "meta", + "name": "name", + "tags": "tags", + } + + def __init__(self_, meta: NotebookSearchMetadata, name: str, tags: List[str], **kwargs): + """ + Notebook search result attributes. + + :param meta: Metadata about the notebook. + :type meta: NotebookSearchMetadata + + :param name: Name of the notebook. + :type name: str + + :param tags: List of tags for the notebook. + :type tags: [str] + """ + super().__init__(kwargs) + + self_.meta = meta + self_.name = name + self_.tags = tags diff --git a/src/datadog_api_client/v2/model/notebook_search_highlight.py b/src/datadog_api_client/v2/model/notebook_search_highlight.py new file mode 100644 index 0000000000..960c80e146 --- /dev/null +++ b/src/datadog_api_client/v2/model/notebook_search_highlight.py @@ -0,0 +1,56 @@ +# 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 typing import List, Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class NotebookSearchHighlight(ModelNormal): + @cached_property + def openapi_types(_): + return { + "cells_text": ([str],), + "cells_title": ([str],), + "name": ([str],), + } + + attribute_map = { + "cells_text": "cells.text", + "cells_title": "cells.title", + "name": "name", + } + + def __init__( + self_, + cells_text: Union[List[str], UnsetType] = unset, + cells_title: Union[List[str], UnsetType] = unset, + name: Union[List[str], UnsetType] = unset, + **kwargs, + ): + """ + Highlighted fields from the notebook search. + + :param cells_text: Highlighted cell text matches. + :type cells_text: [str], optional + + :param cells_title: Highlighted cell title matches. + :type cells_title: [str], optional + + :param name: Highlighted notebook name matches. + :type name: [str], optional + """ + if cells_text is not unset: + kwargs["cells_text"] = cells_text + if cells_title is not unset: + kwargs["cells_title"] = cells_title + if name is not unset: + kwargs["name"] = name + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/notebook_search_metadata.py b/src/datadog_api_client/v2/model/notebook_search_metadata.py new file mode 100644 index 0000000000..0d8477b5d5 --- /dev/null +++ b/src/datadog_api_client/v2/model/notebook_search_metadata.py @@ -0,0 +1,123 @@ +# 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 typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + datetime, + none_type, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.notebook_search_user import NotebookSearchUser + + +class NotebookSearchMetadata(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.notebook_search_user import NotebookSearchUser + + return { + "author": (NotebookSearchUser,), + "cell_count": (int,), + "created_at": (datetime,), + "deleted_at": (datetime, none_type), + "experience_type": (str, none_type), + "has_computational_cells": (bool,), + "is_favorited": (bool,), + "is_template": (bool,), + "modified_at": (datetime,), + "status": (str,), + "take_snapshots": (bool,), + "type": (str,), + } + + attribute_map = { + "author": "author", + "cell_count": "cell_count", + "created_at": "created_at", + "deleted_at": "deleted_at", + "experience_type": "experience_type", + "has_computational_cells": "has_computational_cells", + "is_favorited": "is_favorited", + "is_template": "is_template", + "modified_at": "modified_at", + "status": "status", + "take_snapshots": "take_snapshots", + "type": "type", + } + + def __init__( + self_, + author: NotebookSearchUser, + cell_count: int, + created_at: datetime, + deleted_at: Union[datetime, none_type], + experience_type: Union[str, none_type], + has_computational_cells: bool, + is_favorited: bool, + is_template: bool, + modified_at: datetime, + status: str, + take_snapshots: bool, + type: str, + **kwargs, + ): + """ + Metadata about the notebook. + + :param author: User information. + :type author: NotebookSearchUser + + :param cell_count: Number of cells in the notebook. + :type cell_count: int + + :param created_at: Time at which the notebook was created. + :type created_at: datetime + + :param deleted_at: Time at which the notebook was deleted, or null if not deleted. + :type deleted_at: datetime, none_type + + :param experience_type: Experience type of the notebook. + :type experience_type: str, none_type + + :param has_computational_cells: Whether the notebook has computational cells. + :type has_computational_cells: bool + + :param is_favorited: Whether the notebook is favorited by the user. + :type is_favorited: bool + + :param is_template: Whether the notebook is a template. + :type is_template: bool + + :param modified_at: Time at which the notebook was last updated. + :type modified_at: datetime + + :param status: Status of the notebook. + :type status: str + + :param take_snapshots: Whether the notebook can take a snapshot. + :type take_snapshots: bool + + :param type: Notebook type. + :type type: str + """ + super().__init__(kwargs) + + self_.author = author + self_.cell_count = cell_count + self_.created_at = created_at + self_.deleted_at = deleted_at + self_.experience_type = experience_type + self_.has_computational_cells = has_computational_cells + self_.is_favorited = is_favorited + self_.is_template = is_template + self_.modified_at = modified_at + self_.status = status + self_.take_snapshots = take_snapshots + self_.type = type diff --git a/src/datadog_api_client/v2/model/notebook_search_response.py b/src/datadog_api_client/v2/model/notebook_search_response.py new file mode 100644 index 0000000000..e650bea56b --- /dev/null +++ b/src/datadog_api_client/v2/model/notebook_search_response.py @@ -0,0 +1,48 @@ +# 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 typing import List, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.notebook_search_result_data import NotebookSearchResultData + from datadog_api_client.v2.model.notebook_search_response_meta import NotebookSearchResponseMeta + + +class NotebookSearchResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.notebook_search_result_data import NotebookSearchResultData + from datadog_api_client.v2.model.notebook_search_response_meta import NotebookSearchResponseMeta + + return { + "data": ([NotebookSearchResultData],), + "meta": (NotebookSearchResponseMeta,), + } + + attribute_map = { + "data": "data", + "meta": "meta", + } + + def __init__(self_, data: List[NotebookSearchResultData], meta: NotebookSearchResponseMeta, **kwargs): + """ + Response containing notebook search results. + + :param data: List of notebook search results. + :type data: [NotebookSearchResultData] + + :param meta: Metadata about the notebook search results. + :type meta: NotebookSearchResponseMeta + """ + super().__init__(kwargs) + + self_.data = data + self_.meta = meta diff --git a/src/datadog_api_client/v2/model/notebook_search_response_meta.py b/src/datadog_api_client/v2/model/notebook_search_response_meta.py new file mode 100644 index 0000000000..909342fd86 --- /dev/null +++ b/src/datadog_api_client/v2/model/notebook_search_response_meta.py @@ -0,0 +1,49 @@ +# 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 typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.notebook_search_aggregations import NotebookSearchAggregations + + +class NotebookSearchResponseMeta(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.notebook_search_aggregations import NotebookSearchAggregations + + return { + "aggregations": (NotebookSearchAggregations,), + "total": (int,), + } + + attribute_map = { + "aggregations": "aggregations", + "total": "total", + } + + def __init__(self_, total: int, aggregations: Union[NotebookSearchAggregations, UnsetType] = unset, **kwargs): + """ + Metadata about the notebook search results. + + :param aggregations: Aggregations of notebook search results. + :type aggregations: NotebookSearchAggregations, optional + + :param total: Total number of notebooks found. + :type total: int + """ + if aggregations is not unset: + kwargs["aggregations"] = aggregations + super().__init__(kwargs) + + self_.total = total diff --git a/src/datadog_api_client/v2/model/notebook_search_result_data.py b/src/datadog_api_client/v2/model/notebook_search_result_data.py new file mode 100644 index 0000000000..2de28134cf --- /dev/null +++ b/src/datadog_api_client/v2/model/notebook_search_result_data.py @@ -0,0 +1,72 @@ +# 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 typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.notebook_search_highlight import NotebookSearchHighlight + from datadog_api_client.v2.model.notebook_search_attributes import NotebookSearchAttributes + from datadog_api_client.v2.model.metric_notebook_type import MetricNotebookType + + +class NotebookSearchResultData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.notebook_search_highlight import NotebookSearchHighlight + from datadog_api_client.v2.model.notebook_search_attributes import NotebookSearchAttributes + from datadog_api_client.v2.model.metric_notebook_type import MetricNotebookType + + return { + "highlight": (NotebookSearchHighlight,), + "id": (str,), + "notebook_data": (NotebookSearchAttributes,), + "type": (MetricNotebookType,), + } + + attribute_map = { + "highlight": "highlight", + "id": "id", + "notebook_data": "notebook_data", + "type": "type", + } + + def __init__( + self_, + id: str, + notebook_data: NotebookSearchAttributes, + type: MetricNotebookType, + highlight: Union[NotebookSearchHighlight, UnsetType] = unset, + **kwargs, + ): + """ + A notebook search result. + + :param highlight: Highlighted fields from the notebook search. + :type highlight: NotebookSearchHighlight, optional + + :param id: Notebook identifier. + :type id: str + + :param notebook_data: Notebook search result attributes. + :type notebook_data: NotebookSearchAttributes + + :param type: Notebook resource type. + :type type: MetricNotebookType + """ + if highlight is not unset: + kwargs["highlight"] = highlight + super().__init__(kwargs) + + self_.id = id + self_.notebook_data = notebook_data + self_.type = type diff --git a/src/datadog_api_client/v2/model/notebook_search_user.py b/src/datadog_api_client/v2/model/notebook_search_user.py new file mode 100644 index 0000000000..c76661372b --- /dev/null +++ b/src/datadog_api_client/v2/model/notebook_search_user.py @@ -0,0 +1,39 @@ +# 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 ( + ModelNormal, + cached_property, +) + + +class NotebookSearchUser(ModelNormal): + @cached_property + def openapi_types(_): + return { + "handle": (str,), + "name": (str,), + } + + attribute_map = { + "handle": "handle", + "name": "name", + } + + def __init__(self_, handle: str, name: str, **kwargs): + """ + User information. + + :param handle: User handle or email. + :type handle: str + + :param name: User display name. + :type name: str + """ + super().__init__(kwargs) + + self_.handle = handle + self_.name = name diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index 400d568fb4..3123dd3f9a 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -1466,6 +1466,17 @@ from datadog_api_client.v2.model.dashboard_list_items import DashboardListItems from datadog_api_client.v2.model.dashboard_list_update_items_request import DashboardListUpdateItemsRequest from datadog_api_client.v2.model.dashboard_list_update_items_response import DashboardListUpdateItemsResponse +from datadog_api_client.v2.model.dashboard_search_aggregation_bucket_key import DashboardSearchAggregationBucketKey +from datadog_api_client.v2.model.dashboard_search_aggregation_bucket_multi_key import ( + DashboardSearchAggregationBucketMultiKey, +) +from datadog_api_client.v2.model.dashboard_search_aggregations import DashboardSearchAggregations +from datadog_api_client.v2.model.dashboard_search_attributes import DashboardSearchAttributes +from datadog_api_client.v2.model.dashboard_search_metadata import DashboardSearchMetadata +from datadog_api_client.v2.model.dashboard_search_response import DashboardSearchResponse +from datadog_api_client.v2.model.dashboard_search_response_meta import DashboardSearchResponseMeta +from datadog_api_client.v2.model.dashboard_search_result_data import DashboardSearchResultData +from datadog_api_client.v2.model.dashboard_search_user import DashboardSearchUser from datadog_api_client.v2.model.dashboard_trigger_wrapper import DashboardTriggerWrapper from datadog_api_client.v2.model.dashboard_type import DashboardType from datadog_api_client.v2.model.data_deletion_response_item import DataDeletionResponseItem @@ -3105,6 +3116,18 @@ from datadog_api_client.v2.model.monthly_cost_attribution_meta import MonthlyCostAttributionMeta from datadog_api_client.v2.model.monthly_cost_attribution_pagination import MonthlyCostAttributionPagination from datadog_api_client.v2.model.monthly_cost_attribution_response import MonthlyCostAttributionResponse +from datadog_api_client.v2.model.notebook_search_aggregation_bucket_key import NotebookSearchAggregationBucketKey +from datadog_api_client.v2.model.notebook_search_aggregation_bucket_multi_key import ( + NotebookSearchAggregationBucketMultiKey, +) +from datadog_api_client.v2.model.notebook_search_aggregations import NotebookSearchAggregations +from datadog_api_client.v2.model.notebook_search_attributes import NotebookSearchAttributes +from datadog_api_client.v2.model.notebook_search_highlight import NotebookSearchHighlight +from datadog_api_client.v2.model.notebook_search_metadata import NotebookSearchMetadata +from datadog_api_client.v2.model.notebook_search_response import NotebookSearchResponse +from datadog_api_client.v2.model.notebook_search_response_meta import NotebookSearchResponseMeta +from datadog_api_client.v2.model.notebook_search_result_data import NotebookSearchResultData +from datadog_api_client.v2.model.notebook_search_user import NotebookSearchUser from datadog_api_client.v2.model.notebook_trigger_wrapper import NotebookTriggerWrapper from datadog_api_client.v2.model.notification_channel import NotificationChannel from datadog_api_client.v2.model.notification_channel_attributes import NotificationChannelAttributes @@ -7018,6 +7041,15 @@ "DashboardListItems", "DashboardListUpdateItemsRequest", "DashboardListUpdateItemsResponse", + "DashboardSearchAggregationBucketKey", + "DashboardSearchAggregationBucketMultiKey", + "DashboardSearchAggregations", + "DashboardSearchAttributes", + "DashboardSearchMetadata", + "DashboardSearchResponse", + "DashboardSearchResponseMeta", + "DashboardSearchResultData", + "DashboardSearchUser", "DashboardTriggerWrapper", "DashboardType", "DataDeletionResponseItem", @@ -8319,6 +8351,16 @@ "MonthlyCostAttributionMeta", "MonthlyCostAttributionPagination", "MonthlyCostAttributionResponse", + "NotebookSearchAggregationBucketKey", + "NotebookSearchAggregationBucketMultiKey", + "NotebookSearchAggregations", + "NotebookSearchAttributes", + "NotebookSearchHighlight", + "NotebookSearchMetadata", + "NotebookSearchResponse", + "NotebookSearchResponseMeta", + "NotebookSearchResultData", + "NotebookSearchUser", "NotebookTriggerWrapper", "NotificationChannel", "NotificationChannelAttributes", diff --git a/tests/v2/features/dashboards.feature b/tests/v2/features/dashboards.feature new file mode 100644 index 0000000000..8601f547e9 --- /dev/null +++ b/tests/v2/features/dashboards.feature @@ -0,0 +1,21 @@ +@endpoint(dashboards) @endpoint(dashboards-v2) +Feature: Dashboards + Interact with your dashboards through the API to search and retrieve + dashboards. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "Dashboards" API + And operation "SearchDashboards" enabled + And new "SearchDashboards" request + + @generated @skip @team:DataDog/notebooks-backend + Scenario: Search dashboards returns "Bad Request" response + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/notebooks-backend + Scenario: Search dashboards returns "OK" response + When the request is sent + Then the response status is 200 OK diff --git a/tests/v2/features/notebooks.feature b/tests/v2/features/notebooks.feature new file mode 100644 index 0000000000..2b5255c89b --- /dev/null +++ b/tests/v2/features/notebooks.feature @@ -0,0 +1,21 @@ +@endpoint(notebooks) @endpoint(notebooks-v2) +Feature: Notebooks + Interact with your notebooks through the API to search and retrieve + notebooks. + + Background: + Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system + And an instance of "Notebooks" API + And operation "SearchNotebooks" enabled + And new "SearchNotebooks" request + + @generated @skip @team:DataDog/notebooks-backend + Scenario: Search notebooks returns "Bad Request" response + When the request is sent + Then the response status is 400 Bad Request + + @generated @skip @team:DataDog/notebooks-backend + Scenario: Search notebooks returns "OK" response + When the request is sent + Then the response status is 200 OK diff --git a/tests/v2/features/undo.json b/tests/v2/features/undo.json index 7e549784ee..d561c026ce 100644 --- a/tests/v2/features/undo.json +++ b/tests/v2/features/undo.json @@ -1319,6 +1319,12 @@ "type": "safe" } }, + "SearchDashboards": { + "tag": "Dashboards", + "undo": { + "type": "safe" + } + }, "GetAllDatasets": { "tag": "Datasets", "undo": { @@ -3110,6 +3116,12 @@ "type": "safe" } }, + "SearchNotebooks": { + "tag": "Notebooks", + "undo": { + "type": "safe" + } + }, "ListPipelines": { "tag": "Observability Pipelines", "undo": {