-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Regenerate client from commit 8201a401 of spec repo
- Loading branch information
ci.datadog-api-spec
committed
Jan 26, 2024
1 parent
73de2e2
commit b586d80
Showing
8 changed files
with
151 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
""" | ||
Get team memberships returns "OK" response with pagination | ||
""" | ||
|
||
from datadog_api_client import ApiClient, Configuration | ||
from datadog_api_client.v2.api.teams_api import TeamsApi | ||
|
||
configuration = Configuration() | ||
with ApiClient(configuration) as api_client: | ||
api_instance = TeamsApi(api_client) | ||
items = api_instance.get_team_memberships_with_pagination( | ||
team_id="2e06bf2c-193b-41d4-b3c2-afccc080458f", | ||
page_size=2, | ||
) | ||
for item in items: | ||
print(item) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
""" | ||
Get team memberships returns "Represents a user's association to a team" response with pagination | ||
""" | ||
|
||
from datadog_api_client import ApiClient, Configuration | ||
from datadog_api_client.v2.api.teams_api import TeamsApi | ||
|
||
configuration = Configuration() | ||
with ApiClient(configuration) as api_client: | ||
api_instance = TeamsApi(api_client) | ||
items = api_instance.get_team_memberships_with_pagination( | ||
team_id="team_id", | ||
) | ||
for item in items: | ||
print(item) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...ettes/test_scenarios/test_get_team_memberships_returns_ok_response_with_pagination.frozen
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
2024-01-26T20:45:29.741Z |
40 changes: 40 additions & 0 deletions
40
...ssettes/test_scenarios/test_get_team_memberships_returns_ok_response_with_pagination.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
interactions: | ||
- request: | ||
body: null | ||
headers: | ||
accept: | ||
- application/json | ||
method: GET | ||
uri: https://api.datadoghq.com/api/v2/team/2e06bf2c-193b-41d4-b3c2-afccc080458f/memberships?page%5Bsize%5D=2&page%5Bnumber%5D=0 | ||
response: | ||
body: | ||
string: '{"data":[{"type":"team_memberships","id":"TeamMembership-2e06bf2c-193b-41d4-b3c2-afccc080458f-3736692","attributes":{"role":null,"provisioned_by":null,"provisioned_by_id":"6018c832-80a7-11ea-93dd-43183212bc7a"},"relationships":{"user":{"data":{"type":"users","id":"03b4bfc0-98b9-11ec-842d-da7ad0900002"}}}},{"type":"team_memberships","id":"TeamMembership-2e06bf2c-193b-41d4-b3c2-afccc080458f-4055096","attributes":{"role":null,"provisioned_by":null,"provisioned_by_id":"6018c832-80a7-11ea-93dd-43183212bc7a"},"relationships":{"user":{"data":{"type":"users","id":"170a64a1-d9c6-11ec-af01-da7ad0900002"}}}}],"included":[{"type":"users","id":"03b4bfc0-98b9-11ec-842d-da7ad0900002","attributes":{"name":"Datadog | ||
API Client Python","handle":"example-create_a_user_returns_ok_response_1646068093@datadoghq.com","email":"example-create_a_user_returns_ok_response_1646068093@datadoghq.com","icon":"https://secure.gravatar.com/avatar/27fb863ad335246b65fe4989f1686f35?s=48&d=retro","disabled":false,"service_account":false}},{"type":"users","id":"170a64a1-d9c6-11ec-af01-da7ad0900002","attributes":{"name":"Datadog | ||
API Client Python","handle":"example-create_a_user_returns_ok_response_1653220535@datadoghq.com","email":"example-create_a_user_returns_ok_response_1653220535@datadoghq.com","icon":"https://secure.gravatar.com/avatar/c5256983bba478dfd35e83bbb73621cc?s=48&d=retro","disabled":false,"service_account":false}}],"meta":{"pagination":{"number":0,"first_number":0,"prev_number":0,"next_number":1,"last_number":1,"size":2,"type":"number_size","total":3}},"links":{"self":"https://api.datadoghq.com/api/v2/team/2e06bf2c-193b-41d4-b3c2-afccc080458f/memberships?page%5Bsize%5D=2&page%5Bnumber%5D=0","last":"https://api.datadoghq.com/api/v2/team/2e06bf2c-193b-41d4-b3c2-afccc080458f/memberships?page[number]=1&page[size]=2","next":"https://api.datadoghq.com/api/v2/team/2e06bf2c-193b-41d4-b3c2-afccc080458f/memberships?page[number]=1&page[size]=2","prev":null,"first":"https://api.datadoghq.com/api/v2/team/2e06bf2c-193b-41d4-b3c2-afccc080458f/memberships?page[number]=0&page[size]=2"}} | ||
' | ||
headers: | ||
content-type: | ||
- application/json | ||
status: | ||
code: 200 | ||
message: OK | ||
- request: | ||
body: null | ||
headers: | ||
accept: | ||
- application/json | ||
method: GET | ||
uri: https://api.datadoghq.com/api/v2/team/2e06bf2c-193b-41d4-b3c2-afccc080458f/memberships?page%5Bsize%5D=2&page%5Bnumber%5D=1 | ||
response: | ||
body: | ||
string: '{"data":[{"type":"team_memberships","id":"TeamMembership-2e06bf2c-193b-41d4-b3c2-afccc080458f-1445416","attributes":{"role":null,"provisioned_by":null,"provisioned_by_id":"6018c832-80a7-11ea-93dd-43183212bc7a"},"relationships":{"user":{"data":{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0"}}}}],"included":[{"type":"users","id":"3ad549bf-eba0-11e9-a77a-0705486660d0","attributes":{"name":null,"handle":"[email protected]","email":"[email protected]","icon":"https://secure.gravatar.com/avatar/28a16dfe36e73b60c1d55872cb0f1172?s=48&d=retro","disabled":false,"service_account":false}}],"meta":{"pagination":{"number":1,"first_number":0,"prev_number":0,"next_number":2,"last_number":1,"size":2,"type":"number_size","total":3}},"links":{"self":"https://api.datadoghq.com/api/v2/team/2e06bf2c-193b-41d4-b3c2-afccc080458f/memberships?page%5Bsize%5D=2&page%5Bnumber%5D=1","last":"https://api.datadoghq.com/api/v2/team/2e06bf2c-193b-41d4-b3c2-afccc080458f/memberships?page[number]=1&page[size]=2","next":"https://api.datadoghq.com/api/v2/team/2e06bf2c-193b-41d4-b3c2-afccc080458f/memberships?page[number]=2&page[size]=2","prev":"https://api.datadoghq.com/api/v2/team/2e06bf2c-193b-41d4-b3c2-afccc080458f/memberships?page[number]=0&page[size]=2","first":"https://api.datadoghq.com/api/v2/team/2e06bf2c-193b-41d4-b3c2-afccc080458f/memberships?page[number]=0&page[size]=2"}} | ||
|
||
' | ||
headers: | ||
content-type: | ||
- application/json | ||
status: | ||
code: 200 | ||
message: OK | ||
version: 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters