diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 4980e3a1bd22..f96101139510 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/cassettes/features/v2/service_accounts/Create-an-access-token-for-a-service-account-returns-Created-response.frozen b/cassettes/features/v2/service_accounts/Create-an-access-token-for-a-service-account-returns-Created-response.frozen index b457d0ec92cf..7ccf87f4bd58 100644 --- a/cassettes/features/v2/service_accounts/Create-an-access-token-for-a-service-account-returns-Created-response.frozen +++ b/cassettes/features/v2/service_accounts/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/cassettes/features/v2/service_accounts/Create-an-access-token-for-a-service-account-returns-Created-response.yml b/cassettes/features/v2/service_accounts/Create-an-access-token-for-a-service-account-returns-Created-response.yml index 2964b70349fb..b7dbeb9a60d3 100644 --- a/cassettes/features/v2/service_accounts/Create-an-access-token-for-a-service-account-returns-Created-response.yml +++ b/cassettes/features/v2/service_accounts/Create-an-access-token-for-a-service-account-returns-Created-response.yml @@ -1,9 +1,9 @@ http_interactions: -- recorded_at: Fri, 03 Apr 2026 21:02:56 GMT +- recorded_at: Thu, 16 Apr 2026 20:03:06 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"email":"Test-Create_an_access_token_for_a_service_account_returns_Created_response-1775250176@datadoghq.com","service_account":true,"title":"user + string: '{"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: @@ -15,7 +15,7 @@ http_interactions: response: body: encoding: UTF-8 - 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"}}}}} ' @@ -25,36 +25,36 @@ http_interactions: status: code: 201 message: Created -- recorded_at: Fri, 03 Apr 2026 21:02:56 GMT +- recorded_at: Thu, 16 Apr 2026 20:03:06 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"name":"Test-Create_an_access_token_for_a_service_account_returns_Created_response-1775250176","scopes":["dashboards_read"]},"type":"personal_access_tokens"}}' + string: '{"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: encoding: UTF-8 - 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 status: code: 201 message: Created -- recorded_at: Fri, 03 Apr 2026 21:02:56 GMT +- recorded_at: Thu, 16 Apr 2026 20:03:06 GMT request: body: null headers: 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: encoding: UTF-8 @@ -63,14 +63,14 @@ http_interactions: status: code: 204 message: No Content -- recorded_at: Fri, 03 Apr 2026 21:02:56 GMT +- recorded_at: Thu, 16 Apr 2026 20:03:06 GMT request: body: null headers: 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: encoding: UTF-8 diff --git a/cassettes/features/v2/service_accounts/Get-an-access-token-for-a-service-account-returns-OK-response.frozen b/cassettes/features/v2/service_accounts/Get-an-access-token-for-a-service-account-returns-OK-response.frozen index 55c4828532cb..767a9f9c2502 100644 --- a/cassettes/features/v2/service_accounts/Get-an-access-token-for-a-service-account-returns-OK-response.frozen +++ b/cassettes/features/v2/service_accounts/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/cassettes/features/v2/service_accounts/Get-an-access-token-for-a-service-account-returns-OK-response.yml b/cassettes/features/v2/service_accounts/Get-an-access-token-for-a-service-account-returns-OK-response.yml index 9c7f35598c0a..df8615ef834c 100644 --- a/cassettes/features/v2/service_accounts/Get-an-access-token-for-a-service-account-returns-OK-response.yml +++ b/cassettes/features/v2/service_accounts/Get-an-access-token-for-a-service-account-returns-OK-response.yml @@ -1,9 +1,9 @@ http_interactions: -- recorded_at: Fri, 03 Apr 2026 21:03:03 GMT +- recorded_at: Thu, 16 Apr 2026 20:03:09 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"email":"Test-Get_an_access_token_for_a_service_account_returns_OK_response-1775250183@datadoghq.com","service_account":true,"title":"user + string: '{"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: @@ -15,7 +15,7 @@ http_interactions: response: body: encoding: UTF-8 - 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"}}}}} ' @@ -25,54 +25,54 @@ http_interactions: status: code: 201 message: Created -- recorded_at: Fri, 03 Apr 2026 21:03:03 GMT +- recorded_at: Thu, 16 Apr 2026 20:03:09 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"name":"Test-Get_an_access_token_for_a_service_account_returns_OK_response-1775250183","scopes":["dashboards_read"]},"type":"personal_access_tokens"}}' + string: '{"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: encoding: UTF-8 - 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 status: code: 201 message: Created -- recorded_at: Fri, 03 Apr 2026 21:03:03 GMT +- recorded_at: Thu, 16 Apr 2026 20:03:09 GMT request: body: null headers: 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: encoding: UTF-8 - 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 status: code: 200 message: OK -- recorded_at: Fri, 03 Apr 2026 21:03:03 GMT +- recorded_at: Thu, 16 Apr 2026 20:03:09 GMT request: body: null headers: 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: encoding: UTF-8 @@ -81,14 +81,14 @@ http_interactions: status: code: 204 message: No Content -- recorded_at: Fri, 03 Apr 2026 21:03:03 GMT +- recorded_at: Thu, 16 Apr 2026 20:03:09 GMT request: body: null headers: 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: encoding: UTF-8 diff --git a/cassettes/features/v2/service_accounts/List-access-tokens-for-a-service-account-returns-OK-response.frozen b/cassettes/features/v2/service_accounts/List-access-tokens-for-a-service-account-returns-OK-response.frozen index 6234af8a3e4b..db15643c3b71 100644 --- a/cassettes/features/v2/service_accounts/List-access-tokens-for-a-service-account-returns-OK-response.frozen +++ b/cassettes/features/v2/service_accounts/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/cassettes/features/v2/service_accounts/List-access-tokens-for-a-service-account-returns-OK-response.yml b/cassettes/features/v2/service_accounts/List-access-tokens-for-a-service-account-returns-OK-response.yml index 2ffc4b46ca58..e72127e401aa 100644 --- a/cassettes/features/v2/service_accounts/List-access-tokens-for-a-service-account-returns-OK-response.yml +++ b/cassettes/features/v2/service_accounts/List-access-tokens-for-a-service-account-returns-OK-response.yml @@ -1,9 +1,9 @@ http_interactions: -- recorded_at: Fri, 03 Apr 2026 21:03:09 GMT +- recorded_at: Thu, 16 Apr 2026 20:03:10 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"email":"Test-List_access_tokens_for_a_service_account_returns_OK_response-1775250189@datadoghq.com","service_account":true,"title":"user + string: '{"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: @@ -15,22 +15,24 @@ http_interactions: response: body: encoding: UTF-8 - 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 status: code: 201 message: Created -- recorded_at: Fri, 03 Apr 2026 21:03:09 GMT +- recorded_at: Thu, 16 Apr 2026 20:03:10 GMT request: body: null headers: 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: encoding: UTF-8 @@ -41,14 +43,14 @@ http_interactions: status: code: 200 message: OK -- recorded_at: Fri, 03 Apr 2026 21:03:09 GMT +- recorded_at: Thu, 16 Apr 2026 20:03:10 GMT request: body: null headers: 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: encoding: UTF-8 diff --git a/cassettes/features/v2/service_accounts/Revoke-an-access-token-for-a-service-account-returns-No-Content-response.frozen b/cassettes/features/v2/service_accounts/Revoke-an-access-token-for-a-service-account-returns-No-Content-response.frozen index fa38ba91a95f..4a8602fd9133 100644 --- a/cassettes/features/v2/service_accounts/Revoke-an-access-token-for-a-service-account-returns-No-Content-response.frozen +++ b/cassettes/features/v2/service_accounts/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/cassettes/features/v2/service_accounts/Revoke-an-access-token-for-a-service-account-returns-No-Content-response.yml b/cassettes/features/v2/service_accounts/Revoke-an-access-token-for-a-service-account-returns-No-Content-response.yml index 09cd39263394..f0f819471571 100644 --- a/cassettes/features/v2/service_accounts/Revoke-an-access-token-for-a-service-account-returns-No-Content-response.yml +++ b/cassettes/features/v2/service_accounts/Revoke-an-access-token-for-a-service-account-returns-No-Content-response.yml @@ -1,9 +1,9 @@ http_interactions: -- recorded_at: Fri, 03 Apr 2026 21:03:10 GMT +- recorded_at: Thu, 16 Apr 2026 20:03:12 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"email":"Test-Revoke_an_access_token_for_a_service_account_returns_No_Content_response-1775250190@datadoghq.com","service_account":true,"title":"user + string: '{"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: @@ -15,7 +15,7 @@ http_interactions: response: body: encoding: UTF-8 - 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"}}}}} ' @@ -25,36 +25,36 @@ http_interactions: status: code: 201 message: Created -- recorded_at: Fri, 03 Apr 2026 21:03:10 GMT +- recorded_at: Thu, 16 Apr 2026 20:03:12 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"name":"Test-Revoke_an_access_token_for_a_service_account_returns_No_Content_response-1775250190","scopes":["dashboards_read"]},"type":"personal_access_tokens"}}' + string: '{"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: encoding: UTF-8 - 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 status: code: 201 message: Created -- recorded_at: Fri, 03 Apr 2026 21:03:10 GMT +- recorded_at: Thu, 16 Apr 2026 20:03:12 GMT request: body: null headers: 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: encoding: UTF-8 @@ -63,14 +63,14 @@ http_interactions: status: code: 204 message: No Content -- recorded_at: Fri, 03 Apr 2026 21:03:10 GMT +- recorded_at: Thu, 16 Apr 2026 20:03:12 GMT request: body: null headers: 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: encoding: UTF-8 @@ -79,14 +79,14 @@ http_interactions: status: code: 204 message: No Content -- recorded_at: Fri, 03 Apr 2026 21:03:10 GMT +- recorded_at: Thu, 16 Apr 2026 20:03:12 GMT request: body: null headers: 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: encoding: UTF-8 diff --git a/cassettes/features/v2/service_accounts/Update-an-access-token-for-a-service-account-returns-OK-response.frozen b/cassettes/features/v2/service_accounts/Update-an-access-token-for-a-service-account-returns-OK-response.frozen index 6a894d59da19..58278ff6c0fe 100644 --- a/cassettes/features/v2/service_accounts/Update-an-access-token-for-a-service-account-returns-OK-response.frozen +++ b/cassettes/features/v2/service_accounts/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/cassettes/features/v2/service_accounts/Update-an-access-token-for-a-service-account-returns-OK-response.yml b/cassettes/features/v2/service_accounts/Update-an-access-token-for-a-service-account-returns-OK-response.yml index 95f7be33a040..55be92bbc34a 100644 --- a/cassettes/features/v2/service_accounts/Update-an-access-token-for-a-service-account-returns-OK-response.yml +++ b/cassettes/features/v2/service_accounts/Update-an-access-token-for-a-service-account-returns-OK-response.yml @@ -1,9 +1,9 @@ http_interactions: -- recorded_at: Fri, 03 Apr 2026 21:03:12 GMT +- recorded_at: Thu, 16 Apr 2026 20:03:14 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"email":"Test-Update_an_access_token_for_a_service_account_returns_OK_response-1775250192@datadoghq.com","service_account":true,"title":"user + string: '{"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: @@ -15,7 +15,7 @@ http_interactions: response: body: encoding: UTF-8 - 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"}}}}} ' @@ -25,58 +25,58 @@ http_interactions: status: code: 201 message: Created -- recorded_at: Fri, 03 Apr 2026 21:03:12 GMT +- recorded_at: Thu, 16 Apr 2026 20:03:14 GMT request: body: encoding: UTF-8 - string: '{"data":{"attributes":{"name":"Test-Update_an_access_token_for_a_service_account_returns_OK_response-1775250192","scopes":["dashboards_read"]},"type":"personal_access_tokens"}}' + string: '{"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: encoding: UTF-8 - 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 status: code: 201 message: Created -- recorded_at: Fri, 03 Apr 2026 21:03:12 GMT +- recorded_at: Thu, 16 Apr 2026 20:03:14 GMT request: body: encoding: UTF-8 - string: '{"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"}}' + string: '{"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: encoding: UTF-8 - 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 status: code: 200 message: OK -- recorded_at: Fri, 03 Apr 2026 21:03:12 GMT +- recorded_at: Thu, 16 Apr 2026 20:03:14 GMT request: body: null headers: 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: encoding: UTF-8 @@ -85,14 +85,14 @@ http_interactions: status: code: 204 message: No Content -- recorded_at: Fri, 03 Apr 2026 21:03:12 GMT +- recorded_at: Thu, 16 Apr 2026 20:03:14 GMT request: body: null headers: 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: encoding: UTF-8 diff --git a/features/scenarios_model_mapping.rb b/features/scenarios_model_mapping.rb index 9377a1ddda2b..e37cde9fc447 100644 --- a/features/scenarios_model_mapping.rb +++ b/features/scenarios_model_mapping.rb @@ -1247,13 +1247,13 @@ "body" => "PersonalAccessTokenCreateRequest", }, "v2.RevokePersonalAccessToken" => { - "pat_uuid" => "String", + "pat_id" => "String", }, "v2.GetPersonalAccessToken" => { - "pat_uuid" => "String", + "pat_id" => "String", }, "v2.UpdatePersonalAccessToken" => { - "pat_uuid" => "String", + "pat_id" => "String", "body" => "PersonalAccessTokenUpdateRequest", }, "v2.ListAPIs" => { @@ -4026,15 +4026,15 @@ }, "v2.RevokeServiceAccountAccessToken" => { "service_account_id" => "String", - "pat_uuid" => "String", + "pat_id" => "String", }, "v2.GetServiceAccountAccessToken" => { "service_account_id" => "String", - "pat_uuid" => "String", + "pat_id" => "String", }, "v2.UpdateServiceAccountAccessToken" => { "service_account_id" => "String", - "pat_uuid" => "String", + "pat_id" => "String", "body" => "PersonalAccessTokenUpdateRequest", }, "v2.ListServiceAccountApplicationKeys" => { diff --git a/features/v2/key_management.feature b/features/v2/key_management.feature index 6c4648455625..365c53ed7c27 100644 --- a/features/v2/key_management.feature +++ b/features/v2/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/features/v2/service_accounts.feature b/features/v2/service_accounts.feature index 25744abc832d..fa8c81440e26 100644 --- a/features/v2/service_accounts.feature +++ b/features/v2/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/features/v2/undo.json b/features/v2/undo.json index 25b2d6b0df15..061beded3311 100644 --- a/features/v2/undo.json +++ b/features/v2/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" } ], diff --git a/lib/datadog_api_client/v2/api/key_management_api.rb b/lib/datadog_api_client/v2/api/key_management_api.rb index 8a6d256738c4..a27d81dbfd96 100644 --- a/lib/datadog_api_client/v2/api/key_management_api.rb +++ b/lib/datadog_api_client/v2/api/key_management_api.rb @@ -622,8 +622,8 @@ def get_current_user_application_key_with_http_info(app_key_id, opts = {}) # Get a personal access token. # # @see #get_personal_access_token_with_http_info - def get_personal_access_token(pat_uuid, opts = {}) - data, _status_code, _headers = get_personal_access_token_with_http_info(pat_uuid, opts) + def get_personal_access_token(pat_id, opts = {}) + data, _status_code, _headers = get_personal_access_token_with_http_info(pat_id, opts) data end @@ -631,20 +631,20 @@ def get_personal_access_token(pat_uuid, opts = {}) # # Get a specific personal access token by its UUID. # - # @param pat_uuid [String] The UUID of the personal access token. + # @param pat_id [String] The ID of the personal access token. # @param opts [Hash] the optional parameters # @return [Array<(PersonalAccessTokenResponse, Integer, Hash)>] PersonalAccessTokenResponse data, response status code and response headers - def get_personal_access_token_with_http_info(pat_uuid, opts = {}) + def get_personal_access_token_with_http_info(pat_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: KeyManagementAPI.get_personal_access_token ...' end - # verify the required parameter 'pat_uuid' is set - if @api_client.config.client_side_validation && pat_uuid.nil? - fail ArgumentError, "Missing the required parameter 'pat_uuid' when calling KeyManagementAPI.get_personal_access_token" + # verify the required parameter 'pat_id' is set + if @api_client.config.client_side_validation && pat_id.nil? + fail ArgumentError, "Missing the required parameter 'pat_id' when calling KeyManagementAPI.get_personal_access_token" end # resource path - local_var_path = '/api/v2/personal_access_tokens/{pat_uuid}'.sub('{pat_uuid}', CGI.escape(pat_uuid.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/personal_access_tokens/{pat_id}'.sub('{pat_id}', CGI.escape(pat_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -1004,8 +1004,8 @@ def list_personal_access_tokens_with_http_info(opts = {}) # Revoke a personal access token. # # @see #revoke_personal_access_token_with_http_info - def revoke_personal_access_token(pat_uuid, opts = {}) - revoke_personal_access_token_with_http_info(pat_uuid, opts) + def revoke_personal_access_token(pat_id, opts = {}) + revoke_personal_access_token_with_http_info(pat_id, opts) nil end @@ -1013,20 +1013,20 @@ def revoke_personal_access_token(pat_uuid, opts = {}) # # Revoke a specific personal access token. # - # @param pat_uuid [String] The UUID of the personal access token. + # @param pat_id [String] The ID of the personal access token. # @param opts [Hash] the optional parameters # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def revoke_personal_access_token_with_http_info(pat_uuid, opts = {}) + def revoke_personal_access_token_with_http_info(pat_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: KeyManagementAPI.revoke_personal_access_token ...' end - # verify the required parameter 'pat_uuid' is set - if @api_client.config.client_side_validation && pat_uuid.nil? - fail ArgumentError, "Missing the required parameter 'pat_uuid' when calling KeyManagementAPI.revoke_personal_access_token" + # verify the required parameter 'pat_id' is set + if @api_client.config.client_side_validation && pat_id.nil? + fail ArgumentError, "Missing the required parameter 'pat_id' when calling KeyManagementAPI.revoke_personal_access_token" end # resource path - local_var_path = '/api/v2/personal_access_tokens/{pat_uuid}'.sub('{pat_uuid}', CGI.escape(pat_uuid.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/personal_access_tokens/{pat_id}'.sub('{pat_id}', CGI.escape(pat_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -1286,8 +1286,8 @@ def update_current_user_application_key_with_http_info(app_key_id, body, opts = # Update a personal access token. # # @see #update_personal_access_token_with_http_info - def update_personal_access_token(pat_uuid, body, opts = {}) - data, _status_code, _headers = update_personal_access_token_with_http_info(pat_uuid, body, opts) + def update_personal_access_token(pat_id, body, opts = {}) + data, _status_code, _headers = update_personal_access_token_with_http_info(pat_id, body, opts) data end @@ -1295,25 +1295,25 @@ def update_personal_access_token(pat_uuid, body, opts = {}) # # Update a specific personal access token. # - # @param pat_uuid [String] The UUID of the personal access token. + # @param pat_id [String] The ID of the personal access token. # @param body [PersonalAccessTokenUpdateRequest] # @param opts [Hash] the optional parameters # @return [Array<(PersonalAccessTokenResponse, Integer, Hash)>] PersonalAccessTokenResponse data, response status code and response headers - def update_personal_access_token_with_http_info(pat_uuid, body, opts = {}) + def update_personal_access_token_with_http_info(pat_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: KeyManagementAPI.update_personal_access_token ...' end - # verify the required parameter 'pat_uuid' is set - if @api_client.config.client_side_validation && pat_uuid.nil? - fail ArgumentError, "Missing the required parameter 'pat_uuid' when calling KeyManagementAPI.update_personal_access_token" + # verify the required parameter 'pat_id' is set + if @api_client.config.client_side_validation && pat_id.nil? + fail ArgumentError, "Missing the required parameter 'pat_id' when calling KeyManagementAPI.update_personal_access_token" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling KeyManagementAPI.update_personal_access_token" end # resource path - local_var_path = '/api/v2/personal_access_tokens/{pat_uuid}'.sub('{pat_uuid}', CGI.escape(pat_uuid.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/personal_access_tokens/{pat_id}'.sub('{pat_id}', CGI.escape(pat_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} diff --git a/lib/datadog_api_client/v2/api/service_accounts_api.rb b/lib/datadog_api_client/v2/api/service_accounts_api.rb index b4f6aa2afaea..ef823b7d407f 100644 --- a/lib/datadog_api_client/v2/api/service_accounts_api.rb +++ b/lib/datadog_api_client/v2/api/service_accounts_api.rb @@ -307,8 +307,8 @@ def delete_service_account_application_key_with_http_info(service_account_id, ap # Get an access token for a service account. # # @see #get_service_account_access_token_with_http_info - def get_service_account_access_token(service_account_id, pat_uuid, opts = {}) - data, _status_code, _headers = get_service_account_access_token_with_http_info(service_account_id, pat_uuid, opts) + def get_service_account_access_token(service_account_id, pat_id, opts = {}) + data, _status_code, _headers = get_service_account_access_token_with_http_info(service_account_id, pat_id, opts) data end @@ -317,10 +317,10 @@ def get_service_account_access_token(service_account_id, pat_uuid, opts = {}) # Get a specific access token for a service account by its UUID. # # @param service_account_id [String] The ID of the service account. - # @param pat_uuid [String] The UUID of the personal access token. + # @param pat_id [String] The ID of the personal access token. # @param opts [Hash] the optional parameters # @return [Array<(PersonalAccessTokenResponse, Integer, Hash)>] PersonalAccessTokenResponse data, response status code and response headers - def get_service_account_access_token_with_http_info(service_account_id, pat_uuid, opts = {}) + def get_service_account_access_token_with_http_info(service_account_id, pat_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ServiceAccountsAPI.get_service_account_access_token ...' @@ -329,12 +329,12 @@ def get_service_account_access_token_with_http_info(service_account_id, pat_uuid if @api_client.config.client_side_validation && service_account_id.nil? fail ArgumentError, "Missing the required parameter 'service_account_id' when calling ServiceAccountsAPI.get_service_account_access_token" end - # verify the required parameter 'pat_uuid' is set - if @api_client.config.client_side_validation && pat_uuid.nil? - fail ArgumentError, "Missing the required parameter 'pat_uuid' when calling ServiceAccountsAPI.get_service_account_access_token" + # verify the required parameter 'pat_id' is set + if @api_client.config.client_side_validation && pat_id.nil? + fail ArgumentError, "Missing the required parameter 'pat_id' when calling ServiceAccountsAPI.get_service_account_access_token" end # resource path - local_var_path = '/api/v2/service_accounts/{service_account_id}/access_tokens/{pat_uuid}'.sub('{service_account_id}', CGI.escape(service_account_id.to_s).gsub('%2F', '/')).sub('{pat_uuid}', CGI.escape(pat_uuid.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/service_accounts/{service_account_id}/access_tokens/{pat_id}'.sub('{service_account_id}', CGI.escape(service_account_id.to_s).gsub('%2F', '/')).sub('{pat_id}', CGI.escape(pat_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -605,8 +605,8 @@ def list_service_account_application_keys_with_http_info(service_account_id, opt # Revoke an access token for a service account. # # @see #revoke_service_account_access_token_with_http_info - def revoke_service_account_access_token(service_account_id, pat_uuid, opts = {}) - revoke_service_account_access_token_with_http_info(service_account_id, pat_uuid, opts) + def revoke_service_account_access_token(service_account_id, pat_id, opts = {}) + revoke_service_account_access_token_with_http_info(service_account_id, pat_id, opts) nil end @@ -615,10 +615,10 @@ def revoke_service_account_access_token(service_account_id, pat_uuid, opts = {}) # Revoke a specific access token for a service account. # # @param service_account_id [String] The ID of the service account. - # @param pat_uuid [String] The UUID of the personal access token. + # @param pat_id [String] The ID of the personal access token. # @param opts [Hash] the optional parameters # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers - def revoke_service_account_access_token_with_http_info(service_account_id, pat_uuid, opts = {}) + def revoke_service_account_access_token_with_http_info(service_account_id, pat_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ServiceAccountsAPI.revoke_service_account_access_token ...' @@ -627,12 +627,12 @@ def revoke_service_account_access_token_with_http_info(service_account_id, pat_u if @api_client.config.client_side_validation && service_account_id.nil? fail ArgumentError, "Missing the required parameter 'service_account_id' when calling ServiceAccountsAPI.revoke_service_account_access_token" end - # verify the required parameter 'pat_uuid' is set - if @api_client.config.client_side_validation && pat_uuid.nil? - fail ArgumentError, "Missing the required parameter 'pat_uuid' when calling ServiceAccountsAPI.revoke_service_account_access_token" + # verify the required parameter 'pat_id' is set + if @api_client.config.client_side_validation && pat_id.nil? + fail ArgumentError, "Missing the required parameter 'pat_id' when calling ServiceAccountsAPI.revoke_service_account_access_token" end # resource path - local_var_path = '/api/v2/service_accounts/{service_account_id}/access_tokens/{pat_uuid}'.sub('{service_account_id}', CGI.escape(service_account_id.to_s).gsub('%2F', '/')).sub('{pat_uuid}', CGI.escape(pat_uuid.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/service_accounts/{service_account_id}/access_tokens/{pat_id}'.sub('{service_account_id}', CGI.escape(service_account_id.to_s).gsub('%2F', '/')).sub('{pat_id}', CGI.escape(pat_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} @@ -675,8 +675,8 @@ def revoke_service_account_access_token_with_http_info(service_account_id, pat_u # Update an access token for a service account. # # @see #update_service_account_access_token_with_http_info - def update_service_account_access_token(service_account_id, pat_uuid, body, opts = {}) - data, _status_code, _headers = update_service_account_access_token_with_http_info(service_account_id, pat_uuid, body, opts) + def update_service_account_access_token(service_account_id, pat_id, body, opts = {}) + data, _status_code, _headers = update_service_account_access_token_with_http_info(service_account_id, pat_id, body, opts) data end @@ -685,11 +685,11 @@ def update_service_account_access_token(service_account_id, pat_uuid, body, opts # Update a specific access token for a service account. # # @param service_account_id [String] The ID of the service account. - # @param pat_uuid [String] The UUID of the personal access token. + # @param pat_id [String] The ID of the personal access token. # @param body [PersonalAccessTokenUpdateRequest] # @param opts [Hash] the optional parameters # @return [Array<(PersonalAccessTokenResponse, Integer, Hash)>] PersonalAccessTokenResponse data, response status code and response headers - def update_service_account_access_token_with_http_info(service_account_id, pat_uuid, body, opts = {}) + def update_service_account_access_token_with_http_info(service_account_id, pat_id, body, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: ServiceAccountsAPI.update_service_account_access_token ...' @@ -698,16 +698,16 @@ def update_service_account_access_token_with_http_info(service_account_id, pat_u if @api_client.config.client_side_validation && service_account_id.nil? fail ArgumentError, "Missing the required parameter 'service_account_id' when calling ServiceAccountsAPI.update_service_account_access_token" end - # verify the required parameter 'pat_uuid' is set - if @api_client.config.client_side_validation && pat_uuid.nil? - fail ArgumentError, "Missing the required parameter 'pat_uuid' when calling ServiceAccountsAPI.update_service_account_access_token" + # verify the required parameter 'pat_id' is set + if @api_client.config.client_side_validation && pat_id.nil? + fail ArgumentError, "Missing the required parameter 'pat_id' when calling ServiceAccountsAPI.update_service_account_access_token" end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling ServiceAccountsAPI.update_service_account_access_token" end # resource path - local_var_path = '/api/v2/service_accounts/{service_account_id}/access_tokens/{pat_uuid}'.sub('{service_account_id}', CGI.escape(service_account_id.to_s).gsub('%2F', '/')).sub('{pat_uuid}', CGI.escape(pat_uuid.to_s).gsub('%2F', '/')) + local_var_path = '/api/v2/service_accounts/{service_account_id}/access_tokens/{pat_id}'.sub('{service_account_id}', CGI.escape(service_account_id.to_s).gsub('%2F', '/')).sub('{pat_id}', CGI.escape(pat_id.to_s).gsub('%2F', '/')) # query parameters query_params = opts[:query_params] || {} diff --git a/lib/datadog_api_client/v2/models/full_personal_access_token_attributes.rb b/lib/datadog_api_client/v2/models/full_personal_access_token_attributes.rb index 023240d058c4..6052e702996d 100644 --- a/lib/datadog_api_client/v2/models/full_personal_access_token_attributes.rb +++ b/lib/datadog_api_client/v2/models/full_personal_access_token_attributes.rb @@ -21,9 +21,6 @@ module DatadogAPIClient::V2 class FullPersonalAccessTokenAttributes include BaseGenericModel - # The alias (short identifier) of the personal access token. - attr_accessor :_alias - # Creation date of the personal access token. attr_accessor :created_at @@ -48,7 +45,6 @@ class FullPersonalAccessTokenAttributes # @!visibility private def self.attribute_map { - :'_alias' => :'alias', :'created_at' => :'created_at', :'expires_at' => :'expires_at', :'key' => :'key', @@ -62,7 +58,6 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'_alias' => :'String', :'created_at' => :'Time', :'expires_at' => :'Time', :'key' => :'String', @@ -98,10 +93,6 @@ def initialize(attributes = {}) end } - if attributes.key?(:'_alias') - self._alias = attributes[:'_alias'] - end - if attributes.key?(:'created_at') self.created_at = attributes[:'created_at'] end @@ -155,7 +146,6 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && - _alias == o._alias && created_at == o.created_at && expires_at == o.expires_at && key == o.key && @@ -169,7 +159,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [_alias, created_at, expires_at, key, name, public_portion, scopes, additional_properties].hash + [created_at, expires_at, key, name, public_portion, scopes, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/personal_access_token_attributes.rb b/lib/datadog_api_client/v2/models/personal_access_token_attributes.rb index 76dcff50d4b8..118f6c7514b8 100644 --- a/lib/datadog_api_client/v2/models/personal_access_token_attributes.rb +++ b/lib/datadog_api_client/v2/models/personal_access_token_attributes.rb @@ -21,9 +21,6 @@ module DatadogAPIClient::V2 class PersonalAccessTokenAttributes include BaseGenericModel - # The alias (short identifier) of the personal access token. - attr_accessor :_alias - # Creation date of the personal access token. attr_accessor :created_at @@ -51,7 +48,6 @@ class PersonalAccessTokenAttributes # @!visibility private def self.attribute_map { - :'_alias' => :'alias', :'created_at' => :'created_at', :'expires_at' => :'expires_at', :'last_used_at' => :'last_used_at', @@ -66,7 +62,6 @@ def self.attribute_map # @!visibility private def self.openapi_types { - :'_alias' => :'String', :'created_at' => :'Time', :'expires_at' => :'Time', :'last_used_at' => :'Time', @@ -105,10 +100,6 @@ def initialize(attributes = {}) end } - if attributes.key?(:'_alias') - self._alias = attributes[:'_alias'] - end - if attributes.key?(:'created_at') self.created_at = attributes[:'created_at'] end @@ -166,7 +157,6 @@ def to_hash def ==(o) return true if self.equal?(o) self.class == o.class && - _alias == o._alias && created_at == o.created_at && expires_at == o.expires_at && last_used_at == o.last_used_at && @@ -181,7 +171,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [_alias, created_at, expires_at, last_used_at, modified_at, name, public_portion, scopes, additional_properties].hash + [created_at, expires_at, last_used_at, modified_at, name, public_portion, scopes, additional_properties].hash end end end diff --git a/lib/datadog_api_client/v2/models/user_attributes.rb b/lib/datadog_api_client/v2/models/user_attributes.rb index a62ccc455cec..f15a2014c001 100644 --- a/lib/datadog_api_client/v2/models/user_attributes.rb +++ b/lib/datadog_api_client/v2/models/user_attributes.rb @@ -57,6 +57,9 @@ class UserAttributes # Title of the user. attr_accessor :title + # UUID of the user. + attr_accessor :uuid + # Whether the user is verified. attr_accessor :verified @@ -78,6 +81,7 @@ def self.attribute_map :'service_account' => :'service_account', :'status' => :'status', :'title' => :'title', + :'uuid' => :'uuid', :'verified' => :'verified' } end @@ -98,6 +102,7 @@ def self.openapi_types :'service_account' => :'Boolean', :'status' => :'String', :'title' => :'String', + :'uuid' => :'String', :'verified' => :'Boolean' } end @@ -178,6 +183,10 @@ def initialize(attributes = {}) self.title = attributes[:'title'] end + if attributes.key?(:'uuid') + self.uuid = attributes[:'uuid'] + end + if attributes.key?(:'verified') self.verified = attributes[:'verified'] end @@ -221,6 +230,7 @@ def ==(o) service_account == o.service_account && status == o.status && title == o.title && + uuid == o.uuid && verified == o.verified && additional_properties == o.additional_properties end @@ -229,7 +239,7 @@ def ==(o) # @return [Integer] Hash code # @!visibility private def hash - [created_at, disabled, email, handle, icon, last_login_time, mfa_enabled, modified_at, name, service_account, status, title, verified, additional_properties].hash + [created_at, disabled, email, handle, icon, last_login_time, mfa_enabled, modified_at, name, service_account, status, title, uuid, verified, additional_properties].hash end end end