From 6ff535045307fa396f054f1d0b1d83a8000ef734 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Thu, 26 Dec 2024 22:06:55 +0000 Subject: [PATCH] Regenerate client from commit 930cad1d of spec repo --- .apigentools-info | 8 +- .generator/schemas/v2/openapi.yaml | 130 ++++++++---------- docs/datadog_api_client.v2.api.rst | 7 - docs/datadog_api_client.v2.model.rst | 21 --- .../v2/{app-deployment => apps}/DeployApp.py | 4 +- .../v2/{app-deployment => apps}/DisableApp.py | 4 +- src/datadog_api_client/configuration.py | 4 +- .../v2/api/app_deployment_api.py | 100 -------------- src/datadog_api_client/v2/api/apps_api.py | 130 ++++++++++++++++-- src/datadog_api_client/v2/apis/__init__.py | 2 - .../v2/model/app_builder_error.py | 42 ------ .../model/app_builder_error_errors_items.py | 54 -------- .../app_builder_error_errors_items_source.py | 43 ------ src/datadog_api_client/v2/model/app_meta.py | 7 +- .../v2/model/deployment_included_meta.py | 7 +- .../v2/model/deployment_meta.py | 7 +- .../v2/model/deployment_relationship_meta.py | 7 +- src/datadog_api_client/v2/models/__init__.py | 6 - ...te_app_returns_app_created_response.frozen | 2 +- ...eate_app_returns_app_created_response.yaml | 6 +- ...te_app_returns_bad_request_response.frozen | 2 +- ...te_app_returns_bad_request_response.frozen | 2 +- ...lete_app_returns_not_found_response.frozen | 2 +- ...test_delete_app_returns_ok_response.frozen | 2 +- .../test_delete_app_returns_ok_response.yaml | 8 +- ...e_apps_returns_bad_request_response.frozen | 2 +- ...ple_apps_returns_not_found_response.frozen | 2 +- ...e_multiple_apps_returns_ok_response.frozen | 2 +- ...ete_multiple_apps_returns_ok_response.yaml | 8 +- ...oy_app_returns_bad_request_response.frozen | 2 +- ...deploy_app_returns_created_response.frozen | 2 +- ...t_deploy_app_returns_created_response.yaml | 10 +- ...ploy_app_returns_not_found_response.frozen | 2 +- ...le_app_returns_bad_request_response.frozen | 2 +- ...able_app_returns_not_found_response.frozen | 2 +- ...est_disable_app_returns_ok_response.frozen | 2 +- .../test_disable_app_returns_ok_response.yaml | 10 +- ...et_app_returns_bad_request_response.frozen | 2 +- ..._get_app_returns_not_found_response.frozen | 2 +- .../test_get_app_returns_ok_response.frozen | 2 +- .../test_get_app_returns_ok_response.yaml | 12 +- .../test_list_apps_returns_ok_response.frozen | 2 +- .../test_list_apps_returns_ok_response.yaml | 5 +- ...te_app_returns_bad_request_response.frozen | 2 +- ...date_app_returns_bad_request_response.yaml | 10 +- ...test_update_app_returns_ok_response.frozen | 2 +- .../test_update_app_returns_ok_response.yaml | 14 +- tests/v2/features/apps.feature | 59 +++++++- tests/v2/features/given.json | 2 +- tests/v2/features/undo.json | 4 +- 50 files changed, 323 insertions(+), 448 deletions(-) rename examples/v2/{app-deployment => apps}/DeployApp.py (77%) rename examples/v2/{app-deployment => apps}/DisableApp.py (77%) delete mode 100644 src/datadog_api_client/v2/api/app_deployment_api.py delete mode 100644 src/datadog_api_client/v2/model/app_builder_error.py delete mode 100644 src/datadog_api_client/v2/model/app_builder_error_errors_items.py delete mode 100644 src/datadog_api_client/v2/model/app_builder_error_errors_items_source.py diff --git a/.apigentools-info b/.apigentools-info index 11c4e8ab5b..168bc0eae6 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2024-12-23 16:35:40.482863", - "spec_repo_commit": "19946d35" + "regenerated": "2024-12-26 22:06:23.168897", + "spec_repo_commit": "930cad1d" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2024-12-23 16:35:40.496603", - "spec_repo_commit": "19946d35" + "regenerated": "2024-12-26 22:06:23.182991", + "spec_repo_commit": "930cad1d" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 3480f9db3a..ea5a2767e0 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -1615,34 +1615,6 @@ components: type: string x-enum-varnames: - apm_retention_filter - AppBuilderError: - description: The definition of `AppBuilderError` object. - properties: - errors: - description: The `AppBuilderError` `errors`. - items: - $ref: '#/components/schemas/AppBuilderErrorErrorsItems' - type: array - type: object - AppBuilderErrorErrorsItems: - description: The definition of `AppBuilderErrorErrorsItems` object. - properties: - detail: - description: The `items` `detail`. - type: string - source: - $ref: '#/components/schemas/AppBuilderErrorErrorsItemsSource' - type: object - AppBuilderErrorErrorsItemsSource: - description: The definition of `AppBuilderErrorErrorsItemsSource` object. - properties: - parameter: - description: The `source` `parameter`. - type: string - pointer: - description: The `source` `pointer`. - type: string - type: object AppBuilderEvent: additionalProperties: {} description: The definition of `AppBuilderEvent` object. @@ -1729,6 +1701,7 @@ components: type: string user_uuid: description: The `AppMeta` `user_uuid`. + format: uuid type: string version: description: The `AppMeta` `version`. @@ -8765,6 +8738,7 @@ components: type: string user_uuid: description: The `meta` `user_uuid`. + format: uuid type: string type: object DeploymentIncludedType: @@ -8790,6 +8764,7 @@ components: type: string user_uuid: description: The `DeploymentMeta` `user_uuid`. + format: uuid type: string type: object DeploymentRelationship: @@ -8832,6 +8807,7 @@ components: type: string user_uuid: description: The `meta` `user_uuid`. + format: uuid type: string type: object DeploymentType: @@ -30153,19 +30129,19 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' + $ref: '#/components/schemas/JSONAPIErrorResponse' description: Bad Request '403': content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' - description: Forbidden, e.g. missing permissions to delete one or more apps + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Forbidden '404': content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' + $ref: '#/components/schemas/JSONAPIErrorResponse' description: Not Found '429': $ref: '#/components/responses/TooManyRequestsResponse' @@ -30182,63 +30158,71 @@ paths: description: List all apps, with optional filters and sorting operationId: ListApps parameters: - - description: The number of apps to return per page + - description: The number of apps to return per page. in: query name: limit required: false schema: format: int64 type: integer - - description: The page number to return + - description: The page number to return. in: query name: page required: false schema: format: int64 type: integer - - description: The `AppsFilter` `user_name`. + - description: Filter apps by the app creator. Usually the user's email. in: query name: filter[user_name] required: false schema: type: string - - description: The `AppsFilter` `user_uuid`. + - description: Filter apps by the app creator's UUID. in: query name: filter[user_uuid] required: false schema: + format: uuid type: string - - description: The `AppsFilter` `name`. + - description: Filter by app name. in: query name: filter[name] required: false schema: type: string - - description: The `AppsFilter` `query`. + - description: Filter apps by the app name or the app creator. in: query name: filter[query] required: false schema: type: string - - description: The `AppsFilter` `deployed`. + - description: Filter apps by whether they are published. in: query name: filter[deployed] required: false schema: type: boolean - - description: The `AppsFilter` `tags`. + - description: Filter apps by tags. in: query name: filter[tags] required: false schema: type: string - - description: The `AppsFilter` `favorite`. + - description: Filter apps by whether you have added them to your favorites. in: query name: filter[favorite] required: false schema: type: boolean - - explode: false + - description: Filter apps by whether they are enabled for self-service. + in: query + name: filter[self_service] + required: false + schema: + type: boolean + - description: The fields and direction to sort apps by. + explode: false in: query name: sort required: false @@ -30258,13 +30242,13 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' - description: Bad Request, e.g. invalid sort parameter + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Bad Request '403': content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' + $ref: '#/components/schemas/JSONAPIErrorResponse' description: Forbidden '429': $ref: '#/components/responses/TooManyRequestsResponse' @@ -30297,15 +30281,14 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' + $ref: '#/components/schemas/JSONAPIErrorResponse' description: Bad Request '403': content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' - description: Forbidden, e.g. missing required permissions to a connection - or workflow used in the app + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Forbidden '429': $ref: '#/components/responses/TooManyRequestsResponse' summary: Create App @@ -30340,25 +30323,25 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' + $ref: '#/components/schemas/JSONAPIErrorResponse' description: Bad Request '403': content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' + $ref: '#/components/schemas/JSONAPIErrorResponse' description: Forbidden '404': content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' + $ref: '#/components/schemas/JSONAPIErrorResponse' description: Not Found '410': content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' + $ref: '#/components/schemas/JSONAPIErrorResponse' description: Gone '429': $ref: '#/components/responses/TooManyRequestsResponse' @@ -30380,6 +30363,11 @@ paths: required: true schema: type: string + - in: query + name: version + required: false + schema: + type: string responses: '200': content: @@ -30391,19 +30379,19 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' + $ref: '#/components/schemas/JSONAPIErrorResponse' description: Bad Request '403': content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' + $ref: '#/components/schemas/JSONAPIErrorResponse' description: Forbidden '404': content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' + $ref: '#/components/schemas/JSONAPIErrorResponse' description: Not Found '429': $ref: '#/components/responses/TooManyRequestsResponse' @@ -30443,15 +30431,14 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' + $ref: '#/components/schemas/JSONAPIErrorResponse' description: Bad Request '403': content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' - description: Forbidden, e.g. missing required permissions to a connection - or workflow used in the app + $ref: '#/components/schemas/JSONAPIErrorResponse' + description: Forbidden '429': $ref: '#/components/responses/TooManyRequestsResponse' summary: Update App @@ -30486,25 +30473,25 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' + $ref: '#/components/schemas/JSONAPIErrorResponse' description: Bad Request '403': content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' + $ref: '#/components/schemas/JSONAPIErrorResponse' description: Forbidden '404': content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' + $ref: '#/components/schemas/JSONAPIErrorResponse' description: Not Found '429': $ref: '#/components/responses/TooManyRequestsResponse' summary: Disable App tags: - - App Deployment + - Apps x-permission: operator: OR permissions: @@ -30531,25 +30518,25 @@ paths: content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' + $ref: '#/components/schemas/JSONAPIErrorResponse' description: Bad Request '403': content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' + $ref: '#/components/schemas/JSONAPIErrorResponse' description: Forbidden '404': content: application/json: schema: - $ref: '#/components/schemas/AppBuilderError' + $ref: '#/components/schemas/JSONAPIErrorResponse' description: Not Found '429': $ref: '#/components/responses/TooManyRequestsResponse' summary: Deploy App tags: - - App Deployment + - Apps x-permission: operator: OR permissions: @@ -46584,9 +46571,10 @@ tags: externalDocs: url: https://docs.datadoghq.com/integrations/amazon_web_services/#log-collection name: AWS Logs Integration -- description: Deploy and disable apps in App Builder. - name: App Deployment -- description: Create, read, update, and delete apps in App Builder. +- description: Datadog App Builder provides a low-code solution to rapidly develop + and integrate secure, customized applications into your monitoring stack that + are built to accelerate remediation at scale. These API endpoints allow you to + create, read, update, delete, and publish apps. name: Apps - description: Search your Audit Logs events over HTTP. name: Audit diff --git a/docs/datadog_api_client.v2.api.rst b/docs/datadog_api_client.v2.api.rst index 1b7717be69..38b91e410d 100644 --- a/docs/datadog_api_client.v2.api.rst +++ b/docs/datadog_api_client.v2.api.rst @@ -18,13 +18,6 @@ datadog\_api\_client.v2.api.apm\_retention\_filters\_api module :members: :show-inheritance: -datadog\_api\_client.v2.api.app\_deployment\_api module -------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.api.app_deployment_api - :members: - :show-inheritance: - datadog\_api\_client.v2.api.apps\_api module -------------------------------------------- diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index ee21807a80..158a7eab4e 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -144,27 +144,6 @@ datadog\_api\_client.v2.model.apm\_retention\_filter\_type module :members: :show-inheritance: -datadog\_api\_client.v2.model.app\_builder\_error module --------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.app_builder_error - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.app\_builder\_error\_errors\_items module ------------------------------------------------------------------------ - -.. automodule:: datadog_api_client.v2.model.app_builder_error_errors_items - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.app\_builder\_error\_errors\_items\_source module -------------------------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.app_builder_error_errors_items_source - :members: - :show-inheritance: - datadog\_api\_client.v2.model.app\_builder\_event module -------------------------------------------------------- diff --git a/examples/v2/app-deployment/DeployApp.py b/examples/v2/apps/DeployApp.py similarity index 77% rename from examples/v2/app-deployment/DeployApp.py rename to examples/v2/apps/DeployApp.py index 421b5839a4..f07b7edb22 100644 --- a/examples/v2/app-deployment/DeployApp.py +++ b/examples/v2/apps/DeployApp.py @@ -4,7 +4,7 @@ from os import environ from datadog_api_client import ApiClient, Configuration -from datadog_api_client.v2.api.app_deployment_api import AppDeploymentApi +from datadog_api_client.v2.api.apps_api import AppsApi # there is a valid "app" in the system APP_DATA_ID = environ["APP_DATA_ID"] @@ -12,7 +12,7 @@ configuration = Configuration() configuration.unstable_operations["deploy_app"] = True with ApiClient(configuration) as api_client: - api_instance = AppDeploymentApi(api_client) + api_instance = AppsApi(api_client) response = api_instance.deploy_app( app_id=APP_DATA_ID, ) diff --git a/examples/v2/app-deployment/DisableApp.py b/examples/v2/apps/DisableApp.py similarity index 77% rename from examples/v2/app-deployment/DisableApp.py rename to examples/v2/apps/DisableApp.py index 04bce3e7ef..4268facf45 100644 --- a/examples/v2/app-deployment/DisableApp.py +++ b/examples/v2/apps/DisableApp.py @@ -4,7 +4,7 @@ from os import environ from datadog_api_client import ApiClient, Configuration -from datadog_api_client.v2.api.app_deployment_api import AppDeploymentApi +from datadog_api_client.v2.api.apps_api import AppsApi # there is a valid "app" in the system APP_DATA_ID = environ["APP_DATA_ID"] @@ -12,7 +12,7 @@ configuration = Configuration() configuration.unstable_operations["disable_app"] = True with ApiClient(configuration) as api_client: - api_instance = AppDeploymentApi(api_client) + api_instance = AppsApi(api_client) response = api_instance.disable_app( app_id=APP_DATA_ID, ) diff --git a/src/datadog_api_client/configuration.py b/src/datadog_api_client/configuration.py index 0d9ed7a83f..7d35926ed2 100644 --- a/src/datadog_api_client/configuration.py +++ b/src/datadog_api_client/configuration.py @@ -244,11 +244,11 @@ def __init__( "v2.create_app": False, "v2.delete_app": False, "v2.delete_apps": False, + "v2.deploy_app": False, + "v2.disable_app": False, "v2.get_app": False, "v2.list_apps": False, "v2.update_app": False, - "v2.deploy_app": False, - "v2.disable_app": False, "v2.get_active_billing_dimensions": False, "v2.get_billing_dimension_mapping": False, "v2.get_monthly_cost_attribution": False, diff --git a/src/datadog_api_client/v2/api/app_deployment_api.py b/src/datadog_api_client/v2/api/app_deployment_api.py deleted file mode 100644 index a4a2166327..0000000000 --- a/src/datadog_api_client/v2/api/app_deployment_api.py +++ /dev/null @@ -1,100 +0,0 @@ -# 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 - -from datadog_api_client.api_client import ApiClient, Endpoint as _Endpoint -from datadog_api_client.configuration import Configuration -from datadog_api_client.v2.model.disable_app_response import DisableAppResponse -from datadog_api_client.v2.model.deploy_app_response import DeployAppResponse - - -class AppDeploymentApi: - """ - Deploy and disable apps in App Builder. - """ - - def __init__(self, api_client=None): - if api_client is None: - api_client = ApiClient(Configuration()) - self.api_client = api_client - - self._deploy_app_endpoint = _Endpoint( - settings={ - "response_type": (DeployAppResponse,), - "auth": ["apiKeyAuth", "appKeyAuth"], - "endpoint_path": "/api/v2/app-builder/apps/{app_id}/deployment", - "operation_id": "deploy_app", - "http_method": "POST", - "version": "v2", - }, - params_map={ - "app_id": { - "required": True, - "openapi_types": (str,), - "attribute": "app_id", - "location": "path", - }, - }, - headers_map={ - "accept": ["application/json"], - }, - api_client=api_client, - ) - - self._disable_app_endpoint = _Endpoint( - settings={ - "response_type": (DisableAppResponse,), - "auth": ["apiKeyAuth", "appKeyAuth"], - "endpoint_path": "/api/v2/app-builder/apps/{app_id}/deployment", - "operation_id": "disable_app", - "http_method": "DELETE", - "version": "v2", - }, - params_map={ - "app_id": { - "required": True, - "openapi_types": (str,), - "attribute": "app_id", - "location": "path", - }, - }, - headers_map={ - "accept": ["application/json"], - }, - api_client=api_client, - ) - - def deploy_app( - self, - app_id: str, - ) -> DeployAppResponse: - """Deploy App. - - Deploy (publish) an app by ID - - :type app_id: str - :rtype: DeployAppResponse - """ - kwargs: Dict[str, Any] = {} - kwargs["app_id"] = app_id - - return self._deploy_app_endpoint.call_with_http_info(**kwargs) - - def disable_app( - self, - app_id: str, - ) -> DisableAppResponse: - """Disable App. - - Disable an app by ID - - :type app_id: str - :rtype: DisableAppResponse - """ - kwargs: Dict[str, Any] = {} - kwargs["app_id"] = app_id - - return self._disable_app_endpoint.call_with_http_info(**kwargs) diff --git a/src/datadog_api_client/v2/api/apps_api.py b/src/datadog_api_client/v2/api/apps_api.py index 323442f39f..c6bf12992b 100644 --- a/src/datadog_api_client/v2/api/apps_api.py +++ b/src/datadog_api_client/v2/api/apps_api.py @@ -10,6 +10,7 @@ from datadog_api_client.model_utils import ( UnsetType, unset, + UUID, ) from datadog_api_client.v2.model.delete_apps_response import DeleteAppsResponse from datadog_api_client.v2.model.delete_apps_request import DeleteAppsRequest @@ -21,11 +22,13 @@ from datadog_api_client.v2.model.get_app_response import GetAppResponse from datadog_api_client.v2.model.update_app_response import UpdateAppResponse from datadog_api_client.v2.model.update_app_request import UpdateAppRequest +from datadog_api_client.v2.model.disable_app_response import DisableAppResponse +from datadog_api_client.v2.model.deploy_app_response import DeployAppResponse class AppsApi: """ - Create, read, update, and delete apps in App Builder. + Datadog App Builder provides a low-code solution to rapidly develop and integrate secure, customized applications into your monitoring stack that are built to accelerate remediation at scale. These API endpoints allow you to create, read, update, delete, and publish apps. """ def __init__(self, api_client=None): @@ -96,6 +99,52 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._deploy_app_endpoint = _Endpoint( + settings={ + "response_type": (DeployAppResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/app-builder/apps/{app_id}/deployment", + "operation_id": "deploy_app", + "http_method": "POST", + "version": "v2", + }, + params_map={ + "app_id": { + "required": True, + "openapi_types": (str,), + "attribute": "app_id", + "location": "path", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + + self._disable_app_endpoint = _Endpoint( + settings={ + "response_type": (DisableAppResponse,), + "auth": ["apiKeyAuth", "appKeyAuth"], + "endpoint_path": "/api/v2/app-builder/apps/{app_id}/deployment", + "operation_id": "disable_app", + "http_method": "DELETE", + "version": "v2", + }, + params_map={ + "app_id": { + "required": True, + "openapi_types": (str,), + "attribute": "app_id", + "location": "path", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + self._get_app_endpoint = _Endpoint( settings={ "response_type": (GetAppResponse,), @@ -112,6 +161,11 @@ def __init__(self, api_client=None): "attribute": "app_id", "location": "path", }, + "version": { + "openapi_types": (str,), + "attribute": "version", + "location": "query", + }, }, headers_map={ "accept": ["application/json"], @@ -145,7 +199,7 @@ def __init__(self, api_client=None): "location": "query", }, "filter_user_uuid": { - "openapi_types": (str,), + "openapi_types": (UUID,), "attribute": "filter[user_uuid]", "location": "query", }, @@ -174,6 +228,11 @@ def __init__(self, api_client=None): "attribute": "filter[favorite]", "location": "query", }, + "filter_self_service": { + "openapi_types": (bool,), + "attribute": "filter[self_service]", + "location": "query", + }, "sort": { "openapi_types": ([AppsSortField],), "attribute": "sort", @@ -261,20 +320,58 @@ def delete_apps( return self._delete_apps_endpoint.call_with_http_info(**kwargs) + def deploy_app( + self, + app_id: str, + ) -> DeployAppResponse: + """Deploy App. + + Deploy (publish) an app by ID + + :type app_id: str + :rtype: DeployAppResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["app_id"] = app_id + + return self._deploy_app_endpoint.call_with_http_info(**kwargs) + + def disable_app( + self, + app_id: str, + ) -> DisableAppResponse: + """Disable App. + + Disable an app by ID + + :type app_id: str + :rtype: DisableAppResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["app_id"] = app_id + + return self._disable_app_endpoint.call_with_http_info(**kwargs) + def get_app( self, app_id: str, + *, + version: Union[str, UnsetType] = unset, ) -> GetAppResponse: """Get App. Get the full definition of an app by ID :type app_id: str + :type version: str, optional :rtype: GetAppResponse """ kwargs: Dict[str, Any] = {} kwargs["app_id"] = app_id + if version is not unset: + kwargs["version"] = version + return self._get_app_endpoint.call_with_http_info(**kwargs) def list_apps( @@ -283,36 +380,40 @@ def list_apps( limit: Union[int, UnsetType] = unset, page: Union[int, UnsetType] = unset, filter_user_name: Union[str, UnsetType] = unset, - filter_user_uuid: Union[str, UnsetType] = unset, + filter_user_uuid: Union[UUID, UnsetType] = unset, filter_name: Union[str, UnsetType] = unset, filter_query: Union[str, UnsetType] = unset, filter_deployed: Union[bool, UnsetType] = unset, filter_tags: Union[str, UnsetType] = unset, filter_favorite: Union[bool, UnsetType] = unset, + filter_self_service: Union[bool, UnsetType] = unset, sort: Union[List[AppsSortField], UnsetType] = unset, ) -> ListAppsResponse: """List Apps. List all apps, with optional filters and sorting - :param limit: The number of apps to return per page + :param limit: The number of apps to return per page. :type limit: int, optional - :param page: The page number to return + :param page: The page number to return. :type page: int, optional - :param filter_user_name: The ``AppsFilter`` ``user_name``. + :param filter_user_name: Filter apps by the app creator. Usually the user's email. :type filter_user_name: str, optional - :param filter_user_uuid: The ``AppsFilter`` ``user_uuid``. - :type filter_user_uuid: str, optional - :param filter_name: The ``AppsFilter`` ``name``. + :param filter_user_uuid: Filter apps by the app creator's UUID. + :type filter_user_uuid: UUID, optional + :param filter_name: Filter by app name. :type filter_name: str, optional - :param filter_query: The ``AppsFilter`` ``query``. + :param filter_query: Filter apps by the app name or the app creator. :type filter_query: str, optional - :param filter_deployed: The ``AppsFilter`` ``deployed``. + :param filter_deployed: Filter apps by whether they are published. :type filter_deployed: bool, optional - :param filter_tags: The ``AppsFilter`` ``tags``. + :param filter_tags: Filter apps by tags. :type filter_tags: str, optional - :param filter_favorite: The ``AppsFilter`` ``favorite``. + :param filter_favorite: Filter apps by whether you have added them to your favorites. :type filter_favorite: bool, optional + :param filter_self_service: Filter apps by whether they are enabled for self-service. + :type filter_self_service: bool, optional + :param sort: The fields and direction to sort apps by. :type sort: [AppsSortField], optional :rtype: ListAppsResponse """ @@ -344,6 +445,9 @@ def list_apps( if filter_favorite is not unset: kwargs["filter_favorite"] = filter_favorite + if filter_self_service is not unset: + kwargs["filter_self_service"] = filter_self_service + if sort is not unset: kwargs["sort"] = sort diff --git a/src/datadog_api_client/v2/apis/__init__.py b/src/datadog_api_client/v2/apis/__init__.py index 7bfde833c1..c558054284 100644 --- a/src/datadog_api_client/v2/apis/__init__.py +++ b/src/datadog_api_client/v2/apis/__init__.py @@ -2,7 +2,6 @@ from datadog_api_client.v2.api.apm_retention_filters_api import APMRetentionFiltersApi from datadog_api_client.v2.api.aws_integration_api import AWSIntegrationApi from datadog_api_client.v2.api.aws_logs_integration_api import AWSLogsIntegrationApi -from datadog_api_client.v2.api.app_deployment_api import AppDeploymentApi from datadog_api_client.v2.api.apps_api import AppsApi from datadog_api_client.v2.api.audit_api import AuditApi from datadog_api_client.v2.api.authn_mappings_api import AuthNMappingsApi @@ -67,7 +66,6 @@ "APMRetentionFiltersApi", "AWSIntegrationApi", "AWSLogsIntegrationApi", - "AppDeploymentApi", "AppsApi", "AuditApi", "AuthNMappingsApi", diff --git a/src/datadog_api_client/v2/model/app_builder_error.py b/src/datadog_api_client/v2/model/app_builder_error.py deleted file mode 100644 index af6ceef72e..0000000000 --- a/src/datadog_api_client/v2/model/app_builder_error.py +++ /dev/null @@ -1,42 +0,0 @@ -# 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.app_builder_error_errors_items import AppBuilderErrorErrorsItems - - -class AppBuilderError(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.app_builder_error_errors_items import AppBuilderErrorErrorsItems - - return { - "errors": ([AppBuilderErrorErrorsItems],), - } - - attribute_map = { - "errors": "errors", - } - - def __init__(self_, errors: Union[List[AppBuilderErrorErrorsItems], UnsetType] = unset, **kwargs): - """ - The definition of ``AppBuilderError`` object. - - :param errors: The ``AppBuilderError`` ``errors``. - :type errors: [AppBuilderErrorErrorsItems], optional - """ - if errors is not unset: - kwargs["errors"] = errors - super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/app_builder_error_errors_items.py b/src/datadog_api_client/v2/model/app_builder_error_errors_items.py deleted file mode 100644 index 2f8a613d87..0000000000 --- a/src/datadog_api_client/v2/model/app_builder_error_errors_items.py +++ /dev/null @@ -1,54 +0,0 @@ -# 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.app_builder_error_errors_items_source import AppBuilderErrorErrorsItemsSource - - -class AppBuilderErrorErrorsItems(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.app_builder_error_errors_items_source import AppBuilderErrorErrorsItemsSource - - return { - "detail": (str,), - "source": (AppBuilderErrorErrorsItemsSource,), - } - - attribute_map = { - "detail": "detail", - "source": "source", - } - - def __init__( - self_, - detail: Union[str, UnsetType] = unset, - source: Union[AppBuilderErrorErrorsItemsSource, UnsetType] = unset, - **kwargs, - ): - """ - The definition of ``AppBuilderErrorErrorsItems`` object. - - :param detail: The ``items`` ``detail``. - :type detail: str, optional - - :param source: The definition of ``AppBuilderErrorErrorsItemsSource`` object. - :type source: AppBuilderErrorErrorsItemsSource, optional - """ - if detail is not unset: - kwargs["detail"] = detail - if source is not unset: - kwargs["source"] = source - super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/app_builder_error_errors_items_source.py b/src/datadog_api_client/v2/model/app_builder_error_errors_items_source.py deleted file mode 100644 index 1da430b929..0000000000 --- a/src/datadog_api_client/v2/model/app_builder_error_errors_items_source.py +++ /dev/null @@ -1,43 +0,0 @@ -# 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 - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, - unset, - UnsetType, -) - - -class AppBuilderErrorErrorsItemsSource(ModelNormal): - @cached_property - def openapi_types(_): - return { - "parameter": (str,), - "pointer": (str,), - } - - attribute_map = { - "parameter": "parameter", - "pointer": "pointer", - } - - def __init__(self_, parameter: Union[str, UnsetType] = unset, pointer: Union[str, UnsetType] = unset, **kwargs): - """ - The definition of ``AppBuilderErrorErrorsItemsSource`` object. - - :param parameter: The ``source`` ``parameter``. - :type parameter: str, optional - - :param pointer: The ``source`` ``pointer``. - :type pointer: str, optional - """ - if parameter is not unset: - kwargs["parameter"] = parameter - if pointer is not unset: - kwargs["pointer"] = pointer - super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/app_meta.py b/src/datadog_api_client/v2/model/app_meta.py index 297a3d0762..c7dd6bd6b8 100644 --- a/src/datadog_api_client/v2/model/app_meta.py +++ b/src/datadog_api_client/v2/model/app_meta.py @@ -10,6 +10,7 @@ cached_property, unset, UnsetType, + UUID, ) @@ -25,7 +26,7 @@ def openapi_types(_): "updated_since_deployment": (bool,), "user_id": (int,), "user_name": (str,), - "user_uuid": (str,), + "user_uuid": (UUID,), "version": (int,), } @@ -52,7 +53,7 @@ def __init__( updated_since_deployment: Union[bool, UnsetType] = unset, user_id: Union[int, UnsetType] = unset, user_name: Union[str, UnsetType] = unset, - user_uuid: Union[str, UnsetType] = unset, + user_uuid: Union[UUID, UnsetType] = unset, version: Union[int, UnsetType] = unset, **kwargs, ): @@ -84,7 +85,7 @@ def __init__( :type user_name: str, optional :param user_uuid: The ``AppMeta`` ``user_uuid``. - :type user_uuid: str, optional + :type user_uuid: UUID, optional :param version: The ``AppMeta`` ``version``. :type version: int, optional diff --git a/src/datadog_api_client/v2/model/deployment_included_meta.py b/src/datadog_api_client/v2/model/deployment_included_meta.py index 18f016f8df..10295ee6fa 100644 --- a/src/datadog_api_client/v2/model/deployment_included_meta.py +++ b/src/datadog_api_client/v2/model/deployment_included_meta.py @@ -10,6 +10,7 @@ cached_property, unset, UnsetType, + UUID, ) @@ -20,7 +21,7 @@ def openapi_types(_): "created_at": (str,), "user_id": (int,), "user_name": (str,), - "user_uuid": (str,), + "user_uuid": (UUID,), } attribute_map = { @@ -35,7 +36,7 @@ def __init__( created_at: Union[str, UnsetType] = unset, user_id: Union[int, UnsetType] = unset, user_name: Union[str, UnsetType] = unset, - user_uuid: Union[str, UnsetType] = unset, + user_uuid: Union[UUID, UnsetType] = unset, **kwargs, ): """ @@ -51,7 +52,7 @@ def __init__( :type user_name: str, optional :param user_uuid: The ``meta`` ``user_uuid``. - :type user_uuid: str, optional + :type user_uuid: UUID, optional """ if created_at is not unset: kwargs["created_at"] = created_at diff --git a/src/datadog_api_client/v2/model/deployment_meta.py b/src/datadog_api_client/v2/model/deployment_meta.py index a9793f8846..67af29d774 100644 --- a/src/datadog_api_client/v2/model/deployment_meta.py +++ b/src/datadog_api_client/v2/model/deployment_meta.py @@ -10,6 +10,7 @@ cached_property, unset, UnsetType, + UUID, ) @@ -20,7 +21,7 @@ def openapi_types(_): "created_at": (str,), "user_id": (int,), "user_name": (str,), - "user_uuid": (str,), + "user_uuid": (UUID,), } attribute_map = { @@ -35,7 +36,7 @@ def __init__( created_at: Union[str, UnsetType] = unset, user_id: Union[int, UnsetType] = unset, user_name: Union[str, UnsetType] = unset, - user_uuid: Union[str, UnsetType] = unset, + user_uuid: Union[UUID, UnsetType] = unset, **kwargs, ): """ @@ -51,7 +52,7 @@ def __init__( :type user_name: str, optional :param user_uuid: The ``DeploymentMeta`` ``user_uuid``. - :type user_uuid: str, optional + :type user_uuid: UUID, optional """ if created_at is not unset: kwargs["created_at"] = created_at diff --git a/src/datadog_api_client/v2/model/deployment_relationship_meta.py b/src/datadog_api_client/v2/model/deployment_relationship_meta.py index 56e8d04683..e9ed79c60a 100644 --- a/src/datadog_api_client/v2/model/deployment_relationship_meta.py +++ b/src/datadog_api_client/v2/model/deployment_relationship_meta.py @@ -10,6 +10,7 @@ cached_property, unset, UnsetType, + UUID, ) @@ -20,7 +21,7 @@ def openapi_types(_): "created_at": (str,), "user_id": (int,), "user_name": (str,), - "user_uuid": (str,), + "user_uuid": (UUID,), } attribute_map = { @@ -35,7 +36,7 @@ def __init__( created_at: Union[str, UnsetType] = unset, user_id: Union[int, UnsetType] = unset, user_name: Union[str, UnsetType] = unset, - user_uuid: Union[str, UnsetType] = unset, + user_uuid: Union[UUID, UnsetType] = unset, **kwargs, ): """ @@ -51,7 +52,7 @@ def __init__( :type user_name: str, optional :param user_uuid: The ``meta`` ``user_uuid``. - :type user_uuid: str, optional + :type user_uuid: UUID, optional """ if created_at is not unset: kwargs["created_at"] = created_at diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index e1ffb60604..07eaf1a8a5 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -57,9 +57,6 @@ from datadog_api_client.v2.model.active_billing_dimensions_response import ActiveBillingDimensionsResponse from datadog_api_client.v2.model.active_billing_dimensions_type import ActiveBillingDimensionsType from datadog_api_client.v2.model.apm_retention_filter_type import ApmRetentionFilterType -from datadog_api_client.v2.model.app_builder_error import AppBuilderError -from datadog_api_client.v2.model.app_builder_error_errors_items import AppBuilderErrorErrorsItems -from datadog_api_client.v2.model.app_builder_error_errors_items_source import AppBuilderErrorErrorsItemsSource from datadog_api_client.v2.model.app_builder_event import AppBuilderEvent from datadog_api_client.v2.model.app_builder_event_name import AppBuilderEventName from datadog_api_client.v2.model.app_builder_event_type import AppBuilderEventType @@ -2329,9 +2326,6 @@ "ActiveBillingDimensionsResponse", "ActiveBillingDimensionsType", "ApmRetentionFilterType", - "AppBuilderError", - "AppBuilderErrorErrorsItems", - "AppBuilderErrorErrorsItemsSource", "AppBuilderEvent", "AppBuilderEventName", "AppBuilderEventType", diff --git a/tests/v2/cassettes/test_scenarios/test_create_app_returns_app_created_response.frozen b/tests/v2/cassettes/test_scenarios/test_create_app_returns_app_created_response.frozen index 6dfadcf607..a188f56517 100644 --- a/tests/v2/cassettes/test_scenarios/test_create_app_returns_app_created_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_create_app_returns_app_created_response.frozen @@ -1 +1 @@ -2024-12-12T20:29:24.182Z \ No newline at end of file +2024-12-20T20:39:18.375Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_create_app_returns_app_created_response.yaml b/tests/v2/cassettes/test_scenarios/test_create_app_returns_app_created_response.yaml index 4fddd7dd33..7b343cb087 100644 --- a/tests/v2/cassettes/test_scenarios/test_create_app_returns_app_created_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_create_app_returns_app_created_response.yaml @@ -12,7 +12,7 @@ interactions: uri: https://api.datadoghq.com/api/v2/app-builder/apps response: body: - string: '{"data":{"id":"2d9dd18e-c574-454c-8d43-3045b731d6a2","type":"appDefinitions"}}' + string: '{"data":{"id":"02c52f8c-78d9-4c14-ac27-b0bcac36ce74","type":"appDefinitions"}}' headers: content-type: - application/vnd.api+json @@ -25,10 +25,10 @@ interactions: accept: - application/json method: DELETE - uri: https://api.datadoghq.com/api/v2/app-builder/apps/2d9dd18e-c574-454c-8d43-3045b731d6a2 + uri: https://api.datadoghq.com/api/v2/app-builder/apps/02c52f8c-78d9-4c14-ac27-b0bcac36ce74 response: body: - string: '{"data":{"id":"2d9dd18e-c574-454c-8d43-3045b731d6a2","type":"appDefinitions"}}' + string: '{"data":{"id":"02c52f8c-78d9-4c14-ac27-b0bcac36ce74","type":"appDefinitions"}}' headers: content-type: - application/vnd.api+json diff --git a/tests/v2/cassettes/test_scenarios/test_create_app_returns_bad_request_response.frozen b/tests/v2/cassettes/test_scenarios/test_create_app_returns_bad_request_response.frozen index 5912dc3441..6bab6b5177 100644 --- a/tests/v2/cassettes/test_scenarios/test_create_app_returns_bad_request_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_create_app_returns_bad_request_response.frozen @@ -1 +1 @@ -2024-12-10T19:57:10.031Z \ No newline at end of file +2024-12-20T20:39:18.779Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_delete_app_returns_bad_request_response.frozen b/tests/v2/cassettes/test_scenarios/test_delete_app_returns_bad_request_response.frozen index 3925b1b25d..f2fcc286e7 100644 --- a/tests/v2/cassettes/test_scenarios/test_delete_app_returns_bad_request_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_delete_app_returns_bad_request_response.frozen @@ -1 +1 @@ -2024-12-10T19:57:10.128Z \ No newline at end of file +2024-12-20T20:39:18.880Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_delete_app_returns_not_found_response.frozen b/tests/v2/cassettes/test_scenarios/test_delete_app_returns_not_found_response.frozen index cfa34bd9ba..fb9dd880bf 100644 --- a/tests/v2/cassettes/test_scenarios/test_delete_app_returns_not_found_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_delete_app_returns_not_found_response.frozen @@ -1 +1 @@ -2024-12-10T19:57:10.225Z \ No newline at end of file +2024-12-20T20:39:18.985Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_delete_app_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_delete_app_returns_ok_response.frozen index 81a74305ae..744eafd501 100644 --- a/tests/v2/cassettes/test_scenarios/test_delete_app_returns_ok_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_delete_app_returns_ok_response.frozen @@ -1 +1 @@ -2024-12-12T20:29:24.659Z \ No newline at end of file +2024-12-20T20:39:19.083Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_delete_app_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_delete_app_returns_ok_response.yaml index bd2452db0c..02953157c5 100644 --- a/tests/v2/cassettes/test_scenarios/test_delete_app_returns_ok_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_delete_app_returns_ok_response.yaml @@ -12,7 +12,7 @@ interactions: uri: https://api.datadoghq.com/api/v2/app-builder/apps response: body: - string: '{"data":{"id":"5cb67134-d7bd-4320-9cda-d79ec98cff4c","type":"appDefinitions"}}' + string: '{"data":{"id":"500bf715-77a5-4c1d-b4ef-0d181b071daf","type":"appDefinitions"}}' headers: content-type: - application/vnd.api+json @@ -25,10 +25,10 @@ interactions: accept: - application/json method: DELETE - uri: https://api.datadoghq.com/api/v2/app-builder/apps/5cb67134-d7bd-4320-9cda-d79ec98cff4c + uri: https://api.datadoghq.com/api/v2/app-builder/apps/500bf715-77a5-4c1d-b4ef-0d181b071daf response: body: - string: '{"data":{"id":"5cb67134-d7bd-4320-9cda-d79ec98cff4c","type":"appDefinitions"}}' + string: '{"data":{"id":"500bf715-77a5-4c1d-b4ef-0d181b071daf","type":"appDefinitions"}}' headers: content-type: - application/vnd.api+json @@ -41,7 +41,7 @@ interactions: accept: - application/json method: DELETE - uri: https://api.datadoghq.com/api/v2/app-builder/apps/5cb67134-d7bd-4320-9cda-d79ec98cff4c + uri: https://api.datadoghq.com/api/v2/app-builder/apps/500bf715-77a5-4c1d-b4ef-0d181b071daf response: body: string: '{"errors":[{"detail":"app not found"}]}' diff --git a/tests/v2/cassettes/test_scenarios/test_delete_multiple_apps_returns_bad_request_response.frozen b/tests/v2/cassettes/test_scenarios/test_delete_multiple_apps_returns_bad_request_response.frozen index 47c84b21b2..c2c122a9a5 100644 --- a/tests/v2/cassettes/test_scenarios/test_delete_multiple_apps_returns_bad_request_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_delete_multiple_apps_returns_bad_request_response.frozen @@ -1 +1 @@ -2024-12-10T19:57:10.845Z \ No newline at end of file +2024-12-20T20:39:19.594Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_delete_multiple_apps_returns_not_found_response.frozen b/tests/v2/cassettes/test_scenarios/test_delete_multiple_apps_returns_not_found_response.frozen index 0fbfbe769d..7d397ad29f 100644 --- a/tests/v2/cassettes/test_scenarios/test_delete_multiple_apps_returns_not_found_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_delete_multiple_apps_returns_not_found_response.frozen @@ -1 +1 @@ -2024-12-10T19:57:10.942Z \ No newline at end of file +2024-12-20T20:39:19.688Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_delete_multiple_apps_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_delete_multiple_apps_returns_ok_response.frozen index 5848314b79..d2346be1da 100644 --- a/tests/v2/cassettes/test_scenarios/test_delete_multiple_apps_returns_ok_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_delete_multiple_apps_returns_ok_response.frozen @@ -1 +1 @@ -2024-12-12T20:29:25.239Z \ No newline at end of file +2024-12-20T20:39:19.785Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_delete_multiple_apps_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_delete_multiple_apps_returns_ok_response.yaml index 7cd2aa7b42..0c1a38aa3d 100644 --- a/tests/v2/cassettes/test_scenarios/test_delete_multiple_apps_returns_ok_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_delete_multiple_apps_returns_ok_response.yaml @@ -12,7 +12,7 @@ interactions: uri: https://api.datadoghq.com/api/v2/app-builder/apps response: body: - string: '{"data":{"id":"61d36766-5d27-47ea-a3e7-aa7bd77b1da3","type":"appDefinitions"}}' + string: '{"data":{"id":"884b37bc-71b8-40bc-8967-12684ec7f3c4","type":"appDefinitions"}}' headers: content-type: - application/vnd.api+json @@ -20,7 +20,7 @@ interactions: code: 201 message: Created - request: - body: '{"data":[{"id":"61d36766-5d27-47ea-a3e7-aa7bd77b1da3","type":"appDefinitions"}]}' + body: '{"data":[{"id":"884b37bc-71b8-40bc-8967-12684ec7f3c4","type":"appDefinitions"}]}' headers: accept: - application/json @@ -30,7 +30,7 @@ interactions: uri: https://api.datadoghq.com/api/v2/app-builder/apps response: body: - string: '{"data":[{"id":"61d36766-5d27-47ea-a3e7-aa7bd77b1da3","type":"appDefinitions"}]}' + string: '{"data":[{"id":"884b37bc-71b8-40bc-8967-12684ec7f3c4","type":"appDefinitions"}]}' headers: content-type: - application/vnd.api+json @@ -43,7 +43,7 @@ interactions: accept: - application/json method: DELETE - uri: https://api.datadoghq.com/api/v2/app-builder/apps/61d36766-5d27-47ea-a3e7-aa7bd77b1da3 + uri: https://api.datadoghq.com/api/v2/app-builder/apps/884b37bc-71b8-40bc-8967-12684ec7f3c4 response: body: string: '{"errors":[{"detail":"app not found"}]}' diff --git a/tests/v2/cassettes/test_scenarios/test_deploy_app_returns_bad_request_response.frozen b/tests/v2/cassettes/test_scenarios/test_deploy_app_returns_bad_request_response.frozen index 70eab29e2a..3f65923d0a 100644 --- a/tests/v2/cassettes/test_scenarios/test_deploy_app_returns_bad_request_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_deploy_app_returns_bad_request_response.frozen @@ -1 +1 @@ -2024-12-10T19:57:35.320Z \ No newline at end of file +2024-12-20T20:39:20.190Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_deploy_app_returns_created_response.frozen b/tests/v2/cassettes/test_scenarios/test_deploy_app_returns_created_response.frozen index 12cd09b1d2..2c4a117029 100644 --- a/tests/v2/cassettes/test_scenarios/test_deploy_app_returns_created_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_deploy_app_returns_created_response.frozen @@ -1 +1 @@ -2024-12-12T20:29:22.668Z \ No newline at end of file +2024-12-20T20:39:20.292Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_deploy_app_returns_created_response.yaml b/tests/v2/cassettes/test_scenarios/test_deploy_app_returns_created_response.yaml index e0b2c87a1d..3dbd72af8e 100644 --- a/tests/v2/cassettes/test_scenarios/test_deploy_app_returns_created_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_deploy_app_returns_created_response.yaml @@ -12,7 +12,7 @@ interactions: uri: https://api.datadoghq.com/api/v2/app-builder/apps response: body: - string: '{"data":{"id":"d9f547cd-bc8d-46be-b321-336856723728","type":"appDefinitions"}}' + string: '{"data":{"id":"290ad26d-6f5c-43b6-aef6-57b403d755e8","type":"appDefinitions"}}' headers: content-type: - application/vnd.api+json @@ -25,10 +25,10 @@ interactions: accept: - application/json method: POST - uri: https://api.datadoghq.com/api/v2/app-builder/apps/d9f547cd-bc8d-46be-b321-336856723728/deployment + uri: https://api.datadoghq.com/api/v2/app-builder/apps/290ad26d-6f5c-43b6-aef6-57b403d755e8/deployment response: body: - string: '{"data":{"id":"7e1d147c-815e-46fa-8be0-278783311881","type":"deployment","attributes":{"app_version_id":"f8567809-049e-49c2-b5c0-e5cb0e8e0f5e"},"meta":{"created_at":"2024-12-12T20:29:23.253704Z","user_id":2320499,"user_uuid":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","user_name":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}}}' + string: '{"data":{"id":"74a4bbff-b587-4272-a207-b61678cc0bf1","type":"deployment","attributes":{"app_version_id":"ab334928-2df5-4e6e-8e40-9eeee2b2cd44"},"meta":{"created_at":"2024-12-20T20:39:20.594723Z","user_id":15479137,"user_uuid":"b3f98453-b289-11ef-a4e9-d6d283f92d91","user_name":"oliver.li@datadoghq.com"}}}' headers: content-type: - application/vnd.api+json @@ -41,10 +41,10 @@ interactions: accept: - application/json method: DELETE - uri: https://api.datadoghq.com/api/v2/app-builder/apps/d9f547cd-bc8d-46be-b321-336856723728 + uri: https://api.datadoghq.com/api/v2/app-builder/apps/290ad26d-6f5c-43b6-aef6-57b403d755e8 response: body: - string: '{"data":{"id":"d9f547cd-bc8d-46be-b321-336856723728","type":"appDefinitions"}}' + string: '{"data":{"id":"290ad26d-6f5c-43b6-aef6-57b403d755e8","type":"appDefinitions"}}' headers: content-type: - application/vnd.api+json diff --git a/tests/v2/cassettes/test_scenarios/test_deploy_app_returns_not_found_response.frozen b/tests/v2/cassettes/test_scenarios/test_deploy_app_returns_not_found_response.frozen index c11fe09d7f..f8f8e8f269 100644 --- a/tests/v2/cassettes/test_scenarios/test_deploy_app_returns_not_found_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_deploy_app_returns_not_found_response.frozen @@ -1 +1 @@ -2024-12-10T19:57:35.984Z \ No newline at end of file +2024-12-20T20:39:20.929Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_disable_app_returns_bad_request_response.frozen b/tests/v2/cassettes/test_scenarios/test_disable_app_returns_bad_request_response.frozen index bf3af7629d..afd2bf6b9f 100644 --- a/tests/v2/cassettes/test_scenarios/test_disable_app_returns_bad_request_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_disable_app_returns_bad_request_response.frozen @@ -1 +1 @@ -2024-12-10T19:57:36.091Z \ No newline at end of file +2024-12-20T20:39:21.034Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_disable_app_returns_not_found_response.frozen b/tests/v2/cassettes/test_scenarios/test_disable_app_returns_not_found_response.frozen index 8dc6b57d75..7332f60013 100644 --- a/tests/v2/cassettes/test_scenarios/test_disable_app_returns_not_found_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_disable_app_returns_not_found_response.frozen @@ -1 +1 @@ -2024-12-10T19:57:36.179Z \ No newline at end of file +2024-12-20T20:39:21.129Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_disable_app_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_disable_app_returns_ok_response.frozen index 883ce61def..672904fce2 100644 --- a/tests/v2/cassettes/test_scenarios/test_disable_app_returns_ok_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_disable_app_returns_ok_response.frozen @@ -1 +1 @@ -2024-12-12T20:29:23.546Z \ No newline at end of file +2024-12-20T20:39:21.230Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_disable_app_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_disable_app_returns_ok_response.yaml index 89e4ca1083..4c27e559d7 100644 --- a/tests/v2/cassettes/test_scenarios/test_disable_app_returns_ok_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_disable_app_returns_ok_response.yaml @@ -12,7 +12,7 @@ interactions: uri: https://api.datadoghq.com/api/v2/app-builder/apps response: body: - string: '{"data":{"id":"6fdd1eb3-bd2c-4fe3-a3cf-38d0af4913ad","type":"appDefinitions"}}' + string: '{"data":{"id":"cfe9f7bc-e6e6-44e2-9d30-19b03ab871b5","type":"appDefinitions"}}' headers: content-type: - application/vnd.api+json @@ -25,10 +25,10 @@ interactions: accept: - application/json method: DELETE - uri: https://api.datadoghq.com/api/v2/app-builder/apps/6fdd1eb3-bd2c-4fe3-a3cf-38d0af4913ad/deployment + uri: https://api.datadoghq.com/api/v2/app-builder/apps/cfe9f7bc-e6e6-44e2-9d30-19b03ab871b5/deployment response: body: - string: '{"data":{"id":"be510de8-34d8-45fc-830f-85c208a42920","type":"deployment","attributes":{"app_version_id":"00000000-0000-0000-0000-000000000000"},"meta":{"created_at":"2024-12-12T20:29:23.883145Z","user_id":2320499,"user_uuid":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","user_name":"9919ec9b-ebc7-49ee-8dc8-03626e717cca"}}}' + string: '{"data":{"id":"1c14f2b9-0161-4dac-ad44-b8dd84abcbe6","type":"deployment","attributes":{"app_version_id":"00000000-0000-0000-0000-000000000000"},"meta":{"created_at":"2024-12-20T20:39:21.490485Z","user_id":15479137,"user_uuid":"b3f98453-b289-11ef-a4e9-d6d283f92d91","user_name":"oliver.li@datadoghq.com"}}}' headers: content-type: - application/vnd.api+json @@ -41,10 +41,10 @@ interactions: accept: - application/json method: DELETE - uri: https://api.datadoghq.com/api/v2/app-builder/apps/6fdd1eb3-bd2c-4fe3-a3cf-38d0af4913ad + uri: https://api.datadoghq.com/api/v2/app-builder/apps/cfe9f7bc-e6e6-44e2-9d30-19b03ab871b5 response: body: - string: '{"data":{"id":"6fdd1eb3-bd2c-4fe3-a3cf-38d0af4913ad","type":"appDefinitions"}}' + string: '{"data":{"id":"cfe9f7bc-e6e6-44e2-9d30-19b03ab871b5","type":"appDefinitions"}}' headers: content-type: - application/vnd.api+json diff --git a/tests/v2/cassettes/test_scenarios/test_get_app_returns_bad_request_response.frozen b/tests/v2/cassettes/test_scenarios/test_get_app_returns_bad_request_response.frozen index 9a1b4493f0..8251b6eaf6 100644 --- a/tests/v2/cassettes/test_scenarios/test_get_app_returns_bad_request_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_get_app_returns_bad_request_response.frozen @@ -1 +1 @@ -2024-12-10T19:57:11.519Z \ No newline at end of file +2024-12-20T20:39:21.680Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_get_app_returns_not_found_response.frozen b/tests/v2/cassettes/test_scenarios/test_get_app_returns_not_found_response.frozen index 0d42c76076..8bd6f7561c 100644 --- a/tests/v2/cassettes/test_scenarios/test_get_app_returns_not_found_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_get_app_returns_not_found_response.frozen @@ -1 +1 @@ -2024-12-10T19:57:11.612Z \ No newline at end of file +2024-12-20T20:39:21.762Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_get_app_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_get_app_returns_ok_response.frozen index 7b34332de4..e407ffe5d6 100644 --- a/tests/v2/cassettes/test_scenarios/test_get_app_returns_ok_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_get_app_returns_ok_response.frozen @@ -1 +1 @@ -2024-12-12T20:29:25.770Z \ No newline at end of file +2024-12-20T20:39:21.868Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_get_app_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_get_app_returns_ok_response.yaml index 7c27c4bec3..916695bb00 100644 --- a/tests/v2/cassettes/test_scenarios/test_get_app_returns_ok_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_get_app_returns_ok_response.yaml @@ -12,7 +12,7 @@ interactions: uri: https://api.datadoghq.com/api/v2/app-builder/apps response: body: - string: '{"data":{"id":"4937a273-31f5-4375-a9cf-b71eeb92f89c","type":"appDefinitions"}}' + string: '{"data":{"id":"e91c5ea9-5827-4008-b1e6-026d71f5c005","type":"appDefinitions"}}' headers: content-type: - application/vnd.api+json @@ -25,13 +25,13 @@ interactions: accept: - application/json method: GET - uri: https://api.datadoghq.com/api/v2/app-builder/apps/4937a273-31f5-4375-a9cf-b71eeb92f89c + uri: https://api.datadoghq.com/api/v2/app-builder/apps/e91c5ea9-5827-4008-b1e6-026d71f5c005 response: body: - string: '{"data":{"id":"4937a273-31f5-4375-a9cf-b71eeb92f89c","type":"appDefinitions","attributes":{"components":[{"events":[],"name":"grid0","properties":{"children":[{"events":[],"name":"gridCell0","properties":{"children":[{"events":[],"name":"calloutValue0","properties":{"isDisabled":false,"isLoading":false,"isVisible":true,"label":"CPU + string: '{"data":{"id":"e91c5ea9-5827-4008-b1e6-026d71f5c005","type":"appDefinitions","attributes":{"components":[{"events":[],"name":"grid0","properties":{"children":[{"events":[],"name":"gridCell0","properties":{"children":[{"events":[],"name":"calloutValue0","properties":{"isDisabled":false,"isLoading":false,"isVisible":true,"label":"CPU Usage","size":"sm","style":"vivid_yellow","unit":"kB","value":"42"},"type":"calloutValue"}],"isVisible":"true","layout":{"default":{"height":8,"width":2,"x":0,"y":0}}},"type":"gridCell"}]},"type":"grid"}],"description":"This is a simple example app","embeddedQueries":[],"favorite":false,"name":"Example - App","rootInstanceName":"grid0","selfService":false,"tags":[]},"meta":{"org_id":321813,"user_id":2320499,"user_uuid":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","user_name":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","version":1,"updated_since_deployment":false,"created_at":"2024-12-12T20:29:25.869968Z","updated_at":"2024-12-12T20:29:25.869968Z","deleted_at":"0001-01-01T00:00:00Z"}}}' + App","rootInstanceName":"grid0","selfService":false,"tags":[]},"meta":{"org_id":1107852,"user_id":15479137,"user_uuid":"b3f98453-b289-11ef-a4e9-d6d283f92d91","user_name":"oliver.li@datadoghq.com","version":1,"updated_since_deployment":false,"created_at":"2024-12-20T20:39:21.945448Z","updated_at":"2024-12-20T20:39:21.945448Z","deleted_at":"0001-01-01T00:00:00Z"}}}' headers: content-type: - application/vnd.api+json @@ -44,10 +44,10 @@ interactions: accept: - application/json method: DELETE - uri: https://api.datadoghq.com/api/v2/app-builder/apps/4937a273-31f5-4375-a9cf-b71eeb92f89c + uri: https://api.datadoghq.com/api/v2/app-builder/apps/e91c5ea9-5827-4008-b1e6-026d71f5c005 response: body: - string: '{"data":{"id":"4937a273-31f5-4375-a9cf-b71eeb92f89c","type":"appDefinitions"}}' + string: '{"data":{"id":"e91c5ea9-5827-4008-b1e6-026d71f5c005","type":"appDefinitions"}}' headers: content-type: - application/vnd.api+json diff --git a/tests/v2/cassettes/test_scenarios/test_list_apps_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_list_apps_returns_ok_response.frozen index 1cb2468dc4..b459860c38 100644 --- a/tests/v2/cassettes/test_scenarios/test_list_apps_returns_ok_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_list_apps_returns_ok_response.frozen @@ -1 +1 @@ -2024-12-10T19:57:12.227Z \ No newline at end of file +2024-12-20T20:39:22.419Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_list_apps_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_list_apps_returns_ok_response.yaml index 91a30eaf78..fb2144aa8d 100644 --- a/tests/v2/cassettes/test_scenarios/test_list_apps_returns_ok_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_list_apps_returns_ok_response.yaml @@ -8,8 +8,9 @@ interactions: uri: https://api.datadoghq.com/api/v2/app-builder/apps response: body: - string: '{"data":[{"id":"d595693a-473d-4671-9da3-fce89e3a5c5d","type":"appDefinitions","attributes":{"description":"","favorite":false,"name":"Max''s - App Fri, Jul 12, 11:10:35 am","selfService":false,"tags":[]},"meta":{"org_id":1107852,"user_id":7571362,"user_uuid":"3114f3a0-3fc9-11ef-acbe-a6def6551924","user_name":"max.gale@datadoghq.com","version":0,"updated_since_deployment":false,"created_at":"2024-07-12T15:10:48.690305Z","updated_at":"2024-07-12T15:10:48.690305Z","deleted_at":"0001-01-01T00:00:00Z"}}],"meta":{"page":{"totalCount":1,"totalFilteredCount":1}}}' + string: '{"data":[{"id":"0cc51f70-6f90-406e-880b-e2fac88e823a","type":"appDefinitions","attributes":{"description":"","favorite":false,"name":"[synthetics] + app name 0123456789","selfService":false,"tags":[]},"meta":{"org_id":1107852,"user_id":7571471,"user_uuid":"01347f51-3fcd-11ef-95dd-a65df5ee2843","user_name":"01347f51-3fcd-11ef-95dd-a65df5ee2843","version":0,"updated_since_deployment":false,"created_at":"2024-12-18T11:48:55.89363Z","updated_at":"2024-12-18T11:48:55.89363Z","deleted_at":"0001-01-01T00:00:00Z"}},{"id":"d595693a-473d-4671-9da3-fce89e3a5c5d","type":"appDefinitions","attributes":{"description":"","favorite":false,"name":"Max''s + App Fri, Jul 12, 11:10:35 am","selfService":false,"tags":[]},"meta":{"org_id":1107852,"user_id":7571362,"user_uuid":"3114f3a0-3fc9-11ef-acbe-a6def6551924","user_name":"max.gale@datadoghq.com","version":0,"updated_since_deployment":false,"created_at":"2024-07-12T15:10:48.690305Z","updated_at":"2024-07-12T15:10:48.690305Z","deleted_at":"0001-01-01T00:00:00Z"}}],"meta":{"page":{"totalCount":2,"totalFilteredCount":2}}}' headers: content-type: - application/vnd.api+json diff --git a/tests/v2/cassettes/test_scenarios/test_update_app_returns_bad_request_response.frozen b/tests/v2/cassettes/test_scenarios/test_update_app_returns_bad_request_response.frozen index 5616283035..fd24ecdb58 100644 --- a/tests/v2/cassettes/test_scenarios/test_update_app_returns_bad_request_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_update_app_returns_bad_request_response.frozen @@ -1 +1 @@ -2024-12-12T20:29:26.349Z \ No newline at end of file +2024-12-20T20:39:22.549Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_update_app_returns_bad_request_response.yaml b/tests/v2/cassettes/test_scenarios/test_update_app_returns_bad_request_response.yaml index 482fee598e..bc38766b3c 100644 --- a/tests/v2/cassettes/test_scenarios/test_update_app_returns_bad_request_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_update_app_returns_bad_request_response.yaml @@ -12,7 +12,7 @@ interactions: uri: https://api.datadoghq.com/api/v2/app-builder/apps response: body: - string: '{"data":{"id":"9d2ee93b-6ac5-4b0e-abd8-829916f2365d","type":"appDefinitions"}}' + string: '{"data":{"id":"2eb79081-77f2-4082-93d5-fbb4d2291dc7","type":"appDefinitions"}}' headers: content-type: - application/vnd.api+json @@ -20,14 +20,14 @@ interactions: code: 201 message: Created - request: - body: '{"data":{"attributes":{"rootInstanceName":""},"id":"9d2ee93b-6ac5-4b0e-abd8-829916f2365d","type":"appDefinitions"}}' + body: '{"data":{"attributes":{"rootInstanceName":""},"id":"2eb79081-77f2-4082-93d5-fbb4d2291dc7","type":"appDefinitions"}}' headers: accept: - application/json content-type: - application/json method: PATCH - uri: https://api.datadoghq.com/api/v2/app-builder/apps/9d2ee93b-6ac5-4b0e-abd8-829916f2365d + uri: https://api.datadoghq.com/api/v2/app-builder/apps/2eb79081-77f2-4082-93d5-fbb4d2291dc7 response: body: string: '{"errors":[{"detail":"missing required field","source":{"pointer":"/data/attributes/rootInstanceName"}}]}' @@ -43,10 +43,10 @@ interactions: accept: - application/json method: DELETE - uri: https://api.datadoghq.com/api/v2/app-builder/apps/9d2ee93b-6ac5-4b0e-abd8-829916f2365d + uri: https://api.datadoghq.com/api/v2/app-builder/apps/2eb79081-77f2-4082-93d5-fbb4d2291dc7 response: body: - string: '{"data":{"id":"9d2ee93b-6ac5-4b0e-abd8-829916f2365d","type":"appDefinitions"}}' + string: '{"data":{"id":"2eb79081-77f2-4082-93d5-fbb4d2291dc7","type":"appDefinitions"}}' headers: content-type: - application/vnd.api+json diff --git a/tests/v2/cassettes/test_scenarios/test_update_app_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_update_app_returns_ok_response.frozen index 9a62b80239..b873204c5a 100644 --- a/tests/v2/cassettes/test_scenarios/test_update_app_returns_ok_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_update_app_returns_ok_response.frozen @@ -1 +1 @@ -2024-12-12T20:29:26.986Z \ No newline at end of file +2024-12-20T20:39:23.050Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_update_app_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_update_app_returns_ok_response.yaml index 5183402721..1b3c5b49dd 100644 --- a/tests/v2/cassettes/test_scenarios/test_update_app_returns_ok_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_update_app_returns_ok_response.yaml @@ -12,7 +12,7 @@ interactions: uri: https://api.datadoghq.com/api/v2/app-builder/apps response: body: - string: '{"data":{"id":"5a5e6785-d3f8-41bf-9d5d-95a179362e02","type":"appDefinitions"}}' + string: '{"data":{"id":"22653158-3691-4a09-bbd9-f4197f14dd0c","type":"appDefinitions"}}' headers: content-type: - application/vnd.api+json @@ -20,20 +20,20 @@ interactions: code: 201 message: Created - request: - body: '{"data":{"attributes":{"name":"Updated Name","rootInstanceName":"grid0"},"id":"5a5e6785-d3f8-41bf-9d5d-95a179362e02","type":"appDefinitions"}}' + body: '{"data":{"attributes":{"name":"Updated Name","rootInstanceName":"grid0"},"id":"22653158-3691-4a09-bbd9-f4197f14dd0c","type":"appDefinitions"}}' headers: accept: - application/json content-type: - application/json method: PATCH - uri: https://api.datadoghq.com/api/v2/app-builder/apps/5a5e6785-d3f8-41bf-9d5d-95a179362e02 + uri: https://api.datadoghq.com/api/v2/app-builder/apps/22653158-3691-4a09-bbd9-f4197f14dd0c response: body: - string: '{"data":{"id":"5a5e6785-d3f8-41bf-9d5d-95a179362e02","type":"appDefinitions","attributes":{"components":[{"events":[],"name":"grid0","properties":{"children":[{"events":[],"name":"gridCell0","properties":{"children":[{"events":[],"name":"calloutValue0","properties":{"isDisabled":false,"isLoading":false,"isVisible":true,"label":"CPU + string: '{"data":{"id":"22653158-3691-4a09-bbd9-f4197f14dd0c","type":"appDefinitions","attributes":{"components":[{"events":[],"name":"grid0","properties":{"children":[{"events":[],"name":"gridCell0","properties":{"children":[{"events":[],"name":"calloutValue0","properties":{"isDisabled":false,"isLoading":false,"isVisible":true,"label":"CPU Usage","size":"sm","style":"vivid_yellow","unit":"kB","value":"42"},"type":"calloutValue"}],"isVisible":"true","layout":{"default":{"height":8,"width":2,"x":0,"y":0}}},"type":"gridCell"}]},"type":"grid"}],"description":"This is a simple example app","embeddedQueries":[],"favorite":false,"name":"Updated - Name","rootInstanceName":"grid0","selfService":false,"tags":[]},"meta":{"org_id":321813,"user_id":2320499,"user_uuid":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","user_name":"9919ec9b-ebc7-49ee-8dc8-03626e717cca","version":2,"updated_since_deployment":false,"created_at":"2024-12-12T20:29:27.115629Z","updated_at":"2024-12-12T20:29:27.362767Z","deleted_at":"0001-01-01T00:00:00Z"}}}' + Name","rootInstanceName":"grid0","selfService":false,"tags":[]},"meta":{"org_id":1107852,"user_id":15479137,"user_uuid":"b3f98453-b289-11ef-a4e9-d6d283f92d91","user_name":"oliver.li@datadoghq.com","version":2,"updated_since_deployment":false,"created_at":"2024-12-20T20:39:23.117622Z","updated_at":"2024-12-20T20:39:23.317526Z","deleted_at":"0001-01-01T00:00:00Z"}}}' headers: content-type: - application/vnd.api+json @@ -46,10 +46,10 @@ interactions: accept: - application/json method: DELETE - uri: https://api.datadoghq.com/api/v2/app-builder/apps/5a5e6785-d3f8-41bf-9d5d-95a179362e02 + uri: https://api.datadoghq.com/api/v2/app-builder/apps/22653158-3691-4a09-bbd9-f4197f14dd0c response: body: - string: '{"data":{"id":"5a5e6785-d3f8-41bf-9d5d-95a179362e02","type":"appDefinitions"}}' + string: '{"data":{"id":"22653158-3691-4a09-bbd9-f4197f14dd0c","type":"appDefinitions"}}' headers: content-type: - application/vnd.api+json diff --git a/tests/v2/features/apps.feature b/tests/v2/features/apps.feature index 531cc38264..1bed411c31 100644 --- a/tests/v2/features/apps.feature +++ b/tests/v2/features/apps.feature @@ -1,6 +1,9 @@ @endpoint(apps) @endpoint(apps-v2) Feature: Apps - Create, read, update, and delete apps in App Builder. + Datadog App Builder provides a low-code solution to rapidly develop and + integrate secure, customized applications into your monitoring stack that + are built to accelerate remediation at scale. These API endpoints allow + you to create, read, update, delete, and publish apps. Background: Given a valid "apiKeyAuth" key in the system @@ -88,6 +91,56 @@ Feature: Apps And the response "data" has length 1 And the response "data[0].id" has the same value as "app.data.id" + @skip-typescript @team:DataDog/app-builder-backend + Scenario: Deploy App returns "Bad Request" response + Given operation "DeployApp" enabled + And new "DeployApp" request + And request contains "app_id" parameter with value "invalid-uuid" + When the request is sent + Then the response status is 400 Bad Request + + @skip-typescript @team:DataDog/app-builder-backend + Scenario: Deploy App returns "Created" response + Given operation "DeployApp" enabled + And new "DeployApp" request + And there is a valid "app" in the system + And request contains "app_id" parameter from "app.data.id" + When the request is sent + Then the response status is 201 Created + + @skip-typescript @team:DataDog/app-builder-backend + Scenario: Deploy App returns "Not Found" response + Given operation "DeployApp" enabled + And new "DeployApp" request + And request contains "app_id" parameter with value "7addb29b-f935-472c-ae79-d1963979a23e" + When the request is sent + Then the response status is 404 Not Found + + @skip-typescript @team:DataDog/app-builder-backend + Scenario: Disable App returns "Bad Request" response + Given operation "DisableApp" enabled + And new "DisableApp" request + And request contains "app_id" parameter with value "invalid-uuid" + When the request is sent + Then the response status is 400 Bad Request + + @skip-typescript @team:DataDog/app-builder-backend + Scenario: Disable App returns "Not Found" response + Given operation "DisableApp" enabled + And new "DisableApp" request + And request contains "app_id" parameter with value "7addb29b-f935-472c-ae79-d1963979a23e" + When the request is sent + Then the response status is 404 Not Found + + @skip-typescript @team:DataDog/app-builder-backend + Scenario: Disable App returns "OK" response + Given operation "DisableApp" enabled + And new "DisableApp" request + And there is a valid "app" in the system + And request contains "app_id" parameter from "app.data.id" + When the request is sent + Then the response status is 200 OK + @skip-typescript @team:DataDog/app-builder-backend Scenario: Get App returns "Bad Request" response Given operation "GetApp" enabled @@ -116,11 +169,11 @@ Feature: Apps And the response "data.type" is equal to "appDefinitions" @generated @skip @team:DataDog/app-builder-backend - Scenario: List Apps returns "Bad Request, e.g. invalid sort parameter" response + Scenario: List Apps returns "Bad Request" response Given operation "ListApps" enabled And new "ListApps" request When the request is sent - Then the response status is 400 Bad Request, e.g. invalid sort parameter + Then the response status is 400 Bad Request @skip-typescript @team:DataDog/app-builder-backend Scenario: List Apps returns "OK" response diff --git a/tests/v2/features/given.json b/tests/v2/features/given.json index 29503a6ae7..3c9e427938 100644 --- a/tests/v2/features/given.json +++ b/tests/v2/features/given.json @@ -51,7 +51,7 @@ "parameters": [ { "name": "body", - "value": "{\"data\": {\"attributes\": {\"components\": [{\"events\": [], \"name\": \"grid0\", \"properties\": {\"children\": [{\"events\": [], \"name\": \"gridCell0\", \"properties\": {\"children\": [{\"events\": [], \"name\": \"calloutValue0\", \"properties\": {\"isVisible\": true, \"isDisabled\": false, \"isLoading\": false, \"label\": \"CPU Usage\", \"size\": \"sm\", \"style\": \"vivid_yellow\", \"unit\": \"kB\", \"value\": \"42\"}, \"type\": \"calloutValue\"}], \"isVisible\": \"true\", \"layout\": {\"default\": {\"height\": 8, \"width\": 2, \"x\": 0, \"y\": 0}}}, \"type\": \"gridCell\"}]}, \"type\": \"grid\"}], \"description\": \"This is a simple example app\", \"embeddedQueries\": [], \"name\": \"Example App\", \"rootInstanceName\": \"grid0\"}, \"type\": \"appDefinitions\"}}" + "value": "{\"data\": {\"attributes\": {\"components\": [{\"events\": [], \"name\": \"grid0\", \"properties\": {\"children\": [{\"events\": [], \"name\": \"gridCell0\", \"properties\": {\"children\": [{\"events\": [], \"name\": \"calloutValue0\", \"properties\": {\"isDisabled\": false, \"isLoading\": false, \"isVisible\": true, \"label\": \"CPU Usage\", \"size\": \"sm\", \"style\": \"vivid_yellow\", \"unit\": \"kB\", \"value\": \"42\"}, \"type\": \"calloutValue\"}], \"isVisible\": \"true\", \"layout\": {\"default\": {\"height\": 8, \"width\": 2, \"x\": 0, \"y\": 0}}}, \"type\": \"gridCell\"}]}, \"type\": \"grid\"}], \"description\": \"This is a simple example app\", \"embeddedQueries\": [], \"name\": \"Example App\", \"rootInstanceName\": \"grid0\"}, \"type\": \"appDefinitions\"}}" } ], "step": "there is a valid \"app\" in the system", diff --git a/tests/v2/features/undo.json b/tests/v2/features/undo.json index b1ed2db693..08d57ce2bb 100644 --- a/tests/v2/features/undo.json +++ b/tests/v2/features/undo.json @@ -197,13 +197,13 @@ } }, "DisableApp": { - "tag": "App Deployment", + "tag": "Apps", "undo": { "type": "idempotent" } }, "DeployApp": { - "tag": "App Deployment", + "tag": "Apps", "undo": { "type": "idempotent" }