Skip to content

Commit 32db19e

Browse files
api-clients-generation-pipeline[bot]ci.datadog-api-spec
andauthored
Add Teams to cleanup script and add pagination to users and roles (#1627)
Co-authored-by: ci.datadog-api-spec <[email protected]>
1 parent 95efbea commit 32db19e

File tree

56 files changed

+161
-161
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+161
-161
lines changed

.apigentools-info

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
"spec_versions": {
55
"v1": {
66
"apigentools_version": "1.6.5",
7-
"regenerated": "2023-08-22 13:14:09.498754",
8-
"spec_repo_commit": "32ed4727"
7+
"regenerated": "2023-08-22 13:54:21.951357",
8+
"spec_repo_commit": "51fe480e"
99
},
1010
"v2": {
1111
"apigentools_version": "1.6.5",
12-
"regenerated": "2023-08-22 13:14:09.511285",
13-
"spec_repo_commit": "32ed4727"
12+
"regenerated": "2023-08-22 13:54:21.967291",
13+
"spec_repo_commit": "51fe480e"
1414
}
1515
}
1616
}

examples/v2/teams/CreateTeam.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
body = TeamCreateRequest(
1515
data=TeamCreate(
1616
attributes=TeamCreateAttributes(
17-
handle="handle-a0fc0297eb519635",
18-
name="name-a0fc0297eb519635",
17+
handle="test-handle-a0fc0297eb519635",
18+
name="test-name-a0fc0297eb519635",
1919
),
2020
relationships=TeamCreateRelationships(
2121
users=RelationshipToUsers(

examples/v2/teams/CreateTeam_252121814.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
body = TeamCreateRequest(
1313
data=TeamCreate(
1414
attributes=TeamCreateAttributes(
15-
handle="handle-a0fc0297eb519635",
16-
name="name-a0fc0297eb519635",
15+
handle="test-handle-a0fc0297eb519635",
16+
name="test-name-a0fc0297eb519635",
1717
avatar="🥑",
1818
banner=7,
1919
visible_modules=[
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2023-07-12T17:29:26.749Z
1+
2023-08-21T19:44:42.989Z

tests/v2/cassettes/test_scenarios/test_create_a_team_link_returns_api_error_response_response.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
interactions:
22
- request:
3-
body: '{"data":{"attributes":{"handle":"handle-93860ab913118caf","name":"name-93860ab913118caf"},"type":"team"}}'
3+
body: '{"data":{"attributes":{"handle":"test-handle-d92d2e08806acc4e","name":"test-name-d92d2e08806acc4e"},"type":"team"}}'
44
headers:
55
accept:
66
- application/json
@@ -10,7 +10,7 @@ interactions:
1010
uri: https://api.datadoghq.com/api/v2/team
1111
response:
1212
body:
13-
string: '{"data":{"type":"team","id":"a68b555c-20d9-11ee-8739-da7ad0900002","attributes":{"name":"name-93860ab913118caf","handle":"handle-93860ab913118caf","summary":null,"description":null,"created_at":"2023-07-12T17:29:26.918845+00:00","modified_at":"2023-07-12T17:29:26.918850+00:00","user_count":0,"link_count":0},"relationships":{"team_links":{"links":{"related":"/api/v2/team/a68b555c-20d9-11ee-8739-da7ad0900002/links"}},"user_team_permissions":{"links":{"related":"/api/v2/team/a68b555c-20d9-11ee-8739-da7ad0900002/permission-settings"}}}}}
13+
string: '{"data":{"type":"team","id":"2cb8bb60-405b-11ee-8a69-da7ad0900002","attributes":{"name":"test-name-d92d2e08806acc4e","handle":"test-handle-d92d2e08806acc4e","summary":null,"description":null,"avatar":null,"banner":null,"visible_modules":[],"hidden_modules":[],"created_at":"2023-08-21T19:44:43.155798+00:00","modified_at":"2023-08-21T19:44:43.155804+00:00","user_count":0,"link_count":0},"relationships":{"team_links":{"links":{"related":"/api/v2/team/2cb8bb60-405b-11ee-8a69-da7ad0900002/links"}},"user_team_permissions":{"links":{"related":"/api/v2/team/2cb8bb60-405b-11ee-8a69-da7ad0900002/permission-settings"}}}}}
1414
1515
'
1616
headers:
@@ -27,7 +27,7 @@ interactions:
2727
content-type:
2828
- application/json
2929
method: POST
30-
uri: https://api.datadoghq.com/api/v2/team/a68b555c-20d9-11ee-8739-da7ad0900002/links
30+
uri: https://api.datadoghq.com/api/v2/team/2cb8bb60-405b-11ee-8a69-da7ad0900002/links
3131
response:
3232
body:
3333
string: '{"errors":["label cannot be empty"]}'
@@ -43,7 +43,7 @@ interactions:
4343
accept:
4444
- '*/*'
4545
method: DELETE
46-
uri: https://api.datadoghq.com/api/v2/team/a68b555c-20d9-11ee-8739-da7ad0900002
46+
uri: https://api.datadoghq.com/api/v2/team/2cb8bb60-405b-11ee-8a69-da7ad0900002
4747
response:
4848
body:
4949
string: ''
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2023-07-12T17:29:27.327Z
1+
2023-08-21T19:44:43.622Z

tests/v2/cassettes/test_scenarios/test_create_a_team_link_returns_ok_response.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
interactions:
22
- request:
3-
body: '{"data":{"attributes":{"handle":"handle-80cbaea63059dc94","name":"name-80cbaea63059dc94"},"type":"team"}}'
3+
body: '{"data":{"attributes":{"handle":"test-handle-95c34d7fe6d963ff","name":"test-name-95c34d7fe6d963ff"},"type":"team"}}'
44
headers:
55
accept:
66
- application/json
@@ -10,7 +10,7 @@ interactions:
1010
uri: https://api.datadoghq.com/api/v2/team
1111
response:
1212
body:
13-
string: '{"data":{"type":"team","id":"a6db485a-20d9-11ee-ad41-da7ad0900002","attributes":{"name":"name-80cbaea63059dc94","handle":"handle-80cbaea63059dc94","summary":null,"description":null,"created_at":"2023-07-12T17:29:27.442364+00:00","modified_at":"2023-07-12T17:29:27.442369+00:00","user_count":0,"link_count":0},"relationships":{"team_links":{"links":{"related":"/api/v2/team/a6db485a-20d9-11ee-ad41-da7ad0900002/links"}},"user_team_permissions":{"links":{"related":"/api/v2/team/a6db485a-20d9-11ee-ad41-da7ad0900002/permission-settings"}}}}}
13+
string: '{"data":{"type":"team","id":"2d0e6d4e-405b-11ee-84bc-da7ad0900002","attributes":{"name":"test-name-95c34d7fe6d963ff","handle":"test-handle-95c34d7fe6d963ff","summary":null,"description":null,"avatar":null,"banner":null,"visible_modules":[],"hidden_modules":[],"created_at":"2023-08-21T19:44:43.718259+00:00","modified_at":"2023-08-21T19:44:43.718264+00:00","user_count":0,"link_count":0},"relationships":{"team_links":{"links":{"related":"/api/v2/team/2d0e6d4e-405b-11ee-84bc-da7ad0900002/links"}},"user_team_permissions":{"links":{"related":"/api/v2/team/2d0e6d4e-405b-11ee-84bc-da7ad0900002/permission-settings"}}}}}
1414
1515
'
1616
headers:
@@ -27,10 +27,10 @@ interactions:
2727
content-type:
2828
- application/json
2929
method: POST
30-
uri: https://api.datadoghq.com/api/v2/team/a6db485a-20d9-11ee-ad41-da7ad0900002/links
30+
uri: https://api.datadoghq.com/api/v2/team/2d0e6d4e-405b-11ee-84bc-da7ad0900002/links
3131
response:
3232
body:
33-
string: '{"data":{"type":"team_links","id":"a6f9e918-20d9-11ee-b537-da7ad0900002","attributes":{"team_id":"a6db485a-20d9-11ee-ad41-da7ad0900002","label":"Link
33+
string: '{"data":{"type":"team_links","id":"2d348dee-405b-11ee-b5db-da7ad0900002","attributes":{"team_id":"2d0e6d4e-405b-11ee-84bc-da7ad0900002","label":"Link
3434
label","url":"https://example.com","position":0}}}
3535
3636
'
@@ -46,7 +46,7 @@ interactions:
4646
accept:
4747
- '*/*'
4848
method: DELETE
49-
uri: https://api.datadoghq.com/api/v2/team/a6db485a-20d9-11ee-ad41-da7ad0900002/links/a6f9e918-20d9-11ee-b537-da7ad0900002
49+
uri: https://api.datadoghq.com/api/v2/team/2d0e6d4e-405b-11ee-84bc-da7ad0900002/links/2d348dee-405b-11ee-b5db-da7ad0900002
5050
response:
5151
body:
5252
string: ''
@@ -60,7 +60,7 @@ interactions:
6060
accept:
6161
- '*/*'
6262
method: DELETE
63-
uri: https://api.datadoghq.com/api/v2/team/a6db485a-20d9-11ee-ad41-da7ad0900002
63+
uri: https://api.datadoghq.com/api/v2/team/2d0e6d4e-405b-11ee-84bc-da7ad0900002
6464
response:
6565
body:
6666
string: ''
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2023-07-12T17:29:28.021Z
1+
2023-08-21T19:44:44.449Z

tests/v2/cassettes/test_scenarios/test_create_a_team_returns_api_error_response_response.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
interactions:
22
- request:
3-
body: '{"data":{"attributes":{"handle":"handle-c12045e3c85ab6fe","name":"name-c12045e3c85ab6fe"},"type":"team"}}'
3+
body: '{"data":{"attributes":{"handle":"test-handle-b98be6aba3b71089","name":"test-name-b98be6aba3b71089"},"type":"team"}}'
44
headers:
55
accept:
66
- application/json
@@ -10,7 +10,7 @@ interactions:
1010
uri: https://api.datadoghq.com/api/v2/team
1111
response:
1212
body:
13-
string: '{"data":{"type":"team","id":"a74521bc-20d9-11ee-be22-da7ad0900002","attributes":{"name":"name-c12045e3c85ab6fe","handle":"handle-c12045e3c85ab6fe","summary":null,"description":null,"created_at":"2023-07-12T17:29:28.136431+00:00","modified_at":"2023-07-12T17:29:28.136436+00:00","user_count":0,"link_count":0},"relationships":{"team_links":{"links":{"related":"/api/v2/team/a74521bc-20d9-11ee-be22-da7ad0900002/links"}},"user_team_permissions":{"links":{"related":"/api/v2/team/a74521bc-20d9-11ee-be22-da7ad0900002/permission-settings"}}}}}
13+
string: '{"data":{"type":"team","id":"2d8e0130-405b-11ee-869d-da7ad0900002","attributes":{"name":"test-name-b98be6aba3b71089","handle":"test-handle-b98be6aba3b71089","summary":null,"description":null,"avatar":null,"banner":null,"visible_modules":[],"hidden_modules":[],"created_at":"2023-08-21T19:44:44.553464+00:00","modified_at":"2023-08-21T19:44:44.553470+00:00","user_count":0,"link_count":0},"relationships":{"team_links":{"links":{"related":"/api/v2/team/2d8e0130-405b-11ee-869d-da7ad0900002/links"}},"user_team_permissions":{"links":{"related":"/api/v2/team/2d8e0130-405b-11ee-869d-da7ad0900002/permission-settings"}}}}}
1414
1515
'
1616
headers:
@@ -20,7 +20,7 @@ interactions:
2020
code: 201
2121
message: Created
2222
- request:
23-
body: '{"data":{"attributes":{"handle":"handle-c12045e3c85ab6fe","name":"Example
23+
body: '{"data":{"attributes":{"handle":"test-handle-b98be6aba3b71089","name":"Example
2424
Team"},"relationships":{"users":{"data":[]}},"type":"team"}}'
2525
headers:
2626
accept:
@@ -44,7 +44,7 @@ interactions:
4444
accept:
4545
- '*/*'
4646
method: DELETE
47-
uri: https://api.datadoghq.com/api/v2/team/a74521bc-20d9-11ee-be22-da7ad0900002
47+
uri: https://api.datadoghq.com/api/v2/team/2d8e0130-405b-11ee-869d-da7ad0900002
4848
response:
4949
body:
5050
string: ''
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2023-07-12T17:29:28.500Z
1+
2023-08-21T19:54:32.226Z

tests/v2/cassettes/test_scenarios/test_create_a_team_returns_created_response.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
interactions:
22
- request:
3-
body: '{"data":{"attributes":{"handle":"handle-6ef0c1dbdd77a3cd","name":"name-6ef0c1dbdd77a3cd"},"relationships":{"users":{"data":[]}},"type":"team"}}'
3+
body: '{"data":{"attributes":{"handle":"test-handle-ef7e0a86ff5c0e43","name":"test-name-ef7e0a86ff5c0e43"},"relationships":{"users":{"data":[]}},"type":"team"}}'
44
headers:
55
accept:
66
- application/json
@@ -10,7 +10,7 @@ interactions:
1010
uri: https://api.datadoghq.com/api/v2/team
1111
response:
1212
body:
13-
string: '{"data":{"type":"team","id":"a78f35ae-20d9-11ee-b635-da7ad0900002","attributes":{"name":"name-6ef0c1dbdd77a3cd","handle":"handle-6ef0c1dbdd77a3cd","summary":null,"description":null,"created_at":"2023-07-12T17:29:28.621958+00:00","modified_at":"2023-07-12T17:29:28.621964+00:00","user_count":0,"link_count":0},"relationships":{"team_links":{"links":{"related":"/api/v2/team/a78f35ae-20d9-11ee-b635-da7ad0900002/links"}},"user_team_permissions":{"links":{"related":"/api/v2/team/a78f35ae-20d9-11ee-b635-da7ad0900002/permission-settings"}}}}}
13+
string: '{"data":{"type":"team","id":"8be92a56-405c-11ee-8f72-da7ad0900002","attributes":{"name":"test-name-ef7e0a86ff5c0e43","handle":"test-handle-ef7e0a86ff5c0e43","summary":null,"description":null,"avatar":null,"banner":null,"visible_modules":[],"hidden_modules":[],"created_at":"2023-08-21T19:54:32.354249+00:00","modified_at":"2023-08-21T19:54:32.354257+00:00","user_count":0,"link_count":0},"relationships":{"team_links":{"links":{"related":"/api/v2/team/8be92a56-405c-11ee-8f72-da7ad0900002/links"}},"user_team_permissions":{"links":{"related":"/api/v2/team/8be92a56-405c-11ee-8f72-da7ad0900002/permission-settings"}}}}}
1414
1515
'
1616
headers:
@@ -25,7 +25,7 @@ interactions:
2525
accept:
2626
- '*/*'
2727
method: DELETE
28-
uri: https://api.datadoghq.com/api/v2/team/a78f35ae-20d9-11ee-b635-da7ad0900002
28+
uri: https://api.datadoghq.com/api/v2/team/8be92a56-405c-11ee-8f72-da7ad0900002
2929
response:
3030
body:
3131
string: ''
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2023-08-18T22:21:29.944Z
1+
2023-08-21T19:57:41.364Z

tests/v2/cassettes/test_scenarios/test_create_a_team_with_v2_fields_returns_created_response.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
interactions:
22
- request:
33
body: "{\"data\":{\"attributes\":{\"avatar\":\"\U0001F951\",\"banner\":7,\"handle\"\
4-
:\"handle-29fddb97704028c4\",\"hidden_modules\":[\"m3\"],\"name\":\"name-29fddb97704028c4\"\
4+
:\"test-handle-d8e2060f755d882d\",\"hidden_modules\":[\"m3\"],\"name\":\"test-name-d8e2060f755d882d\"\
55
,\"visible_modules\":[\"m1\",\"m2\"]},\"type\":\"team\"}}"
66
headers:
77
accept:
@@ -12,7 +12,7 @@ interactions:
1212
uri: https://api.datadoghq.com/api/v2/team
1313
response:
1414
body:
15-
string: '{"data":{"type":"team","id":"94ba28ea-3e15-11ee-8d97-da7ad0900002","attributes":{"name":"name-29fddb97704028c4","handle":"handle-29fddb97704028c4","summary":null,"description":null,"avatar":"\ud83e\udd51","banner":7,"visible_modules":["m1","m2"],"hidden_modules":["m3"],"created_at":"2023-08-18T22:21:30.549604+00:00","modified_at":"2023-08-18T22:21:30.549611+00:00","user_count":0,"link_count":0},"relationships":{"team_links":{"links":{"related":"/api/v2/team/94ba28ea-3e15-11ee-8d97-da7ad0900002/links"}},"user_team_permissions":{"links":{"related":"/api/v2/team/94ba28ea-3e15-11ee-8d97-da7ad0900002/permission-settings"}}}}}
15+
string: '{"data":{"type":"team","id":"fcaac0f6-405c-11ee-9237-da7ad0900002","attributes":{"name":"test-name-d8e2060f755d882d","handle":"test-handle-d8e2060f755d882d","summary":null,"description":null,"avatar":"\ud83e\udd51","banner":7,"visible_modules":["m1","m2"],"hidden_modules":["m3"],"created_at":"2023-08-21T19:57:41.527619+00:00","modified_at":"2023-08-21T19:57:41.527624+00:00","user_count":0,"link_count":0},"relationships":{"team_links":{"links":{"related":"/api/v2/team/fcaac0f6-405c-11ee-9237-da7ad0900002/links"}},"user_team_permissions":{"links":{"related":"/api/v2/team/fcaac0f6-405c-11ee-9237-da7ad0900002/permission-settings"}}}}}
1616
1717
'
1818
headers:
@@ -27,7 +27,7 @@ interactions:
2727
accept:
2828
- '*/*'
2929
method: DELETE
30-
uri: https://api.datadoghq.com/api/v2/team/94ba28ea-3e15-11ee-8d97-da7ad0900002
30+
uri: https://api.datadoghq.com/api/v2/team/fcaac0f6-405c-11ee-9237-da7ad0900002
3131
response:
3232
body:
3333
string: ''
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2023-07-12T17:29:28.850Z
1+
2023-08-21T19:44:45.448Z

tests/v2/cassettes/test_scenarios/test_get_a_team_link_returns_api_error_response_response.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
interactions:
22
- request:
3-
body: '{"data":{"attributes":{"handle":"handle-62e1a70bb6b304ee","name":"name-62e1a70bb6b304ee"},"type":"team"}}'
3+
body: '{"data":{"attributes":{"handle":"test-handle-87a259270e6183b1","name":"test-name-87a259270e6183b1"},"type":"team"}}'
44
headers:
55
accept:
66
- application/json
@@ -10,7 +10,7 @@ interactions:
1010
uri: https://api.datadoghq.com/api/v2/team
1111
response:
1212
body:
13-
string: '{"data":{"type":"team","id":"a7c4e9c4-20d9-11ee-99df-da7ad0900002","attributes":{"name":"name-62e1a70bb6b304ee","handle":"handle-62e1a70bb6b304ee","summary":null,"description":null,"created_at":"2023-07-12T17:29:28.973645+00:00","modified_at":"2023-07-12T17:29:28.973651+00:00","user_count":0,"link_count":0},"relationships":{"team_links":{"links":{"related":"/api/v2/team/a7c4e9c4-20d9-11ee-99df-da7ad0900002/links"}},"user_team_permissions":{"links":{"related":"/api/v2/team/a7c4e9c4-20d9-11ee-99df-da7ad0900002/permission-settings"}}}}}
13+
string: '{"data":{"type":"team","id":"2e28b978-405b-11ee-9792-da7ad0900002","attributes":{"name":"test-name-87a259270e6183b1","handle":"test-handle-87a259270e6183b1","summary":null,"description":null,"avatar":null,"banner":null,"visible_modules":[],"hidden_modules":[],"created_at":"2023-08-21T19:44:45.568097+00:00","modified_at":"2023-08-21T19:44:45.568104+00:00","user_count":0,"link_count":0},"relationships":{"team_links":{"links":{"related":"/api/v2/team/2e28b978-405b-11ee-9792-da7ad0900002/links"}},"user_team_permissions":{"links":{"related":"/api/v2/team/2e28b978-405b-11ee-9792-da7ad0900002/permission-settings"}}}}}
1414
1515
'
1616
headers:
@@ -25,7 +25,7 @@ interactions:
2525
accept:
2626
- application/json
2727
method: GET
28-
uri: https://api.datadoghq.com/api/v2/team/a7c4e9c4-20d9-11ee-99df-da7ad0900002/links/REPLACE.ME
28+
uri: https://api.datadoghq.com/api/v2/team/2e28b978-405b-11ee-9792-da7ad0900002/links/REPLACE.ME
2929
response:
3030
body:
3131
string: '{"errors":["REPLACE.ME is not a valid UUID not found"]}'
@@ -41,7 +41,7 @@ interactions:
4141
accept:
4242
- '*/*'
4343
method: DELETE
44-
uri: https://api.datadoghq.com/api/v2/team/a7c4e9c4-20d9-11ee-99df-da7ad0900002
44+
uri: https://api.datadoghq.com/api/v2/team/2e28b978-405b-11ee-9792-da7ad0900002
4545
response:
4646
body:
4747
string: ''
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2023-07-12T17:29:29.362Z
1+
2023-08-21T19:44:45.969Z

0 commit comments

Comments
 (0)