diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 4980e3a1bd..f961011395 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -1140,9 +1140,9 @@ components: schema: type: string PersonalAccessTokenID: - description: The UUID of the personal access token. + description: The ID of the personal access token. in: path - name: pat_uuid + name: pat_id required: true schema: example: "00000000-0000-1234-0000-000000000000" @@ -29288,11 +29288,6 @@ components: FullPersonalAccessTokenAttributes: description: Attributes of a full personal access token, including the token key. properties: - alias: - description: The alias (short identifier) of the personal access token. - example: "2H9MCNMBM8FQjQ16YucXkX" - readOnly: true - type: string created_at: description: Creation date of the personal access token. example: "2024-01-01T00:00:00+00:00" @@ -53523,11 +53518,6 @@ components: PersonalAccessTokenAttributes: description: Attributes of a personal access token. properties: - alias: - description: The alias (short identifier) of the personal access token. - example: "2H9MCNMBM8FQjQ16YucXkX" - readOnly: true - type: string created_at: description: Creation date of the personal access token. example: "2024-01-01T00:00:00+00:00" @@ -78073,6 +78063,10 @@ components: description: Title of the user. nullable: true type: string + uuid: + description: UUID of the user. + readOnly: true + type: string verified: description: Whether the user is verified. type: boolean @@ -109765,7 +109759,7 @@ paths: operator: OR permissions: - user_app_keys - /api/v2/personal_access_tokens/{pat_uuid}: + /api/v2/personal_access_tokens/{pat_id}: delete: description: Revoke a specific personal access token. operationId: RevokePersonalAccessToken @@ -121344,7 +121338,7 @@ paths: operator: OR permissions: - service_account_write - /api/v2/service_accounts/{service_account_id}/access_tokens/{pat_uuid}: + /api/v2/service_accounts/{service_account_id}/access_tokens/{pat_id}: delete: description: Revoke a specific access token for a service account. operationId: RevokeServiceAccountAccessToken diff --git a/examples/v2/key-management/GetPersonalAccessToken.py b/examples/v2/key-management/GetPersonalAccessToken.py index a233e8f84b..d2a095c8b5 100644 --- a/examples/v2/key-management/GetPersonalAccessToken.py +++ b/examples/v2/key-management/GetPersonalAccessToken.py @@ -13,7 +13,7 @@ with ApiClient(configuration) as api_client: api_instance = KeyManagementApi(api_client) response = api_instance.get_personal_access_token( - pat_uuid=PERSONAL_ACCESS_TOKEN_DATA_ID, + pat_id=PERSONAL_ACCESS_TOKEN_DATA_ID, ) print(response) diff --git a/examples/v2/key-management/RevokePersonalAccessToken.py b/examples/v2/key-management/RevokePersonalAccessToken.py index 3b58563d3c..e556052464 100644 --- a/examples/v2/key-management/RevokePersonalAccessToken.py +++ b/examples/v2/key-management/RevokePersonalAccessToken.py @@ -13,5 +13,5 @@ with ApiClient(configuration) as api_client: api_instance = KeyManagementApi(api_client) api_instance.revoke_personal_access_token( - pat_uuid=PERSONAL_ACCESS_TOKEN_DATA_ID, + pat_id=PERSONAL_ACCESS_TOKEN_DATA_ID, ) diff --git a/examples/v2/key-management/UpdatePersonalAccessToken.py b/examples/v2/key-management/UpdatePersonalAccessToken.py index a2bda12b8a..38e95f97ff 100644 --- a/examples/v2/key-management/UpdatePersonalAccessToken.py +++ b/examples/v2/key-management/UpdatePersonalAccessToken.py @@ -26,6 +26,6 @@ configuration = Configuration() with ApiClient(configuration) as api_client: api_instance = KeyManagementApi(api_client) - response = api_instance.update_personal_access_token(pat_uuid=PERSONAL_ACCESS_TOKEN_DATA_ID, body=body) + response = api_instance.update_personal_access_token(pat_id=PERSONAL_ACCESS_TOKEN_DATA_ID, body=body) print(response) diff --git a/examples/v2/service-accounts/GetServiceAccountAccessToken.py b/examples/v2/service-accounts/GetServiceAccountAccessToken.py index efde74d186..babbbfbe2b 100644 --- a/examples/v2/service-accounts/GetServiceAccountAccessToken.py +++ b/examples/v2/service-accounts/GetServiceAccountAccessToken.py @@ -17,7 +17,7 @@ api_instance = ServiceAccountsApi(api_client) response = api_instance.get_service_account_access_token( service_account_id=SERVICE_ACCOUNT_USER_DATA_ID, - pat_uuid=SERVICE_ACCOUNT_ACCESS_TOKEN_DATA_ID, + pat_id=SERVICE_ACCOUNT_ACCESS_TOKEN_DATA_ID, ) print(response) diff --git a/examples/v2/service-accounts/RevokeServiceAccountAccessToken.py b/examples/v2/service-accounts/RevokeServiceAccountAccessToken.py index 6c299ceb1a..55187e47e5 100644 --- a/examples/v2/service-accounts/RevokeServiceAccountAccessToken.py +++ b/examples/v2/service-accounts/RevokeServiceAccountAccessToken.py @@ -17,5 +17,5 @@ api_instance = ServiceAccountsApi(api_client) api_instance.revoke_service_account_access_token( service_account_id=SERVICE_ACCOUNT_USER_DATA_ID, - pat_uuid=SERVICE_ACCOUNT_ACCESS_TOKEN_DATA_ID, + pat_id=SERVICE_ACCOUNT_ACCESS_TOKEN_DATA_ID, ) diff --git a/examples/v2/service-accounts/UpdateServiceAccountAccessToken.py b/examples/v2/service-accounts/UpdateServiceAccountAccessToken.py index 791fb71c99..1810fb2877 100644 --- a/examples/v2/service-accounts/UpdateServiceAccountAccessToken.py +++ b/examples/v2/service-accounts/UpdateServiceAccountAccessToken.py @@ -31,7 +31,7 @@ with ApiClient(configuration) as api_client: api_instance = ServiceAccountsApi(api_client) response = api_instance.update_service_account_access_token( - service_account_id=SERVICE_ACCOUNT_USER_DATA_ID, pat_uuid=SERVICE_ACCOUNT_ACCESS_TOKEN_DATA_ID, body=body + service_account_id=SERVICE_ACCOUNT_USER_DATA_ID, pat_id=SERVICE_ACCOUNT_ACCESS_TOKEN_DATA_ID, body=body ) print(response) 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 11060b7a16..c47153cb4f 100644 --- a/src/datadog_api_client/v2/api/key_management_api.py +++ b/src/datadog_api_client/v2/api/key_management_api.py @@ -257,16 +257,16 @@ def __init__(self, api_client=None): settings={ "response_type": (PersonalAccessTokenResponse,), "auth": ["apiKeyAuth", "appKeyAuth"], - "endpoint_path": "/api/v2/personal_access_tokens/{pat_uuid}", + "endpoint_path": "/api/v2/personal_access_tokens/{pat_id}", "operation_id": "get_personal_access_token", "http_method": "GET", "version": "v2", }, params_map={ - "pat_uuid": { + "pat_id": { "required": True, "openapi_types": (str,), - "attribute": "pat_uuid", + "attribute": "pat_id", "location": "path", }, }, @@ -499,16 +499,16 @@ def __init__(self, api_client=None): settings={ "response_type": None, "auth": ["apiKeyAuth", "appKeyAuth"], - "endpoint_path": "/api/v2/personal_access_tokens/{pat_uuid}", + "endpoint_path": "/api/v2/personal_access_tokens/{pat_id}", "operation_id": "revoke_personal_access_token", "http_method": "DELETE", "version": "v2", }, params_map={ - "pat_uuid": { + "pat_id": { "required": True, "openapi_types": (str,), - "attribute": "pat_uuid", + "attribute": "pat_id", "location": "path", }, }, @@ -600,16 +600,16 @@ def __init__(self, api_client=None): settings={ "response_type": (PersonalAccessTokenResponse,), "auth": ["apiKeyAuth", "appKeyAuth"], - "endpoint_path": "/api/v2/personal_access_tokens/{pat_uuid}", + "endpoint_path": "/api/v2/personal_access_tokens/{pat_id}", "operation_id": "update_personal_access_token", "http_method": "PATCH", "version": "v2", }, params_map={ - "pat_uuid": { + "pat_id": { "required": True, "openapi_types": (str,), - "attribute": "pat_uuid", + "attribute": "pat_id", "location": "path", }, "body": { @@ -789,18 +789,18 @@ def get_current_user_application_key( def get_personal_access_token( self, - pat_uuid: str, + pat_id: str, ) -> PersonalAccessTokenResponse: """Get a personal access token. Get a specific personal access token by its UUID. - :param pat_uuid: The UUID of the personal access token. - :type pat_uuid: str + :param pat_id: The ID of the personal access token. + :type pat_id: str :rtype: PersonalAccessTokenResponse """ kwargs: Dict[str, Any] = {} - kwargs["pat_uuid"] = pat_uuid + kwargs["pat_id"] = pat_id return self._get_personal_access_token_endpoint.call_with_http_info(**kwargs) @@ -1046,18 +1046,18 @@ def list_personal_access_tokens( def revoke_personal_access_token( self, - pat_uuid: str, + pat_id: str, ) -> None: """Revoke a personal access token. Revoke a specific personal access token. - :param pat_uuid: The UUID of the personal access token. - :type pat_uuid: str + :param pat_id: The ID of the personal access token. + :type pat_id: str :rtype: None """ kwargs: Dict[str, Any] = {} - kwargs["pat_uuid"] = pat_uuid + kwargs["pat_id"] = pat_id return self._revoke_personal_access_token_endpoint.call_with_http_info(**kwargs) @@ -1127,20 +1127,20 @@ def update_current_user_application_key( def update_personal_access_token( self, - pat_uuid: str, + pat_id: str, body: PersonalAccessTokenUpdateRequest, ) -> PersonalAccessTokenResponse: """Update a personal access token. Update a specific personal access token. - :param pat_uuid: The UUID of the personal access token. - :type pat_uuid: str + :param pat_id: The ID of the personal access token. + :type pat_id: str :type body: PersonalAccessTokenUpdateRequest :rtype: PersonalAccessTokenResponse """ kwargs: Dict[str, Any] = {} - kwargs["pat_uuid"] = pat_uuid + kwargs["pat_id"] = pat_id kwargs["body"] = body diff --git a/src/datadog_api_client/v2/api/service_accounts_api.py b/src/datadog_api_client/v2/api/service_accounts_api.py index 79b63e3b78..e972993b05 100644 --- a/src/datadog_api_client/v2/api/service_accounts_api.py +++ b/src/datadog_api_client/v2/api/service_accounts_api.py @@ -144,7 +144,7 @@ def __init__(self, api_client=None): settings={ "response_type": (PersonalAccessTokenResponse,), "auth": ["apiKeyAuth", "appKeyAuth"], - "endpoint_path": "/api/v2/service_accounts/{service_account_id}/access_tokens/{pat_uuid}", + "endpoint_path": "/api/v2/service_accounts/{service_account_id}/access_tokens/{pat_id}", "operation_id": "get_service_account_access_token", "http_method": "GET", "version": "v2", @@ -156,10 +156,10 @@ def __init__(self, api_client=None): "attribute": "service_account_id", "location": "path", }, - "pat_uuid": { + "pat_id": { "required": True, "openapi_types": (str,), - "attribute": "pat_uuid", + "attribute": "pat_id", "location": "path", }, }, @@ -298,7 +298,7 @@ def __init__(self, api_client=None): settings={ "response_type": None, "auth": ["apiKeyAuth", "appKeyAuth"], - "endpoint_path": "/api/v2/service_accounts/{service_account_id}/access_tokens/{pat_uuid}", + "endpoint_path": "/api/v2/service_accounts/{service_account_id}/access_tokens/{pat_id}", "operation_id": "revoke_service_account_access_token", "http_method": "DELETE", "version": "v2", @@ -310,10 +310,10 @@ def __init__(self, api_client=None): "attribute": "service_account_id", "location": "path", }, - "pat_uuid": { + "pat_id": { "required": True, "openapi_types": (str,), - "attribute": "pat_uuid", + "attribute": "pat_id", "location": "path", }, }, @@ -327,7 +327,7 @@ def __init__(self, api_client=None): settings={ "response_type": (PersonalAccessTokenResponse,), "auth": ["apiKeyAuth", "appKeyAuth"], - "endpoint_path": "/api/v2/service_accounts/{service_account_id}/access_tokens/{pat_uuid}", + "endpoint_path": "/api/v2/service_accounts/{service_account_id}/access_tokens/{pat_id}", "operation_id": "update_service_account_access_token", "http_method": "PATCH", "version": "v2", @@ -339,10 +339,10 @@ def __init__(self, api_client=None): "attribute": "service_account_id", "location": "path", }, - "pat_uuid": { + "pat_id": { "required": True, "openapi_types": (str,), - "attribute": "pat_uuid", + "attribute": "pat_id", "location": "path", }, "body": { @@ -470,7 +470,7 @@ def delete_service_account_application_key( def get_service_account_access_token( self, service_account_id: str, - pat_uuid: str, + pat_id: str, ) -> PersonalAccessTokenResponse: """Get an access token for a service account. @@ -478,14 +478,14 @@ def get_service_account_access_token( :param service_account_id: The ID of the service account. :type service_account_id: str - :param pat_uuid: The UUID of the personal access token. - :type pat_uuid: str + :param pat_id: The ID of the personal access token. + :type pat_id: str :rtype: PersonalAccessTokenResponse """ kwargs: Dict[str, Any] = {} kwargs["service_account_id"] = service_account_id - kwargs["pat_uuid"] = pat_uuid + kwargs["pat_id"] = pat_id return self._get_service_account_access_token_endpoint.call_with_http_info(**kwargs) @@ -614,7 +614,7 @@ def list_service_account_application_keys( def revoke_service_account_access_token( self, service_account_id: str, - pat_uuid: str, + pat_id: str, ) -> None: """Revoke an access token for a service account. @@ -622,21 +622,21 @@ def revoke_service_account_access_token( :param service_account_id: The ID of the service account. :type service_account_id: str - :param pat_uuid: The UUID of the personal access token. - :type pat_uuid: str + :param pat_id: The ID of the personal access token. + :type pat_id: str :rtype: None """ kwargs: Dict[str, Any] = {} kwargs["service_account_id"] = service_account_id - kwargs["pat_uuid"] = pat_uuid + kwargs["pat_id"] = pat_id return self._revoke_service_account_access_token_endpoint.call_with_http_info(**kwargs) def update_service_account_access_token( self, service_account_id: str, - pat_uuid: str, + pat_id: str, body: PersonalAccessTokenUpdateRequest, ) -> PersonalAccessTokenResponse: """Update an access token for a service account. @@ -645,15 +645,15 @@ def update_service_account_access_token( :param service_account_id: The ID of the service account. :type service_account_id: str - :param pat_uuid: The UUID of the personal access token. - :type pat_uuid: str + :param pat_id: The ID of the personal access token. + :type pat_id: str :type body: PersonalAccessTokenUpdateRequest :rtype: PersonalAccessTokenResponse """ kwargs: Dict[str, Any] = {} kwargs["service_account_id"] = service_account_id - kwargs["pat_uuid"] = pat_uuid + kwargs["pat_id"] = pat_id kwargs["body"] = body diff --git a/src/datadog_api_client/v2/model/full_personal_access_token_attributes.py b/src/datadog_api_client/v2/model/full_personal_access_token_attributes.py index 92caedc173..3a21d3e044 100644 --- a/src/datadog_api_client/v2/model/full_personal_access_token_attributes.py +++ b/src/datadog_api_client/v2/model/full_personal_access_token_attributes.py @@ -19,7 +19,6 @@ class FullPersonalAccessTokenAttributes(ModelNormal): @cached_property def openapi_types(_): return { - "alias": (str,), "created_at": (datetime,), "expires_at": (datetime, none_type), "key": (str,), @@ -29,7 +28,6 @@ def openapi_types(_): } attribute_map = { - "alias": "alias", "created_at": "created_at", "expires_at": "expires_at", "key": "key", @@ -38,7 +36,6 @@ def openapi_types(_): "scopes": "scopes", } read_only_vars = { - "alias", "created_at", "expires_at", "key", @@ -47,7 +44,6 @@ def openapi_types(_): def __init__( self_, - alias: Union[str, UnsetType] = unset, created_at: Union[datetime, UnsetType] = unset, expires_at: Union[datetime, none_type, UnsetType] = unset, key: Union[str, UnsetType] = unset, @@ -59,9 +55,6 @@ def __init__( """ Attributes of a full personal access token, including the token key. - :param alias: The alias (short identifier) of the personal access token. - :type alias: str, optional - :param created_at: Creation date of the personal access token. :type created_at: datetime, optional @@ -80,8 +73,6 @@ def __init__( :param scopes: Array of scopes granted to the personal access token. :type scopes: [str], optional """ - if alias is not unset: - kwargs["alias"] = alias if created_at is not unset: kwargs["created_at"] = created_at if expires_at is not unset: diff --git a/src/datadog_api_client/v2/model/personal_access_token_attributes.py b/src/datadog_api_client/v2/model/personal_access_token_attributes.py index f6ffe30eaa..94bdf38d93 100644 --- a/src/datadog_api_client/v2/model/personal_access_token_attributes.py +++ b/src/datadog_api_client/v2/model/personal_access_token_attributes.py @@ -19,7 +19,6 @@ class PersonalAccessTokenAttributes(ModelNormal): @cached_property def openapi_types(_): return { - "alias": (str,), "created_at": (datetime,), "expires_at": (datetime, none_type), "last_used_at": (datetime, none_type), @@ -30,7 +29,6 @@ def openapi_types(_): } attribute_map = { - "alias": "alias", "created_at": "created_at", "expires_at": "expires_at", "last_used_at": "last_used_at", @@ -40,7 +38,6 @@ def openapi_types(_): "scopes": "scopes", } read_only_vars = { - "alias", "created_at", "expires_at", "last_used_at", @@ -50,7 +47,6 @@ def openapi_types(_): def __init__( self_, - alias: Union[str, UnsetType] = unset, created_at: Union[datetime, UnsetType] = unset, expires_at: Union[datetime, none_type, UnsetType] = unset, last_used_at: Union[datetime, none_type, UnsetType] = unset, @@ -63,9 +59,6 @@ def __init__( """ Attributes of a personal access token. - :param alias: The alias (short identifier) of the personal access token. - :type alias: str, optional - :param created_at: Creation date of the personal access token. :type created_at: datetime, optional @@ -87,8 +80,6 @@ def __init__( :param scopes: Array of scopes granted to the personal access token. :type scopes: [str], optional """ - if alias is not unset: - kwargs["alias"] = alias if created_at is not unset: kwargs["created_at"] = created_at if expires_at is not unset: diff --git a/src/datadog_api_client/v2/model/user_attributes.py b/src/datadog_api_client/v2/model/user_attributes.py index a4bed717c3..771ce371ad 100644 --- a/src/datadog_api_client/v2/model/user_attributes.py +++ b/src/datadog_api_client/v2/model/user_attributes.py @@ -31,6 +31,7 @@ def openapi_types(_): "service_account": (bool,), "status": (str,), "title": (str, none_type), + "uuid": (str,), "verified": (bool,), } @@ -47,11 +48,13 @@ def openapi_types(_): "service_account": "service_account", "status": "status", "title": "title", + "uuid": "uuid", "verified": "verified", } read_only_vars = { "last_login_time", "mfa_enabled", + "uuid", } def __init__( @@ -68,6 +71,7 @@ def __init__( service_account: Union[bool, UnsetType] = unset, status: Union[str, UnsetType] = unset, title: Union[str, none_type, UnsetType] = unset, + uuid: Union[str, UnsetType] = unset, verified: Union[bool, UnsetType] = unset, **kwargs, ): @@ -110,6 +114,9 @@ def __init__( :param title: Title of the user. :type title: str, none_type, optional + :param uuid: UUID of the user. + :type uuid: str, optional + :param verified: Whether the user is verified. :type verified: bool, optional """ @@ -137,6 +144,8 @@ def __init__( kwargs["status"] = status if title is not unset: kwargs["title"] = title + if uuid is not unset: + kwargs["uuid"] = uuid if verified is not unset: kwargs["verified"] = verified super().__init__(kwargs) diff --git a/tests/v2/cassettes/test_scenarios/test_create_an_access_token_for_a_service_account_returns_created_response.frozen b/tests/v2/cassettes/test_scenarios/test_create_an_access_token_for_a_service_account_returns_created_response.frozen index b457d0ec92..7ccf87f4bd 100644 --- a/tests/v2/cassettes/test_scenarios/test_create_an_access_token_for_a_service_account_returns_created_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_create_an_access_token_for_a_service_account_returns_created_response.frozen @@ -1 +1 @@ -2026-04-03T21:02:56.793Z \ No newline at end of file +2026-04-16T20:03:06.304Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_create_an_access_token_for_a_service_account_returns_created_response.yaml b/tests/v2/cassettes/test_scenarios/test_create_an_access_token_for_a_service_account_returns_created_response.yaml index 438d769c9d..9058ede130 100644 --- a/tests/v2/cassettes/test_scenarios/test_create_an_access_token_for_a_service_account_returns_created_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_create_an_access_token_for_a_service_account_returns_created_response.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"data":{"attributes":{"email":"Test-Create_an_access_token_for_a_service_account_returns_Created_response-1775250176@datadoghq.com","service_account":true,"title":"user + body: '{"data":{"attributes":{"email":"Test-Create_an_access_token_for_a_service_account_returns_Created_response-1776369786@datadoghq.com","service_account":true,"title":"user title"},"type":"users"}}' headers: accept: @@ -11,7 +11,7 @@ interactions: uri: https://api.datadoghq.com/api/v2/service_accounts response: body: - string: '{"data":{"type":"users","id":"7d5e5ea9-2fa0-11f1-991f-62f4bfc595d0","attributes":{"name":null,"handle":"7d5e5ea9-2fa0-11f1-991f-62f4bfc595d0","created_at":"2026-04-03T21:02:56.980609+00:00","modified_at":"2026-04-03T21:02:56.980609+00:00","email":"test-create_an_access_token_for_a_service_account_returns_created_response-1775250176@datadoghq.com","icon":"https://secure.gravatar.com/avatar/1a703b50769c96d7b84a5470f474ef74?s=48&d=retro","title":"user + string: '{"data":{"type":"users","id":"498cce13-39cf-11f1-9928-be1871753dee","attributes":{"uuid":"498cce13-39cf-11f1-9928-be1871753dee","name":null,"handle":"498cce13-39cf-11f1-9928-be1871753dee","created_at":"2026-04-16T20:03:08.017467+00:00","modified_at":"2026-04-16T20:03:08.017467+00:00","email":"test-create_an_access_token_for_a_service_account_returns_created_response-1776369786@datadoghq.com","icon":"https://secure.gravatar.com/avatar/ed167ebfacd06c99ea70d4c121f5a7f1?s=48&d=retro","title":"user title","verified":true,"service_account":true,"disabled":false,"allowed_login_methods":[],"status":"Active","last_login_time":null},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} ' @@ -22,17 +22,17 @@ interactions: code: 201 message: Created - request: - body: '{"data":{"attributes":{"name":"Test-Create_an_access_token_for_a_service_account_returns_Created_response-1775250176","scopes":["dashboards_read"]},"type":"personal_access_tokens"}}' + body: '{"data":{"attributes":{"name":"Test-Create_an_access_token_for_a_service_account_returns_Created_response-1776369786","scopes":["dashboards_read"]},"type":"personal_access_tokens"}}' headers: accept: - application/json content-type: - application/json method: POST - uri: https://api.datadoghq.com/api/v2/service_accounts/7d5e5ea9-2fa0-11f1-991f-62f4bfc595d0/access_tokens + uri: https://api.datadoghq.com/api/v2/service_accounts/498cce13-39cf-11f1-9928-be1871753dee/access_tokens response: body: - string: '{"data":{"id":"6f2491f5-8c3f-45a3-962a-5f769b95e806","type":"personal_access_tokens","attributes":{"alias":"3NirNJ5Y2qB4Fmac8B4wnm","created_at":"2026-04-03T21:02:57.288351972Z","expires_at":null,"key":"xxxxx_xxxxxxxxxxxxxxxxxxxxxx_xxxxxxxxxxxxXxxxxxxxxxxxxxxxxxxxxxxx","name":"Test-Create_an_access_token_for_a_service_account_returns_Created_response-1775250176","public_portion":"3NirNJ5Y2qB4Fmac8B4wnm","scopes":["dashboards_read"]},"relationships":{"owned_by":{"data":{"id":"7d5e5ea9-2fa0-11f1-991f-62f4bfc595d0","type":"users"}}}}}' + string: '{"data":{"id":"88337232-8552-4495-987c-1cfed567d461","type":"personal_access_tokens","attributes":{"created_at":"2026-04-16T20:03:08.381725456Z","expires_at":null,"key":"xxxxx_xxxxxxxxxxxxxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","name":"Test-Create_an_access_token_for_a_service_account_returns_Created_response-1776369786","public_portion":"ddpat_490SyfYQqhqnr008BTjQWn","scopes":["dashboards_read"]},"relationships":{"owned_by":{"data":{"id":"498cce13-39cf-11f1-9928-be1871753dee","type":"users"}}}}}' headers: content-type: - application/vnd.api+json @@ -45,7 +45,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/service_accounts/7d5e5ea9-2fa0-11f1-991f-62f4bfc595d0/access_tokens/6f2491f5-8c3f-45a3-962a-5f769b95e806 + uri: https://api.datadoghq.com/api/v2/service_accounts/498cce13-39cf-11f1-9928-be1871753dee/access_tokens/88337232-8552-4495-987c-1cfed567d461 response: body: string: '' @@ -59,7 +59,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/users/7d5e5ea9-2fa0-11f1-991f-62f4bfc595d0 + uri: https://api.datadoghq.com/api/v2/users/498cce13-39cf-11f1-9928-be1871753dee response: body: string: '' diff --git a/tests/v2/cassettes/test_scenarios/test_get_an_access_token_for_a_service_account_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_get_an_access_token_for_a_service_account_returns_ok_response.frozen index 55c4828532..767a9f9c25 100644 --- a/tests/v2/cassettes/test_scenarios/test_get_an_access_token_for_a_service_account_returns_ok_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_get_an_access_token_for_a_service_account_returns_ok_response.frozen @@ -1 +1 @@ -2026-04-03T21:03:03.500Z \ No newline at end of file +2026-04-16T20:03:09.123Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_get_an_access_token_for_a_service_account_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_get_an_access_token_for_a_service_account_returns_ok_response.yaml index 6b4dcb3ce6..f4dd3f079e 100644 --- a/tests/v2/cassettes/test_scenarios/test_get_an_access_token_for_a_service_account_returns_ok_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_get_an_access_token_for_a_service_account_returns_ok_response.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"data":{"attributes":{"email":"Test-Get_an_access_token_for_a_service_account_returns_OK_response-1775250183@datadoghq.com","service_account":true,"title":"user + body: '{"data":{"attributes":{"email":"Test-Get_an_access_token_for_a_service_account_returns_OK_response-1776369789@datadoghq.com","service_account":true,"title":"user title"},"type":"users"}}' headers: accept: @@ -11,7 +11,7 @@ interactions: uri: https://api.datadoghq.com/api/v2/service_accounts response: body: - string: '{"data":{"type":"users","id":"8161ef90-2fa0-11f1-991f-62f4bfc595d0","attributes":{"name":null,"handle":"8161ef90-2fa0-11f1-991f-62f4bfc595d0","created_at":"2026-04-03T21:03:03.714879+00:00","modified_at":"2026-04-03T21:03:03.714879+00:00","email":"test-get_an_access_token_for_a_service_account_returns_ok_response-1775250183@datadoghq.com","icon":"https://secure.gravatar.com/avatar/bb3c6df0d99066bbe05cf7dff99b5561?s=48&d=retro","title":"user + string: '{"data":{"type":"users","id":"4a56376d-39cf-11f1-9a29-2eb65349fc01","attributes":{"uuid":"4a56376d-39cf-11f1-9a29-2eb65349fc01","name":null,"handle":"4a56376d-39cf-11f1-9a29-2eb65349fc01","created_at":"2026-04-16T20:03:09.337439+00:00","modified_at":"2026-04-16T20:03:09.337439+00:00","email":"test-get_an_access_token_for_a_service_account_returns_ok_response-1776369789@datadoghq.com","icon":"https://secure.gravatar.com/avatar/7473377b9dced0689feddb50f5d82d29?s=48&d=retro","title":"user title","verified":true,"service_account":true,"disabled":false,"allowed_login_methods":[],"status":"Active","last_login_time":null},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} ' @@ -22,17 +22,17 @@ interactions: code: 201 message: Created - request: - body: '{"data":{"attributes":{"name":"Test-Get_an_access_token_for_a_service_account_returns_OK_response-1775250183","scopes":["dashboards_read"]},"type":"personal_access_tokens"}}' + body: '{"data":{"attributes":{"name":"Test-Get_an_access_token_for_a_service_account_returns_OK_response-1776369789","scopes":["dashboards_read"]},"type":"personal_access_tokens"}}' headers: accept: - application/json content-type: - application/json method: POST - uri: https://api.datadoghq.com/api/v2/service_accounts/8161ef90-2fa0-11f1-991f-62f4bfc595d0/access_tokens + uri: https://api.datadoghq.com/api/v2/service_accounts/4a56376d-39cf-11f1-9a29-2eb65349fc01/access_tokens response: body: - string: '{"data":{"id":"f2362958-1e67-414b-985d-d3196afd9315","type":"personal_access_tokens","attributes":{"alias":"7N2tUOwxIjSF8QziOBIpVd","created_at":"2026-04-03T21:03:04.002376467Z","expires_at":null,"key":"xxxxx_xxxxxxxxxxxxxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","name":"Test-Get_an_access_token_for_a_service_account_returns_OK_response-1775250183","public_portion":"7N2tUOwxIjSF8QziOBIpVd","scopes":["dashboards_read"]},"relationships":{"owned_by":{"data":{"id":"8161ef90-2fa0-11f1-991f-62f4bfc595d0","type":"users"}}}}}' + string: '{"data":{"id":"b84d8c2c-b88c-4f72-82ef-fc09dddd1153","type":"personal_access_tokens","attributes":{"created_at":"2026-04-16T20:03:09.695802251Z","expires_at":null,"key":"xxxxx_xxxxxxxxxxxxxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","name":"Test-Get_an_access_token_for_a_service_account_returns_OK_response-1776369789","public_portion":"ddpat_5bm1hhcTKQzH22hPiJgkEN","scopes":["dashboards_read"]},"relationships":{"owned_by":{"data":{"id":"4a56376d-39cf-11f1-9a29-2eb65349fc01","type":"users"}}}}}' headers: content-type: - application/vnd.api+json @@ -45,10 +45,10 @@ interactions: accept: - application/json method: GET - uri: https://api.datadoghq.com/api/v2/service_accounts/8161ef90-2fa0-11f1-991f-62f4bfc595d0/access_tokens/f2362958-1e67-414b-985d-d3196afd9315 + uri: https://api.datadoghq.com/api/v2/service_accounts/4a56376d-39cf-11f1-9a29-2eb65349fc01/access_tokens/b84d8c2c-b88c-4f72-82ef-fc09dddd1153 response: body: - string: '{"data":{"id":"f2362958-1e67-414b-985d-d3196afd9315","type":"personal_access_tokens","attributes":{"alias":"7N2tUOwxIjSF8QziOBIpVd","created_at":"2026-04-03T21:03:04.002376Z","expires_at":null,"last_used_at":null,"name":"Test-Get_an_access_token_for_a_service_account_returns_OK_response-1775250183","public_portion":"7N2tUOwxIjSF8QziOBIpVd","scopes":["dashboards_read"]},"relationships":{"owned_by":{"data":{"id":"8161ef90-2fa0-11f1-991f-62f4bfc595d0","type":"users"}}}}}' + string: '{"data":{"id":"b84d8c2c-b88c-4f72-82ef-fc09dddd1153","type":"personal_access_tokens","attributes":{"created_at":"2026-04-16T20:03:09.695802Z","expires_at":null,"last_used_at":null,"name":"Test-Get_an_access_token_for_a_service_account_returns_OK_response-1776369789","public_portion":"ddpat_5bm1hhcTKQzH22hPiJgkEN","scopes":["dashboards_read"]},"relationships":{"owned_by":{"data":{"id":"4a56376d-39cf-11f1-9a29-2eb65349fc01","type":"users"}}}}}' headers: content-type: - application/vnd.api+json @@ -61,7 +61,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/service_accounts/8161ef90-2fa0-11f1-991f-62f4bfc595d0/access_tokens/f2362958-1e67-414b-985d-d3196afd9315 + uri: https://api.datadoghq.com/api/v2/service_accounts/4a56376d-39cf-11f1-9a29-2eb65349fc01/access_tokens/b84d8c2c-b88c-4f72-82ef-fc09dddd1153 response: body: string: '' @@ -75,7 +75,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/users/8161ef90-2fa0-11f1-991f-62f4bfc595d0 + uri: https://api.datadoghq.com/api/v2/users/4a56376d-39cf-11f1-9a29-2eb65349fc01 response: body: string: '' diff --git a/tests/v2/cassettes/test_scenarios/test_list_access_tokens_for_a_service_account_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_list_access_tokens_for_a_service_account_returns_ok_response.frozen index 6234af8a3e..db15643c3b 100644 --- a/tests/v2/cassettes/test_scenarios/test_list_access_tokens_for_a_service_account_returns_ok_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_list_access_tokens_for_a_service_account_returns_ok_response.frozen @@ -1 +1 @@ -2026-04-03T21:03:09.026Z \ No newline at end of file +2026-04-16T20:03:10.610Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_list_access_tokens_for_a_service_account_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_list_access_tokens_for_a_service_account_returns_ok_response.yaml index b70d2504dd..cadcd8a6fb 100644 --- a/tests/v2/cassettes/test_scenarios/test_list_access_tokens_for_a_service_account_returns_ok_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_list_access_tokens_for_a_service_account_returns_ok_response.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"data":{"attributes":{"email":"Test-List_access_tokens_for_a_service_account_returns_OK_response-1775250189@datadoghq.com","service_account":true,"title":"user + body: '{"data":{"attributes":{"email":"Test-List_access_tokens_for_a_service_account_returns_OK_response-1776369790@datadoghq.com","service_account":true,"title":"user title"},"type":"users"}}' headers: accept: @@ -11,8 +11,10 @@ interactions: uri: https://api.datadoghq.com/api/v2/service_accounts response: body: - string: '{"data":{"type":"users","id":"84a7b33b-2fa0-11f1-96b6-7a9b8860a1d7","attributes":{"name":null,"handle":"84a7b33b-2fa0-11f1-96b6-7a9b8860a1d7","created_at":"2026-04-03T21:03:09.205232+00:00","modified_at":"2026-04-03T21:03:09.205232+00:00","email":"test-list_access_tokens_for_a_service_account_returns_ok_response-1775250189@datadoghq.com","icon":"https://secure.gravatar.com/avatar/816e106f74328dd4c20e98c116a9edeb?s=48&d=retro","title":"user - title","verified":true,"service_account":true,"disabled":false,"allowed_login_methods":[],"status":"Active","last_login_time":null},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}}' + string: '{"data":{"type":"users","id":"4b3b0a2c-39cf-11f1-bf73-ce6d1c25b9b4","attributes":{"uuid":"4b3b0a2c-39cf-11f1-bf73-ce6d1c25b9b4","name":null,"handle":"4b3b0a2c-39cf-11f1-bf73-ce6d1c25b9b4","created_at":"2026-04-16T20:03:10.837056+00:00","modified_at":"2026-04-16T20:03:10.837056+00:00","email":"test-list_access_tokens_for_a_service_account_returns_ok_response-1776369790@datadoghq.com","icon":"https://secure.gravatar.com/avatar/0a5772e4c2381e3c1061e55142e2281a?s=48&d=retro","title":"user + title","verified":true,"service_account":true,"disabled":false,"allowed_login_methods":[],"status":"Active","last_login_time":null},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} + + ' headers: content-type: - application/json @@ -25,7 +27,7 @@ interactions: accept: - application/json method: GET - uri: https://api.datadoghq.com/api/v2/service_accounts/84a7b33b-2fa0-11f1-96b6-7a9b8860a1d7/access_tokens + uri: https://api.datadoghq.com/api/v2/service_accounts/4b3b0a2c-39cf-11f1-bf73-ce6d1c25b9b4/access_tokens response: body: string: '{"data":[],"meta":{"page":{"total_filtered_count":0}}}' @@ -41,7 +43,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/users/84a7b33b-2fa0-11f1-96b6-7a9b8860a1d7 + uri: https://api.datadoghq.com/api/v2/users/4b3b0a2c-39cf-11f1-bf73-ce6d1c25b9b4 response: body: string: '' diff --git a/tests/v2/cassettes/test_scenarios/test_revoke_an_access_token_for_a_service_account_returns_no_content_response.frozen b/tests/v2/cassettes/test_scenarios/test_revoke_an_access_token_for_a_service_account_returns_no_content_response.frozen index fa38ba91a9..4a8602fd91 100644 --- a/tests/v2/cassettes/test_scenarios/test_revoke_an_access_token_for_a_service_account_returns_no_content_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_revoke_an_access_token_for_a_service_account_returns_no_content_response.frozen @@ -1 +1 @@ -2026-04-03T21:03:10.520Z \ No newline at end of file +2026-04-16T20:03:12.932Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_revoke_an_access_token_for_a_service_account_returns_no_content_response.yaml b/tests/v2/cassettes/test_scenarios/test_revoke_an_access_token_for_a_service_account_returns_no_content_response.yaml index fd92701ebd..73008a5d7b 100644 --- a/tests/v2/cassettes/test_scenarios/test_revoke_an_access_token_for_a_service_account_returns_no_content_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_revoke_an_access_token_for_a_service_account_returns_no_content_response.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"data":{"attributes":{"email":"Test-Revoke_an_access_token_for_a_service_account_returns_No_Content_response-1775250190@datadoghq.com","service_account":true,"title":"user + body: '{"data":{"attributes":{"email":"Test-Revoke_an_access_token_for_a_service_account_returns_No_Content_response-1776369792@datadoghq.com","service_account":true,"title":"user title"},"type":"users"}}' headers: accept: @@ -11,7 +11,7 @@ interactions: uri: https://api.datadoghq.com/api/v2/service_accounts response: body: - string: '{"data":{"type":"users","id":"860878b5-2fa0-11f1-991f-62f4bfc595d0","attributes":{"name":null,"handle":"860878b5-2fa0-11f1-991f-62f4bfc595d0","created_at":"2026-04-03T21:03:11.517157+00:00","modified_at":"2026-04-03T21:03:11.517157+00:00","email":"test-revoke_an_access_token_for_a_service_account_returns_no_content_response-1775250190@datadoghq.com","icon":"https://secure.gravatar.com/avatar/7d18813f3cbc71a5e46b1184fc3ad8fb?s=48&d=retro","title":"user + string: '{"data":{"type":"users","id":"4c99fbee-39cf-11f1-beb2-cad70c641dfa","attributes":{"uuid":"4c99fbee-39cf-11f1-beb2-cad70c641dfa","name":null,"handle":"4c99fbee-39cf-11f1-beb2-cad70c641dfa","created_at":"2026-04-16T20:03:13.136998+00:00","modified_at":"2026-04-16T20:03:13.136998+00:00","email":"test-revoke_an_access_token_for_a_service_account_returns_no_content_response-1776369792@datadoghq.com","icon":"https://secure.gravatar.com/avatar/7586d09a6a08e32a963f425a34463a4d?s=48&d=retro","title":"user title","verified":true,"service_account":true,"disabled":false,"allowed_login_methods":[],"status":"Active","last_login_time":null},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} ' @@ -22,17 +22,17 @@ interactions: code: 201 message: Created - request: - body: '{"data":{"attributes":{"name":"Test-Revoke_an_access_token_for_a_service_account_returns_No_Content_response-1775250190","scopes":["dashboards_read"]},"type":"personal_access_tokens"}}' + body: '{"data":{"attributes":{"name":"Test-Revoke_an_access_token_for_a_service_account_returns_No_Content_response-1776369792","scopes":["dashboards_read"]},"type":"personal_access_tokens"}}' headers: accept: - application/json content-type: - application/json method: POST - uri: https://api.datadoghq.com/api/v2/service_accounts/860878b5-2fa0-11f1-991f-62f4bfc595d0/access_tokens + uri: https://api.datadoghq.com/api/v2/service_accounts/4c99fbee-39cf-11f1-beb2-cad70c641dfa/access_tokens response: body: - string: '{"data":{"id":"7346d75b-83f3-48ba-9186-899fc80bce16","type":"personal_access_tokens","attributes":{"alias":"3VWUVmuRsjFIKue2Uq9ii6","created_at":"2026-04-03T21:03:11.782016283Z","expires_at":null,"key":"xxxxx_xxxxxxxxxxxxxxxxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","name":"Test-Revoke_an_access_token_for_a_service_account_returns_No_Content_response-1775250190","public_portion":"3VWUVmuRsjFIKue2Uq9ii6","scopes":["dashboards_read"]},"relationships":{"owned_by":{"data":{"id":"860878b5-2fa0-11f1-991f-62f4bfc595d0","type":"users"}}}}}' + string: '{"data":{"id":"a5b5e3c3-2b58-448b-a1b1-5c97f16837a6","type":"personal_access_tokens","attributes":{"created_at":"2026-04-16T20:03:13.505344652Z","expires_at":null,"key":"xxxxx_xxxxxxxxxxxxxxxxxxxxxx_xxxxxxxxxXxxxxxxxxxxxxxxxxxxxxxxxxxx","name":"Test-Revoke_an_access_token_for_a_service_account_returns_No_Content_response-1776369792","public_portion":"ddpat_52grBIAi4zKGY0uxhjLVVW","scopes":["dashboards_read"]},"relationships":{"owned_by":{"data":{"id":"4c99fbee-39cf-11f1-beb2-cad70c641dfa","type":"users"}}}}}' headers: content-type: - application/vnd.api+json @@ -45,7 +45,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/service_accounts/860878b5-2fa0-11f1-991f-62f4bfc595d0/access_tokens/7346d75b-83f3-48ba-9186-899fc80bce16 + uri: https://api.datadoghq.com/api/v2/service_accounts/4c99fbee-39cf-11f1-beb2-cad70c641dfa/access_tokens/a5b5e3c3-2b58-448b-a1b1-5c97f16837a6 response: body: string: '' @@ -59,7 +59,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/service_accounts/860878b5-2fa0-11f1-991f-62f4bfc595d0/access_tokens/7346d75b-83f3-48ba-9186-899fc80bce16 + uri: https://api.datadoghq.com/api/v2/service_accounts/4c99fbee-39cf-11f1-beb2-cad70c641dfa/access_tokens/a5b5e3c3-2b58-448b-a1b1-5c97f16837a6 response: body: string: '' @@ -73,7 +73,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/users/860878b5-2fa0-11f1-991f-62f4bfc595d0 + uri: https://api.datadoghq.com/api/v2/users/4c99fbee-39cf-11f1-beb2-cad70c641dfa response: body: string: '' diff --git a/tests/v2/cassettes/test_scenarios/test_update_an_access_token_for_a_service_account_returns_ok_response.frozen b/tests/v2/cassettes/test_scenarios/test_update_an_access_token_for_a_service_account_returns_ok_response.frozen index 6a894d59da..58278ff6c0 100644 --- a/tests/v2/cassettes/test_scenarios/test_update_an_access_token_for_a_service_account_returns_ok_response.frozen +++ b/tests/v2/cassettes/test_scenarios/test_update_an_access_token_for_a_service_account_returns_ok_response.frozen @@ -1 +1 @@ -2026-04-03T21:03:12.499Z \ No newline at end of file +2026-04-16T20:03:14.527Z \ No newline at end of file diff --git a/tests/v2/cassettes/test_scenarios/test_update_an_access_token_for_a_service_account_returns_ok_response.yaml b/tests/v2/cassettes/test_scenarios/test_update_an_access_token_for_a_service_account_returns_ok_response.yaml index 168e92229f..260224fe85 100644 --- a/tests/v2/cassettes/test_scenarios/test_update_an_access_token_for_a_service_account_returns_ok_response.yaml +++ b/tests/v2/cassettes/test_scenarios/test_update_an_access_token_for_a_service_account_returns_ok_response.yaml @@ -1,6 +1,6 @@ interactions: - request: - body: '{"data":{"attributes":{"email":"Test-Update_an_access_token_for_a_service_account_returns_OK_response-1775250192@datadoghq.com","service_account":true,"title":"user + body: '{"data":{"attributes":{"email":"Test-Update_an_access_token_for_a_service_account_returns_OK_response-1776369794@datadoghq.com","service_account":true,"title":"user title"},"type":"users"}}' headers: accept: @@ -11,7 +11,7 @@ interactions: uri: https://api.datadoghq.com/api/v2/service_accounts response: body: - string: '{"data":{"type":"users","id":"86bdf0d7-2fa0-11f1-991f-62f4bfc595d0","attributes":{"name":null,"handle":"86bdf0d7-2fa0-11f1-991f-62f4bfc595d0","created_at":"2026-04-03T21:03:12.706435+00:00","modified_at":"2026-04-03T21:03:12.706435+00:00","email":"test-update_an_access_token_for_a_service_account_returns_ok_response-1775250192@datadoghq.com","icon":"https://secure.gravatar.com/avatar/8ef25c203ebdbe5e11acb74bd99ba7da?s=48&d=retro","title":"user + string: '{"data":{"type":"users","id":"4d8efdef-39cf-11f1-bf73-ce6d1c25b9b4","attributes":{"uuid":"4d8efdef-39cf-11f1-bf73-ce6d1c25b9b4","name":null,"handle":"4d8efdef-39cf-11f1-bf73-ce6d1c25b9b4","created_at":"2026-04-16T20:03:14.742691+00:00","modified_at":"2026-04-16T20:03:14.742691+00:00","email":"test-update_an_access_token_for_a_service_account_returns_ok_response-1776369794@datadoghq.com","icon":"https://secure.gravatar.com/avatar/05aacae415f13819561258b03c973881?s=48&d=retro","title":"user title","verified":true,"service_account":true,"disabled":false,"allowed_login_methods":[],"status":"Active","last_login_time":null},"relationships":{"roles":{"data":[]},"org":{"data":{"type":"orgs","id":"4dee724d-00cc-11ea-a77b-570c9d03c6c5"}}}}} ' @@ -22,17 +22,17 @@ interactions: code: 201 message: Created - request: - body: '{"data":{"attributes":{"name":"Test-Update_an_access_token_for_a_service_account_returns_OK_response-1775250192","scopes":["dashboards_read"]},"type":"personal_access_tokens"}}' + body: '{"data":{"attributes":{"name":"Test-Update_an_access_token_for_a_service_account_returns_OK_response-1776369794","scopes":["dashboards_read"]},"type":"personal_access_tokens"}}' headers: accept: - application/json content-type: - application/json method: POST - uri: https://api.datadoghq.com/api/v2/service_accounts/86bdf0d7-2fa0-11f1-991f-62f4bfc595d0/access_tokens + uri: https://api.datadoghq.com/api/v2/service_accounts/4d8efdef-39cf-11f1-bf73-ce6d1c25b9b4/access_tokens response: body: - string: '{"data":{"id":"9a7d27cc-4969-4a57-990c-03c23a9f2adc","type":"personal_access_tokens","attributes":{"alias":"4hW0tyOpjf5Dj84mZaXqwe","created_at":"2026-04-03T21:03:12.978132411Z","expires_at":null,"key":"xxxxx_xxxxxxxxxxxxxxxxxxXxxx_xxxxxXxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx","name":"Test-Update_an_access_token_for_a_service_account_returns_OK_response-1775250192","public_portion":"4hW0tyOpjf5Dj84mZaXqwe","scopes":["dashboards_read"]},"relationships":{"owned_by":{"data":{"id":"86bdf0d7-2fa0-11f1-991f-62f4bfc595d0","type":"users"}}}}}' + string: '{"data":{"id":"eafa3dd9-430d-4075-a183-63171c7f3de5","type":"personal_access_tokens","attributes":{"created_at":"2026-04-16T20:03:15.138533237Z","expires_at":null,"key":"xxxxx_xxxxxxxxxxxxxxxxxxxxxx_xxxxxxxxxxxxxxxXxxxxxxxxxxxxxxxxxxxx","name":"Test-Update_an_access_token_for_a_service_account_returns_OK_response-1776369794","public_portion":"ddpat_79OZ2nUHcB3McO399ZaVVt","scopes":["dashboards_read"]},"relationships":{"owned_by":{"data":{"id":"4d8efdef-39cf-11f1-bf73-ce6d1c25b9b4","type":"users"}}}}}' headers: content-type: - application/vnd.api+json @@ -40,17 +40,17 @@ interactions: code: 201 message: Created - request: - body: '{"data":{"attributes":{"name":"Test-Update_an_access_token_for_a_service_account_returns_OK_response-1775250192-updated"},"id":"9a7d27cc-4969-4a57-990c-03c23a9f2adc","type":"personal_access_tokens"}}' + body: '{"data":{"attributes":{"name":"Test-Update_an_access_token_for_a_service_account_returns_OK_response-1776369794-updated"},"id":"eafa3dd9-430d-4075-a183-63171c7f3de5","type":"personal_access_tokens"}}' headers: accept: - application/json content-type: - application/json method: PATCH - uri: https://api.datadoghq.com/api/v2/service_accounts/86bdf0d7-2fa0-11f1-991f-62f4bfc595d0/access_tokens/9a7d27cc-4969-4a57-990c-03c23a9f2adc + uri: https://api.datadoghq.com/api/v2/service_accounts/4d8efdef-39cf-11f1-bf73-ce6d1c25b9b4/access_tokens/eafa3dd9-430d-4075-a183-63171c7f3de5 response: body: - string: '{"data":{"id":"9a7d27cc-4969-4a57-990c-03c23a9f2adc","type":"personal_access_tokens","attributes":{"alias":"4hW0tyOpjf5Dj84mZaXqwe","created_at":"2026-04-03T21:03:12.978132Z","expires_at":null,"last_used_at":null,"modified_at":"2026-04-03T21:03:13.152078Z","name":"Test-Update_an_access_token_for_a_service_account_returns_OK_response-1775250192-updated","public_portion":"4hW0tyOpjf5Dj84mZaXqwe","scopes":["dashboards_read"]},"relationships":{"owned_by":{"data":{"id":"86bdf0d7-2fa0-11f1-991f-62f4bfc595d0","type":"users"}}}}}' + string: '{"data":{"id":"eafa3dd9-430d-4075-a183-63171c7f3de5","type":"personal_access_tokens","attributes":{"created_at":"2026-04-16T20:03:15.138533Z","expires_at":null,"last_used_at":null,"modified_at":"2026-04-16T20:03:15.375809Z","name":"Test-Update_an_access_token_for_a_service_account_returns_OK_response-1776369794-updated","public_portion":"ddpat_79OZ2nUHcB3McO399ZaVVt","scopes":["dashboards_read"]},"relationships":{"owned_by":{"data":{"id":"4d8efdef-39cf-11f1-bf73-ce6d1c25b9b4","type":"users"}}}}}' headers: content-type: - application/vnd.api+json @@ -63,7 +63,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/service_accounts/86bdf0d7-2fa0-11f1-991f-62f4bfc595d0/access_tokens/9a7d27cc-4969-4a57-990c-03c23a9f2adc + uri: https://api.datadoghq.com/api/v2/service_accounts/4d8efdef-39cf-11f1-bf73-ce6d1c25b9b4/access_tokens/eafa3dd9-430d-4075-a183-63171c7f3de5 response: body: string: '' @@ -77,7 +77,7 @@ interactions: accept: - '*/*' method: DELETE - uri: https://api.datadoghq.com/api/v2/users/86bdf0d7-2fa0-11f1-991f-62f4bfc595d0 + uri: https://api.datadoghq.com/api/v2/users/4d8efdef-39cf-11f1-bf73-ce6d1c25b9b4 response: body: string: '' diff --git a/tests/v2/features/key_management.feature b/tests/v2/features/key_management.feature index 6c46484556..365c53ed7c 100644 --- a/tests/v2/features/key_management.feature +++ b/tests/v2/features/key_management.feature @@ -221,7 +221,7 @@ Feature: Key Management @generated @skip @team:DataDog/credentials-management Scenario: Get a personal access token returns "Not Found" response Given new "GetPersonalAccessToken" request - And request contains "pat_uuid" parameter from "REPLACE.ME" + And request contains "pat_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 404 Not Found @@ -229,7 +229,7 @@ Feature: Key Management Scenario: Get a personal access token returns "OK" response Given there is a valid "personal_access_token" in the system And new "GetPersonalAccessToken" request - And request contains "pat_uuid" parameter from "personal_access_token.data.id" + And request contains "pat_id" parameter from "personal_access_token.data.id" When the request is sent Then the response status is 200 OK And the response "data.type" is equal to "personal_access_tokens" @@ -355,21 +355,21 @@ Feature: Key Management Scenario: Revoke a personal access token returns "No Content" response Given there is a valid "personal_access_token" in the system And new "RevokePersonalAccessToken" request - And request contains "pat_uuid" parameter from "personal_access_token.data.id" + And request contains "pat_id" parameter from "personal_access_token.data.id" When the request is sent Then the response status is 204 No Content @generated @skip @team:DataDog/credentials-management Scenario: Revoke a personal access token returns "Not Found" response Given new "RevokePersonalAccessToken" request - And request contains "pat_uuid" parameter from "REPLACE.ME" + 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 new "UpdatePersonalAccessToken" request - And request contains "pat_uuid" parameter from "REPLACE.ME" + 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 Then the response status is 400 Bad Request @@ -377,7 +377,7 @@ Feature: Key Management @generated @skip @team:DataDog/credentials-management Scenario: Update a personal access token returns "Not Found" response Given new "UpdatePersonalAccessToken" request - And request contains "pat_uuid" parameter from "REPLACE.ME" + 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 Then the response status is 404 Not Found @@ -386,7 +386,7 @@ Feature: Key Management Scenario: Update a personal access token returns "OK" response Given there is a valid "personal_access_token" in the system And new "UpdatePersonalAccessToken" request - And request contains "pat_uuid" parameter from "personal_access_token.data.id" + 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 diff --git a/tests/v2/features/service_accounts.feature b/tests/v2/features/service_accounts.feature index 25744abc83..fa8c81440e 100644 --- a/tests/v2/features/service_accounts.feature +++ b/tests/v2/features/service_accounts.feature @@ -142,7 +142,7 @@ Feature: Service Accounts Scenario: Get an access token for a service account returns "Not Found" response Given new "GetServiceAccountAccessToken" request And request contains "service_account_id" parameter from "REPLACE.ME" - And request contains "pat_uuid" parameter from "REPLACE.ME" + And request contains "pat_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 404 Not Found @@ -152,7 +152,7 @@ Feature: Service Accounts And there is a valid "service_account_access_token" for "service_account_user" And new "GetServiceAccountAccessToken" request And request contains "service_account_id" parameter from "service_account_user.data.id" - And request contains "pat_uuid" parameter from "service_account_access_token.data.id" + And request contains "pat_id" parameter from "service_account_access_token.data.id" When the request is sent Then the response status is 200 OK And the response "data.attributes.name" has the same value as "service_account_access_token.data.attributes.name" @@ -232,7 +232,7 @@ Feature: Service Accounts And there is a valid "service_account_access_token" for "service_account_user" And new "RevokeServiceAccountAccessToken" request And request contains "service_account_id" parameter from "service_account_user.data.id" - And request contains "pat_uuid" parameter from "service_account_access_token.data.id" + And request contains "pat_id" parameter from "service_account_access_token.data.id" When the request is sent Then the response status is 204 No Content @@ -240,7 +240,7 @@ Feature: Service Accounts Scenario: Revoke an access token for a service account returns "Not Found" response Given new "RevokeServiceAccountAccessToken" request And request contains "service_account_id" parameter from "REPLACE.ME" - And request contains "pat_uuid" parameter from "REPLACE.ME" + And request contains "pat_id" parameter from "REPLACE.ME" When the request is sent Then the response status is 404 Not Found @@ -248,7 +248,7 @@ Feature: Service Accounts Scenario: Update an access token for a service account returns "Bad Request" response Given new "UpdateServiceAccountAccessToken" request And request contains "service_account_id" parameter from "REPLACE.ME" - And request contains "pat_uuid" parameter from "REPLACE.ME" + 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 Then the response status is 400 Bad Request @@ -257,7 +257,7 @@ Feature: Service Accounts Scenario: Update an access token for a service account returns "Not Found" response Given new "UpdateServiceAccountAccessToken" request And request contains "service_account_id" parameter from "REPLACE.ME" - And request contains "pat_uuid" parameter from "REPLACE.ME" + 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 Then the response status is 404 Not Found @@ -268,7 +268,7 @@ Feature: Service Accounts And there is a valid "service_account_access_token" for "service_account_user" And new "UpdateServiceAccountAccessToken" request And request contains "service_account_id" parameter from "service_account_user.data.id" - And request contains "pat_uuid" parameter from "service_account_access_token.data.id" + And request contains "pat_id" parameter from "service_account_access_token.data.id" And body with value {"data": {"id": "{{ service_account_access_token.data.id }}", "type": "personal_access_tokens", "attributes": {"name": "{{ service_account_access_token.data.attributes.name }}-updated"}}} 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 25b2d6b0df..061beded33 100644 --- a/tests/v2/features/undo.json +++ b/tests/v2/features/undo.json @@ -4324,7 +4324,7 @@ "operationId": "RevokePersonalAccessToken", "parameters": [ { - "name": "pat_uuid", + "name": "pat_id", "source": "data.id" } ], @@ -5889,7 +5889,7 @@ "source": "data.relationships.owned_by.data.id" }, { - "name": "pat_uuid", + "name": "pat_id", "source": "data.id" } ],