diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 4707c147e8..81db0724c5 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -3256,6 +3256,7 @@ components: - incident_analytics - product_analytics - on_call_events + - errors example: "logs" type: string x-enum-varnames: @@ -3272,6 +3273,7 @@ components: - INCIDENT_ANALYTICS - PRODUCT_ANALYTICS - ON_CALL_EVENTS + - ERRORS FormulaAndFunctionMetricAggregation: description: The aggregation methods available for metrics queries. enum: diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 5808b5f796..5b0100ae0e 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -82733,77 +82733,6 @@ components: description: The title of the event. example: "The event title" type: string - ValidateAPIKeyResponse: - description: Response object for the API and application key validation status check. - properties: - status: - $ref: "#/components/schemas/ValidateAPIKeyStatus" - required: - - status - type: object - ValidateAPIKeyStatus: - description: Status of the validation. Always `ok` when both the API key and the application key are valid. - enum: - - ok - example: ok - type: string - x-enum-varnames: - - OK - ValidateV2Attributes: - description: Attributes of the API key validation response. - properties: - api_key_id: - description: The UUID of the API key. - example: "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6" - type: string - api_key_scopes: - description: List of scope names associated with the API key. - example: - - "remote_config_read" - items: - type: string - type: array - valid: - description: Whether the API key is valid. - example: true - type: boolean - required: - - valid - - api_key_scopes - - api_key_id - type: object - ValidateV2Data: - description: Data object containing the API key validation result. - properties: - attributes: - $ref: "#/components/schemas/ValidateV2Attributes" - id: - description: The UUID of the organization associated with the API key. - example: "550e8400-e29b-41d4-a716-446655440000" - type: string - type: - $ref: "#/components/schemas/ValidateV2Type" - required: - - id - - type - - attributes - type: object - ValidateV2Response: - description: Response for the API key validation endpoint. - properties: - data: - $ref: "#/components/schemas/ValidateV2Data" - required: - - data - type: object - ValidateV2Type: - description: Resource type for the API key validation response. - enum: - - validate_v2 - example: validate_v2 - type: string - x-enum-varnames: - - ValidateV2 ValidationError: description: Represents a single validation error, including a human-readable title and metadata. properties: @@ -145701,89 +145630,6 @@ paths: operator: OR permissions: - teams_read - /api/v2/validate: - get: - description: Check if the API key is valid. Returns the organization UUID, API key ID, and associated scopes. - operationId: Validate - responses: - "200": - content: - application/json: - examples: - default: - value: - data: - attributes: - api_key_id: "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6" - api_key_scopes: - - "remote_config_read" - valid: true - id: "550e8400-e29b-41d4-a716-446655440000" - type: "validate_v2" - schema: - $ref: "#/components/schemas/ValidateV2Response" - description: OK - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/JSONAPIErrorResponse" - description: Forbidden - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - summary: Validate API key - tags: - - Key Management - "x-permission": - operator: OPEN - permissions: [] - 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/validate_keys: - get: - description: |- - Check that the API key and application key used for the request are both valid. - Returns `{"status": "ok"}` on success, `401` or `403` otherwise. Useful as a - lightweight authentication probe before issuing other API calls that require - full credentials. - operationId: ValidateAPIKey - responses: - "200": - content: - application/json: - examples: - default: - value: - status: ok - schema: - $ref: "#/components/schemas/ValidateAPIKeyResponse" - description: OK - "401": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Unauthorized - "403": - content: - application/json: - schema: - $ref: "#/components/schemas/APIErrorResponse" - description: Forbidden - "429": - $ref: "#/components/responses/TooManyRequestsResponse" - security: - - apiKeyAuth: [] - appKeyAuth: [] - summary: Validate API and application keys - tags: - - Key Management - "x-permission": - operator: OPEN - permissions: [] /api/v2/web-integrations/{integration_name}/accounts: get: description: List accounts for a given web integration. diff --git a/docs/datadog_api_client.v2.model.rst b/docs/datadog_api_client.v2.model.rst index 406433db99..ee5c6f20ab 100644 --- a/docs/datadog_api_client.v2.model.rst +++ b/docs/datadog_api_client.v2.model.rst @@ -36516,48 +36516,6 @@ datadog\_api\_client.v2.model.v2\_event\_response module :members: :show-inheritance: -datadog\_api\_client.v2.model.validate\_api\_key\_response module ------------------------------------------------------------------ - -.. automodule:: datadog_api_client.v2.model.validate_api_key_response - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.validate\_api\_key\_status module ---------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.validate_api_key_status - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.validate\_v2\_attributes module -------------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.validate_v2_attributes - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.validate\_v2\_data module -------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.validate_v2_data - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.validate\_v2\_response module ------------------------------------------------------------ - -.. automodule:: datadog_api_client.v2.model.validate_v2_response - :members: - :show-inheritance: - -datadog\_api\_client.v2.model.validate\_v2\_type module -------------------------------------------------------- - -.. automodule:: datadog_api_client.v2.model.validate_v2_type - :members: - :show-inheritance: - datadog\_api\_client.v2.model.validation\_error module ------------------------------------------------------ diff --git a/examples/v2/key-management/Validate.py b/examples/v2/key-management/Validate.py deleted file mode 100644 index c1c678c3ac..0000000000 --- a/examples/v2/key-management/Validate.py +++ /dev/null @@ -1,14 +0,0 @@ -""" -Validate API key returns "OK" response -""" - -from datadog_api_client import ApiClient, Configuration -from datadog_api_client.v2.api.key_management_api import KeyManagementApi - -configuration = Configuration() -configuration.unstable_operations["validate"] = True -with ApiClient(configuration) as api_client: - api_instance = KeyManagementApi(api_client) - response = api_instance.validate() - - print(response) diff --git a/examples/v2/key-management/ValidateAPIKey.py b/examples/v2/key-management/ValidateAPIKey.py deleted file mode 100644 index e285064715..0000000000 --- a/examples/v2/key-management/ValidateAPIKey.py +++ /dev/null @@ -1,13 +0,0 @@ -""" -Validate API and application keys returns "OK" response -""" - -from datadog_api_client import ApiClient, Configuration -from datadog_api_client.v2.api.key_management_api import KeyManagementApi - -configuration = Configuration() -with ApiClient(configuration) as api_client: - api_instance = KeyManagementApi(api_client) - response = api_instance.validate_api_key() - - print(response) diff --git a/src/datadog_api_client/configuration.py b/src/datadog_api_client/configuration.py index 7bede2f3eb..7d3e4d8920 100644 --- a/src/datadog_api_client/configuration.py +++ b/src/datadog_api_client/configuration.py @@ -295,7 +295,6 @@ def __init__( "v2.update_llm_obs_experiment": False, "v2.update_llm_obs_project": False, "v2.anonymize_users": False, - "v2.validate": False, "v2.create_open_api": False, "v2.delete_open_api": False, "v2.get_open_api": False, diff --git a/src/datadog_api_client/v1/model/formula_and_function_events_data_source.py b/src/datadog_api_client/v1/model/formula_and_function_events_data_source.py index 1a885663e5..ee38abc250 100644 --- a/src/datadog_api_client/v1/model/formula_and_function_events_data_source.py +++ b/src/datadog_api_client/v1/model/formula_and_function_events_data_source.py @@ -16,7 +16,7 @@ class FormulaAndFunctionEventsDataSource(ModelSimple): """ Data source for event platform-based queries. - :param value: Must be one of ["logs", "spans", "network", "rum", "security_signals", "profiles", "audit", "events", "ci_tests", "ci_pipelines", "incident_analytics", "product_analytics", "on_call_events"]. + :param value: Must be one of ["logs", "spans", "network", "rum", "security_signals", "profiles", "audit", "events", "ci_tests", "ci_pipelines", "incident_analytics", "product_analytics", "on_call_events", "errors"]. :type value: str """ @@ -34,6 +34,7 @@ class FormulaAndFunctionEventsDataSource(ModelSimple): "incident_analytics", "product_analytics", "on_call_events", + "errors", } LOGS: ClassVar["FormulaAndFunctionEventsDataSource"] SPANS: ClassVar["FormulaAndFunctionEventsDataSource"] @@ -48,6 +49,7 @@ class FormulaAndFunctionEventsDataSource(ModelSimple): INCIDENT_ANALYTICS: ClassVar["FormulaAndFunctionEventsDataSource"] PRODUCT_ANALYTICS: ClassVar["FormulaAndFunctionEventsDataSource"] ON_CALL_EVENTS: ClassVar["FormulaAndFunctionEventsDataSource"] + ERRORS: ClassVar["FormulaAndFunctionEventsDataSource"] @cached_property def openapi_types(_): @@ -69,3 +71,4 @@ def openapi_types(_): FormulaAndFunctionEventsDataSource.INCIDENT_ANALYTICS = FormulaAndFunctionEventsDataSource("incident_analytics") FormulaAndFunctionEventsDataSource.PRODUCT_ANALYTICS = FormulaAndFunctionEventsDataSource("product_analytics") FormulaAndFunctionEventsDataSource.ON_CALL_EVENTS = FormulaAndFunctionEventsDataSource("on_call_events") +FormulaAndFunctionEventsDataSource.ERRORS = FormulaAndFunctionEventsDataSource("errors") diff --git a/src/datadog_api_client/v2/api/key_management_api.py b/src/datadog_api_client/v2/api/key_management_api.py index 38c9c48895..c47153cb4f 100644 --- a/src/datadog_api_client/v2/api/key_management_api.py +++ b/src/datadog_api_client/v2/api/key_management_api.py @@ -27,8 +27,6 @@ from datadog_api_client.v2.model.personal_access_token_create_request import PersonalAccessTokenCreateRequest from datadog_api_client.v2.model.personal_access_token_response import PersonalAccessTokenResponse from datadog_api_client.v2.model.personal_access_token_update_request import PersonalAccessTokenUpdateRequest -from datadog_api_client.v2.model.validate_v2_response import ValidateV2Response -from datadog_api_client.v2.model.validate_api_key_response import ValidateAPIKeyResponse class KeyManagementApi: @@ -624,38 +622,6 @@ def __init__(self, api_client=None): api_client=api_client, ) - self._validate_endpoint = _Endpoint( - settings={ - "response_type": (ValidateV2Response,), - "auth": ["apiKeyAuth"], - "endpoint_path": "/api/v2/validate", - "operation_id": "validate", - "http_method": "GET", - "version": "v2", - }, - params_map={}, - headers_map={ - "accept": ["application/json"], - }, - api_client=api_client, - ) - - self._validate_api_key_endpoint = _Endpoint( - settings={ - "response_type": (ValidateAPIKeyResponse,), - "auth": ["apiKeyAuth", "appKeyAuth"], - "endpoint_path": "/api/v2/validate_keys", - "operation_id": "validate_api_key", - "http_method": "GET", - "version": "v2", - }, - params_map={}, - headers_map={ - "accept": ["application/json"], - }, - api_client=api_client, - ) - def create_api_key( self, body: APIKeyCreateRequest, @@ -1179,30 +1145,3 @@ def update_personal_access_token( kwargs["body"] = body return self._update_personal_access_token_endpoint.call_with_http_info(**kwargs) - - def validate( - self, - ) -> ValidateV2Response: - """Validate API key. - - Check if the API key is valid. Returns the organization UUID, API key ID, and associated scopes. - - :rtype: ValidateV2Response - """ - kwargs: Dict[str, Any] = {} - return self._validate_endpoint.call_with_http_info(**kwargs) - - def validate_api_key( - self, - ) -> ValidateAPIKeyResponse: - """Validate API and application keys. - - Check that the API key and application key used for the request are both valid. - Returns ``{"status": "ok"}`` on success, ``401`` or ``403`` otherwise. Useful as a - lightweight authentication probe before issuing other API calls that require - full credentials. - - :rtype: ValidateAPIKeyResponse - """ - kwargs: Dict[str, Any] = {} - return self._validate_api_key_endpoint.call_with_http_info(**kwargs) diff --git a/src/datadog_api_client/v2/model/validate_api_key_response.py b/src/datadog_api_client/v2/model/validate_api_key_response.py deleted file mode 100644 index 30c699087c..0000000000 --- a/src/datadog_api_client/v2/model/validate_api_key_response.py +++ /dev/null @@ -1,40 +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 TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.validate_api_key_status import ValidateAPIKeyStatus - - -class ValidateAPIKeyResponse(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.validate_api_key_status import ValidateAPIKeyStatus - - return { - "status": (ValidateAPIKeyStatus,), - } - - attribute_map = { - "status": "status", - } - - def __init__(self_, status: ValidateAPIKeyStatus, **kwargs): - """ - Response object for the API and application key validation status check. - - :param status: Status of the validation. Always ``ok`` when both the API key and the application key are valid. - :type status: ValidateAPIKeyStatus - """ - super().__init__(kwargs) - - self_.status = status diff --git a/src/datadog_api_client/v2/model/validate_api_key_status.py b/src/datadog_api_client/v2/model/validate_api_key_status.py deleted file mode 100644 index 7cd21e271c..0000000000 --- a/src/datadog_api_client/v2/model/validate_api_key_status.py +++ /dev/null @@ -1,35 +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 datadog_api_client.model_utils import ( - ModelSimple, - cached_property, -) - -from typing import ClassVar - - -class ValidateAPIKeyStatus(ModelSimple): - """ - Status of the validation. Always `ok` when both the API key and the application key are valid. - - :param value: If omitted defaults to "ok". Must be one of ["ok"]. - :type value: str - """ - - allowed_values = { - "ok", - } - OK: ClassVar["ValidateAPIKeyStatus"] - - @cached_property - def openapi_types(_): - return { - "value": (str,), - } - - -ValidateAPIKeyStatus.OK = ValidateAPIKeyStatus("ok") diff --git a/src/datadog_api_client/v2/model/validate_v2_attributes.py b/src/datadog_api_client/v2/model/validate_v2_attributes.py deleted file mode 100644 index 3fa24625b1..0000000000 --- a/src/datadog_api_client/v2/model/validate_v2_attributes.py +++ /dev/null @@ -1,46 +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 - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, -) - - -class ValidateV2Attributes(ModelNormal): - @cached_property - def openapi_types(_): - return { - "api_key_id": (str,), - "api_key_scopes": ([str],), - "valid": (bool,), - } - - attribute_map = { - "api_key_id": "api_key_id", - "api_key_scopes": "api_key_scopes", - "valid": "valid", - } - - def __init__(self_, api_key_id: str, api_key_scopes: List[str], valid: bool, **kwargs): - """ - Attributes of the API key validation response. - - :param api_key_id: The UUID of the API key. - :type api_key_id: str - - :param api_key_scopes: List of scope names associated with the API key. - :type api_key_scopes: [str] - - :param valid: Whether the API key is valid. - :type valid: bool - """ - super().__init__(kwargs) - - self_.api_key_id = api_key_id - self_.api_key_scopes = api_key_scopes - self_.valid = valid diff --git a/src/datadog_api_client/v2/model/validate_v2_data.py b/src/datadog_api_client/v2/model/validate_v2_data.py deleted file mode 100644 index c34c7bff8e..0000000000 --- a/src/datadog_api_client/v2/model/validate_v2_data.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 TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.validate_v2_attributes import ValidateV2Attributes - from datadog_api_client.v2.model.validate_v2_type import ValidateV2Type - - -class ValidateV2Data(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.validate_v2_attributes import ValidateV2Attributes - from datadog_api_client.v2.model.validate_v2_type import ValidateV2Type - - return { - "attributes": (ValidateV2Attributes,), - "id": (str,), - "type": (ValidateV2Type,), - } - - attribute_map = { - "attributes": "attributes", - "id": "id", - "type": "type", - } - - def __init__(self_, attributes: ValidateV2Attributes, id: str, type: ValidateV2Type, **kwargs): - """ - Data object containing the API key validation result. - - :param attributes: Attributes of the API key validation response. - :type attributes: ValidateV2Attributes - - :param id: The UUID of the organization associated with the API key. - :type id: str - - :param type: Resource type for the API key validation response. - :type type: ValidateV2Type - """ - super().__init__(kwargs) - - self_.attributes = attributes - self_.id = id - self_.type = type diff --git a/src/datadog_api_client/v2/model/validate_v2_response.py b/src/datadog_api_client/v2/model/validate_v2_response.py deleted file mode 100644 index 9a0abe87d6..0000000000 --- a/src/datadog_api_client/v2/model/validate_v2_response.py +++ /dev/null @@ -1,40 +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 TYPE_CHECKING - -from datadog_api_client.model_utils import ( - ModelNormal, - cached_property, -) - - -if TYPE_CHECKING: - from datadog_api_client.v2.model.validate_v2_data import ValidateV2Data - - -class ValidateV2Response(ModelNormal): - @cached_property - def openapi_types(_): - from datadog_api_client.v2.model.validate_v2_data import ValidateV2Data - - return { - "data": (ValidateV2Data,), - } - - attribute_map = { - "data": "data", - } - - def __init__(self_, data: ValidateV2Data, **kwargs): - """ - Response for the API key validation endpoint. - - :param data: Data object containing the API key validation result. - :type data: ValidateV2Data - """ - super().__init__(kwargs) - - self_.data = data diff --git a/src/datadog_api_client/v2/model/validate_v2_type.py b/src/datadog_api_client/v2/model/validate_v2_type.py deleted file mode 100644 index 11d2dce6cd..0000000000 --- a/src/datadog_api_client/v2/model/validate_v2_type.py +++ /dev/null @@ -1,35 +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 datadog_api_client.model_utils import ( - ModelSimple, - cached_property, -) - -from typing import ClassVar - - -class ValidateV2Type(ModelSimple): - """ - Resource type for the API key validation response. - - :param value: If omitted defaults to "validate_v2". Must be one of ["validate_v2"]. - :type value: str - """ - - allowed_values = { - "validate_v2", - } - ValidateV2: ClassVar["ValidateV2Type"] - - @cached_property - def openapi_types(_): - return { - "value": (str,), - } - - -ValidateV2Type.ValidateV2 = ValidateV2Type("validate_v2") diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index 3bb64eb0bb..b3538f3fd0 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -7453,12 +7453,6 @@ from datadog_api_client.v2.model.v2_event_attributes import V2EventAttributes from datadog_api_client.v2.model.v2_event_attributes_attributes import V2EventAttributesAttributes from datadog_api_client.v2.model.v2_event_response import V2EventResponse -from datadog_api_client.v2.model.validate_api_key_response import ValidateAPIKeyResponse -from datadog_api_client.v2.model.validate_api_key_status import ValidateAPIKeyStatus -from datadog_api_client.v2.model.validate_v2_attributes import ValidateV2Attributes -from datadog_api_client.v2.model.validate_v2_data import ValidateV2Data -from datadog_api_client.v2.model.validate_v2_response import ValidateV2Response -from datadog_api_client.v2.model.validate_v2_type import ValidateV2Type from datadog_api_client.v2.model.validation_error import ValidationError from datadog_api_client.v2.model.validation_error_meta import ValidationErrorMeta from datadog_api_client.v2.model.validation_response import ValidationResponse @@ -12802,12 +12796,6 @@ "V2EventAttributes", "V2EventAttributesAttributes", "V2EventResponse", - "ValidateAPIKeyResponse", - "ValidateAPIKeyStatus", - "ValidateV2Attributes", - "ValidateV2Data", - "ValidateV2Response", - "ValidateV2Type", "ValidationError", "ValidationErrorMeta", "ValidationResponse", diff --git a/tests/v2/features/key_management.feature b/tests/v2/features/key_management.feature index b27f150393..365c53ed7c 100644 --- a/tests/v2/features/key_management.feature +++ b/tests/v2/features/key_management.feature @@ -9,20 +9,19 @@ Feature: Key Management Background: Given a valid "apiKeyAuth" key in the system + And a valid "appKeyAuth" key in the system And an instance of "KeyManagement" API @generated @skip @team:DataDog/credentials-management Scenario: Create a personal access token returns "Bad Request" response - Given a valid "appKeyAuth" key in the system - And new "CreatePersonalAccessToken" request + Given new "CreatePersonalAccessToken" request And body with value {"data": {"attributes": {"expires_at": "2025-12-31T23:59:59+00:00", "name": "My Personal Access Token", "scopes": ["dashboards_read", "dashboards_write"]}, "type": "personal_access_tokens"}} When the request is sent Then the response status is 400 Bad Request @team:DataDog/credentials-management Scenario: Create a personal access token returns "Created" response - Given a valid "appKeyAuth" key in the system - And new "CreatePersonalAccessToken" request + Given new "CreatePersonalAccessToken" request And body with value {"data": {"type": "personal_access_tokens", "attributes": {"name": "{{ unique }}", "scopes": ["dashboards_read"], "expires_at": "{{ timeISO('now+365d') }}"}}} When the request is sent Then the response status is 201 Created @@ -33,16 +32,14 @@ Feature: Key Management @generated @skip @team:DataDog/credentials-management Scenario: Create an API key returns "Bad Request" response - Given a valid "appKeyAuth" key in the system - And new "CreateAPIKey" request + Given new "CreateAPIKey" request And body with value {"data": {"attributes": {"name": "API Key for submitting metrics"}, "type": "api_keys"}} When the request is sent Then the response status is 400 Bad Request @team:DataDog/credentials-management Scenario: Create an API key returns "Created" response - Given a valid "appKeyAuth" key in the system - And new "CreateAPIKey" request + Given new "CreateAPIKey" request And body with value {"data": {"type": "api_keys", "attributes": {"name": "{{ unique }}"}}} When the request is sent Then the response status is 201 Created @@ -51,8 +48,7 @@ Feature: Key Management @team:DataDog/credentials-management Scenario: Create an Application key with scopes for current user returns "Created" response - Given a valid "appKeyAuth" key in the system - And new "CreateCurrentUserApplicationKey" request + Given new "CreateCurrentUserApplicationKey" request And body with value {"data": {"type": "application_keys", "attributes": {"name": "{{ unique }}", "scopes": ["dashboards_read", "dashboards_write", "dashboards_public_share"]}}} When the request is sent Then the response status is 201 Created @@ -61,16 +57,14 @@ Feature: Key Management @generated @skip @team:DataDog/credentials-management Scenario: Create an application key for current user returns "Bad Request" response - Given a valid "appKeyAuth" key in the system - And new "CreateCurrentUserApplicationKey" request + Given new "CreateCurrentUserApplicationKey" request And body with value {"data": {"attributes": {"name": "Application Key for managing dashboards", "scopes": ["dashboards_read", "dashboards_write", "dashboards_public_share"]}, "type": "application_keys"}} When the request is sent Then the response status is 400 Bad Request @team:DataDog/credentials-management Scenario: Create an application key for current user returns "Created" response - Given a valid "appKeyAuth" key in the system - And new "CreateCurrentUserApplicationKey" request + Given new "CreateCurrentUserApplicationKey" request And body with value {"data": {"type": "application_keys", "attributes": {"name": "{{ unique }}"}}} When the request is sent Then the response status is 201 Created @@ -79,8 +73,7 @@ Feature: Key Management @team:DataDog/credentials-management Scenario: Delete an API key returns "No Content" response - Given a valid "appKeyAuth" key in the system - And there is a valid "api_key" in the system + Given there is a valid "api_key" in the system And new "DeleteAPIKey" request And request contains "api_key_id" parameter from "api_key.data.id" When the request is sent @@ -88,16 +81,14 @@ Feature: Key Management @generated @skip @team:DataDog/credentials-management Scenario: Delete an API key returns "Not Found" response - Given a valid "appKeyAuth" key in the system - And new "DeleteAPIKey" request + Given new "DeleteAPIKey" request And request contains "api_key_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 404 Not Found @team:DataDog/credentials-management Scenario: Delete an application key owned by current user returns "No Content" response - Given a valid "appKeyAuth" key in the system - And there is a valid "application_key" in the system + Given there is a valid "application_key" in the system And new "DeleteCurrentUserApplicationKey" request And request contains "app_key_id" parameter from "application_key.data.id" When the request is sent @@ -105,16 +96,14 @@ Feature: Key Management @generated @skip @team:DataDog/credentials-management Scenario: Delete an application key owned by current user returns "Not Found" response - Given a valid "appKeyAuth" key in the system - And new "DeleteCurrentUserApplicationKey" request + Given new "DeleteCurrentUserApplicationKey" request And request contains "app_key_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 404 Not Found @team:DataDog/credentials-management Scenario: Delete an application key returns "No Content" response - Given a valid "appKeyAuth" key in the system - And there is a valid "application_key" in the system + Given there is a valid "application_key" in the system And new "DeleteApplicationKey" request And request contains "app_key_id" parameter from "application_key.data.id" When the request is sent @@ -122,16 +111,14 @@ Feature: Key Management @generated @skip @team:DataDog/credentials-management Scenario: Delete an application key returns "Not Found" response - Given a valid "appKeyAuth" key in the system - And new "DeleteApplicationKey" request + Given new "DeleteApplicationKey" request And request contains "app_key_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 404 Not Found @generated @skip @team:DataDog/credentials-management Scenario: Edit an API key returns "Bad Request" response - Given a valid "appKeyAuth" key in the system - And new "UpdateAPIKey" request + Given new "UpdateAPIKey" request And request contains "api_key_id" parameter from "REPLACE.ME" And body with value {"data": {"attributes": {"name": "API Key for submitting metrics"}, "id": "00112233-4455-6677-8899-aabbccddeeff", "type": "api_keys"}} When the request is sent @@ -139,8 +126,7 @@ Feature: Key Management @generated @skip @team:DataDog/credentials-management Scenario: Edit an API key returns "Not Found" response - Given a valid "appKeyAuth" key in the system - And new "UpdateAPIKey" request + Given new "UpdateAPIKey" request And request contains "api_key_id" parameter from "REPLACE.ME" And body with value {"data": {"attributes": {"name": "API Key for submitting metrics"}, "id": "00112233-4455-6677-8899-aabbccddeeff", "type": "api_keys"}} When the request is sent @@ -148,8 +134,7 @@ Feature: Key Management @team:DataDog/credentials-management Scenario: Edit an API key returns "OK" response - Given a valid "appKeyAuth" key in the system - And there is a valid "api_key" in the system + Given there is a valid "api_key" in the system And new "UpdateAPIKey" request And request contains "api_key_id" parameter from "api_key.data.id" And body with value {"data": {"type": "api_keys", "id": "{{ api_key.data.id }}", "attributes": {"name": "{{ unique }}"}}} @@ -161,8 +146,7 @@ Feature: Key Management @generated @skip @team:DataDog/credentials-management Scenario: Edit an application key owned by current user returns "Bad Request" response - Given a valid "appKeyAuth" key in the system - And new "UpdateCurrentUserApplicationKey" request + Given new "UpdateCurrentUserApplicationKey" request And request contains "app_key_id" parameter from "REPLACE.ME" And body with value {"data": {"attributes": {"name": "Application Key for managing dashboards", "scopes": ["dashboards_read", "dashboards_write", "dashboards_public_share"]}, "id": "00112233-4455-6677-8899-aabbccddeeff", "type": "application_keys"}} When the request is sent @@ -170,8 +154,7 @@ Feature: Key Management @generated @skip @team:DataDog/credentials-management Scenario: Edit an application key owned by current user returns "Not Found" response - Given a valid "appKeyAuth" key in the system - And new "UpdateCurrentUserApplicationKey" request + Given new "UpdateCurrentUserApplicationKey" request And request contains "app_key_id" parameter from "REPLACE.ME" And body with value {"data": {"attributes": {"name": "Application Key for managing dashboards", "scopes": ["dashboards_read", "dashboards_write", "dashboards_public_share"]}, "id": "00112233-4455-6677-8899-aabbccddeeff", "type": "application_keys"}} When the request is sent @@ -179,8 +162,7 @@ Feature: Key Management @team:DataDog/credentials-management Scenario: Edit an application key owned by current user returns "OK" response - Given a valid "appKeyAuth" key in the system - And there is a valid "application_key" in the system + Given there is a valid "application_key" in the system And new "UpdateCurrentUserApplicationKey" request And request contains "app_key_id" parameter from "application_key.data.id" And body with value {"data": {"id": "{{ application_key.data.id }}", "type": "application_keys", "attributes": {"name" : "{{ application_key.data.attributes.name }}-updated"}}} @@ -192,8 +174,7 @@ Feature: Key Management @generated @skip @team:DataDog/credentials-management Scenario: Edit an application key returns "Bad Request" response - Given a valid "appKeyAuth" key in the system - And new "UpdateApplicationKey" request + Given new "UpdateApplicationKey" request And request contains "app_key_id" parameter from "REPLACE.ME" And body with value {"data": {"attributes": {"name": "Application Key for managing dashboards", "scopes": ["dashboards_read", "dashboards_write", "dashboards_public_share"]}, "id": "00112233-4455-6677-8899-aabbccddeeff", "type": "application_keys"}} When the request is sent @@ -201,8 +182,7 @@ Feature: Key Management @generated @skip @team:DataDog/credentials-management Scenario: Edit an application key returns "Not Found" response - Given a valid "appKeyAuth" key in the system - And new "UpdateApplicationKey" request + Given new "UpdateApplicationKey" request And request contains "app_key_id" parameter from "REPLACE.ME" And body with value {"data": {"attributes": {"name": "Application Key for managing dashboards", "scopes": ["dashboards_read", "dashboards_write", "dashboards_public_share"]}, "id": "00112233-4455-6677-8899-aabbccddeeff", "type": "application_keys"}} When the request is sent @@ -210,8 +190,7 @@ Feature: Key Management @team:DataDog/credentials-management Scenario: Edit an application key returns "OK" response - Given a valid "appKeyAuth" key in the system - And there is a valid "application_key" in the system + Given there is a valid "application_key" in the system And new "UpdateApplicationKey" request And request contains "app_key_id" parameter from "application_key.data.id" And body with value {"data": {"id": "{{ application_key.data.id }}", "type": "application_keys", "attributes": {"name" : "{{ application_key.data.attributes.name }}-updated"}}} @@ -223,16 +202,14 @@ Feature: Key Management @team:DataDog/credentials-management Scenario: Get API key returns "Not Found" response - Given a valid "appKeyAuth" key in the system - And new "GetAPIKey" request + Given new "GetAPIKey" request And request contains "api_key_id" parameter with value "invalidId" When the request is sent Then the response status is 404 Not Found @team:DataDog/credentials-management Scenario: Get API key returns "OK" response - Given a valid "appKeyAuth" key in the system - And there is a valid "api_key" in the system + Given there is a valid "api_key" in the system And new "GetAPIKey" request And request contains "api_key_id" parameter from "api_key.data.id" When the request is sent @@ -243,16 +220,14 @@ Feature: Key Management @generated @skip @team:DataDog/credentials-management Scenario: Get a personal access token returns "Not Found" response - Given a valid "appKeyAuth" key in the system - And new "GetPersonalAccessToken" request + Given new "GetPersonalAccessToken" request And request contains "pat_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 404 Not Found @team:DataDog/credentials-management Scenario: Get a personal access token returns "OK" response - Given a valid "appKeyAuth" key in the system - And there is a valid "personal_access_token" in the system + Given there is a valid "personal_access_token" in the system And new "GetPersonalAccessToken" request And request contains "pat_id" parameter from "personal_access_token.data.id" When the request is sent @@ -262,15 +237,13 @@ Feature: Key Management @generated @skip @team:DataDog/credentials-management Scenario: Get all API keys returns "Bad Request" response - Given a valid "appKeyAuth" key in the system - And new "ListAPIKeys" request + Given new "ListAPIKeys" request When the request is sent Then the response status is 400 Bad Request @team:DataDog/credentials-management Scenario: Get all API keys returns "OK" response - Given a valid "appKeyAuth" key in the system - And there is a valid "api_key" in the system + Given there is a valid "api_key" in the system And new "ListAPIKeys" request And request contains "filter" parameter from "api_key.data.attributes.name" When the request is sent @@ -280,22 +253,19 @@ Feature: Key Management @generated @skip @team:DataDog/credentials-management Scenario: Get all application keys owned by current user returns "Bad Request" response - Given a valid "appKeyAuth" key in the system - And new "ListCurrentUserApplicationKeys" request + Given new "ListCurrentUserApplicationKeys" request When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/credentials-management Scenario: Get all application keys owned by current user returns "Not Found" response - Given a valid "appKeyAuth" key in the system - And new "ListCurrentUserApplicationKeys" request + Given new "ListCurrentUserApplicationKeys" request When the request is sent Then the response status is 404 Not Found @team:DataDog/credentials-management Scenario: Get all application keys owned by current user returns "OK" response - Given a valid "appKeyAuth" key in the system - And new "ListCurrentUserApplicationKeys" request + Given new "ListCurrentUserApplicationKeys" request When the request is sent Then the response status is 200 OK And the response "data[0].type" is equal to "application_keys" @@ -303,22 +273,19 @@ Feature: Key Management @generated @skip @team:DataDog/credentials-management Scenario: Get all application keys returns "Bad Request" response - Given a valid "appKeyAuth" key in the system - And new "ListApplicationKeys" request + Given new "ListApplicationKeys" request When the request is sent Then the response status is 400 Bad Request @generated @skip @team:DataDog/credentials-management Scenario: Get all application keys returns "Not Found" response - Given a valid "appKeyAuth" key in the system - And new "ListApplicationKeys" request + Given new "ListApplicationKeys" request When the request is sent Then the response status is 404 Not Found @team:DataDog/credentials-management Scenario: Get all application keys returns "OK" response - Given a valid "appKeyAuth" key in the system - And there is a valid "application_key" in the system + Given there is a valid "application_key" in the system And new "ListApplicationKeys" request When the request is sent Then the response status is 200 OK @@ -327,15 +294,13 @@ Feature: Key Management @generated @skip @team:DataDog/credentials-management Scenario: Get all personal access tokens returns "Bad Request" response - Given a valid "appKeyAuth" key in the system - And new "ListPersonalAccessTokens" request + Given new "ListPersonalAccessTokens" request When the request is sent Then the response status is 400 Bad Request @team:DataDog/credentials-management Scenario: Get all personal access tokens returns "OK" response - Given a valid "appKeyAuth" key in the system - And there is a valid "personal_access_token" in the system + Given there is a valid "personal_access_token" in the system And new "ListPersonalAccessTokens" request When the request is sent Then the response status is 200 OK @@ -343,24 +308,21 @@ Feature: Key Management @generated @skip @team:DataDog/credentials-management Scenario: Get an application key returns "Bad Request" response - Given a valid "appKeyAuth" key in the system - And new "GetApplicationKey" request + Given new "GetApplicationKey" request And request contains "app_key_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 400 Bad Request @team:DataDog/credentials-management Scenario: Get an application key returns "Not Found" response - Given a valid "appKeyAuth" key in the system - And new "GetApplicationKey" request + Given new "GetApplicationKey" request And request contains "app_key_id" parameter with value "invalidId" When the request is sent Then the response status is 404 Not Found @team:DataDog/credentials-management Scenario: Get an application key returns "OK" response - Given a valid "appKeyAuth" key in the system - And there is a valid "application_key" in the system + Given there is a valid "application_key" in the system And new "GetApplicationKey" request And request contains "app_key_id" parameter from "application_key.data.id" When the request is sent @@ -371,16 +333,14 @@ Feature: Key Management @team:DataDog/credentials-management Scenario: Get one application key owned by current user returns "Not Found" response - Given a valid "appKeyAuth" key in the system - And new "GetCurrentUserApplicationKey" request + Given new "GetCurrentUserApplicationKey" request And request contains "app_key_id" parameter with value "incorrectId" When the request is sent Then the response status is 404 Not Found @team:DataDog/credentials-management Scenario: Get one application key owned by current user returns "OK" response - Given a valid "appKeyAuth" key in the system - And there is a valid "application_key" in the system + Given there is a valid "application_key" in the system And new "GetCurrentUserApplicationKey" request And request contains "app_key_id" parameter from "application_key.data.id" When the request is sent @@ -393,8 +353,7 @@ Feature: Key Management @team:DataDog/credentials-management Scenario: Revoke a personal access token returns "No Content" response - Given a valid "appKeyAuth" key in the system - And there is a valid "personal_access_token" in the system + Given there is a valid "personal_access_token" in the system And new "RevokePersonalAccessToken" request And request contains "pat_id" parameter from "personal_access_token.data.id" When the request is sent @@ -402,16 +361,14 @@ Feature: Key Management @generated @skip @team:DataDog/credentials-management Scenario: Revoke a personal access token returns "Not Found" response - Given a valid "appKeyAuth" key in the system - And new "RevokePersonalAccessToken" request + Given new "RevokePersonalAccessToken" request And request contains "pat_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 404 Not Found @generated @skip @team:DataDog/credentials-management Scenario: Update a personal access token returns "Bad Request" response - Given a valid "appKeyAuth" key in the system - And new "UpdatePersonalAccessToken" request + Given new "UpdatePersonalAccessToken" request And request contains "pat_id" parameter from "REPLACE.ME" And body with value {"data": {"attributes": {"name": "Updated Personal Access Token", "scopes": ["dashboards_read", "dashboards_write"]}, "id": "00112233-4455-6677-8899-aabbccddeeff", "type": "personal_access_tokens"}} When the request is sent @@ -419,8 +376,7 @@ Feature: Key Management @generated @skip @team:DataDog/credentials-management Scenario: Update a personal access token returns "Not Found" response - Given a valid "appKeyAuth" key in the system - And new "UpdatePersonalAccessToken" request + Given new "UpdatePersonalAccessToken" request And request contains "pat_id" parameter from "REPLACE.ME" And body with value {"data": {"attributes": {"name": "Updated Personal Access Token", "scopes": ["dashboards_read", "dashboards_write"]}, "id": "00112233-4455-6677-8899-aabbccddeeff", "type": "personal_access_tokens"}} When the request is sent @@ -428,25 +384,10 @@ Feature: Key Management @team:DataDog/credentials-management Scenario: Update a personal access token returns "OK" response - Given a valid "appKeyAuth" key in the system - And there is a valid "personal_access_token" in the system + Given there is a valid "personal_access_token" in the system And new "UpdatePersonalAccessToken" request And request contains "pat_id" parameter from "personal_access_token.data.id" And body with value {"data": {"type": "personal_access_tokens", "id": "{{ personal_access_token.data.id }}", "attributes": {"name": "{{ unique }}-updated"}}} When the request is sent Then the response status is 200 OK And the response "data.attributes.name" is equal to "{{ unique }}-updated" - - @generated @skip @team:DataDog/identity-platform - Scenario: Validate API and application keys returns "OK" response - Given a valid "appKeyAuth" key in the system - And new "ValidateAPIKey" request - When the request is sent - Then the response status is 200 OK - - @generated @skip @team:DataDog/identity-platform - Scenario: Validate API key returns "OK" response - Given operation "Validate" enabled - And new "Validate" request - 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 1ca1c2309a..3d8451720f 100644 --- a/tests/v2/features/undo.json +++ b/tests/v2/features/undo.json @@ -7163,18 +7163,6 @@ "type": "safe" } }, - "Validate": { - "tag": "Key Management", - "undo": { - "type": "safe" - } - }, - "ValidateAPIKey": { - "tag": "Key Management", - "undo": { - "type": "safe" - } - }, "ListWebIntegrationAccounts": { "tag": "Web Integrations", "undo": {