diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 96bcf5becc..45253f2bc5 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -131705,6 +131705,360 @@ components: meta: $ref: "#/components/schemas/TeamsHierarchyLinksResponseMeta" type: object + TeamHierarchyMember: + description: A user relationship to the requested team. + properties: + attributes: + $ref: "#/components/schemas/TeamHierarchyMemberAttributes" + id: + description: Relationship identifier containing the team UUID and user UUID. + example: UserTeamRelationship:692e8073-12c4-4c71-8408-5090bd44c9c8:00000000-0000-0000-0000-000000000001 + type: string + relationships: + $ref: "#/components/schemas/TeamHierarchyMemberRelationships" + type: + $ref: "#/components/schemas/TeamHierarchyMemberType" + required: + - id + - type + - attributes + - relationships + type: object + TeamHierarchyMemberAttributes: + description: Membership attributes relative to the requested team. + properties: + direct_role: + description: "Role on the requested team: admin or member. Null for inherited members." + example: member + nullable: true + type: string + is_direct: + description: Whether the user belongs directly to the requested team. + example: true + type: boolean + provisioned_by: + description: Membership provisioner. Null for inherited members. + example: manual + nullable: true + type: string + provisioned_by_id: + description: Identifier supplied by the membership provisioner. Null when unavailable or for inherited members. + example: 00000000-0000-0000-0000-000000000003 + nullable: true + type: string + required: + - is_direct + - direct_role + - provisioned_by + - provisioned_by_id + type: object + TeamHierarchyMemberIncluded: + description: An included user or the requested team, distinguished by resource type. + oneOf: + - $ref: "#/components/schemas/TeamHierarchyMemberUser" + - $ref: "#/components/schemas/TeamHierarchyMemberTeam" + TeamHierarchyMemberRelationships: + description: User and requested team linkage. + properties: + team: + $ref: "#/components/schemas/TeamHierarchyMemberTeamRelationship" + user: + $ref: "#/components/schemas/TeamHierarchyMemberUserRelationship" + required: + - user + - team + type: object + TeamHierarchyMemberTeam: + description: The requested team, included at most once. Descendant teams are not included. + properties: + attributes: + $ref: "#/components/schemas/TeamHierarchyMemberTeamAttributes" + id: + description: UUID of the requested team. + example: 692e8073-12c4-4c71-8408-5090bd44c9c8 + format: uuid + type: string + type: + $ref: "#/components/schemas/TeamHierarchyMemberTeamType" + required: + - id + - type + type: object + TeamHierarchyMemberTeamAttributes: + description: Available attributes of the requested team. + properties: + handle: + description: Handle of the team. + example: platform + type: string + name: + description: Name of the team. + example: Platform + type: string + type: object + TeamHierarchyMemberTeamData: + description: Team resource identifier. + properties: + id: + description: UUID of the team. + example: 692e8073-12c4-4c71-8408-5090bd44c9c8 + format: uuid + type: string + type: + $ref: "#/components/schemas/TeamHierarchyMemberTeamType" + required: + - id + - type + type: object + TeamHierarchyMemberTeamRelationship: + description: Linkage to the requested team. + properties: + data: + $ref: "#/components/schemas/TeamHierarchyMemberTeamData" + required: + - data + type: object + TeamHierarchyMemberTeamType: + default: teams + description: Requested team resource type. + enum: + - teams + example: teams + type: string + x-enum-varnames: + - TEAMS + TeamHierarchyMemberType: + default: user_team_relationship + description: Team hierarchy membership resource type. + enum: + - user_team_relationship + example: user_team_relationship + type: string + x-enum-varnames: + - USER_TEAM_RELATIONSHIP + TeamHierarchyMemberUser: + description: A user included in the hierarchy members response. + properties: + attributes: + $ref: "#/components/schemas/UserAttributes" + id: + description: UUID of the user. + example: 00000000-0000-0000-0000-000000000001 + format: uuid + type: string + type: + $ref: "#/components/schemas/UsersType" + required: + - id + - type + - attributes + type: object + TeamHierarchyMemberUserData: + description: User resource identifier. + properties: + id: + description: UUID of the user. + example: 00000000-0000-0000-0000-000000000001 + format: uuid + type: string + type: + $ref: "#/components/schemas/UsersType" + required: + - id + - type + type: object + TeamHierarchyMemberUserRelationship: + description: Linkage to the user. + properties: + data: + $ref: "#/components/schemas/TeamHierarchyMemberUserData" + required: + - data + type: object + TeamHierarchyMembersNumberPage: + description: Pagination metadata using number and size. + properties: + first_number: + description: First page number. + example: 0 + format: int64 + type: integer + last_number: + description: Last page number. Null when unavailable. + example: 0 + format: int64 + nullable: true + type: integer + next_number: + description: Next page number. Null when unavailable. + example: + format: int64 + nullable: true + type: integer + number: + description: Current zero-based page number. + example: 0 + format: int64 + type: integer + prev_number: + description: Previous page number. Null when unavailable. + example: + format: int64 + nullable: true + type: integer + size: + description: Maximum number of members per page. + example: 100 + format: int64 + type: integer + total: + description: Total number of members matching the filters. + example: 2 + format: int64 + type: integer + type: + $ref: "#/components/schemas/TeamHierarchyMembersNumberPageType" + required: + - type + - number + - size + - total + - first_number + - prev_number + - next_number + - last_number + type: object + TeamHierarchyMembersNumberPageType: + default: number_size + description: Pagination mode. + enum: + - number_size + example: number_size + type: string + x-enum-varnames: + - NUMBER_SIZE + TeamHierarchyMembersOffsetPage: + description: Pagination metadata using offset and limit. + properties: + first_offset: + description: First offset. + example: 0 + format: int64 + type: integer + last_offset: + description: Last offset. Null when unavailable. + example: 0 + format: int64 + nullable: true + type: integer + limit: + description: Maximum number of members per page. + example: 100 + format: int64 + type: integer + next_offset: + description: Next offset. Null when unavailable. + example: + format: int64 + nullable: true + type: integer + offset: + description: Current offset. + example: 0 + format: int64 + type: integer + prev_offset: + description: Previous offset. Null when unavailable. + example: + format: int64 + nullable: true + type: integer + total: + description: Total number of members matching the filters. + example: 2 + format: int64 + type: integer + type: + $ref: "#/components/schemas/TeamHierarchyMembersOffsetPageType" + required: + - type + - offset + - limit + - total + - first_offset + - prev_offset + - next_offset + - last_offset + type: object + TeamHierarchyMembersOffsetPageType: + default: offset_limit + description: Pagination mode. + enum: + - offset_limit + example: offset_limit + type: string + x-enum-varnames: + - OFFSET_LIMIT + TeamHierarchyMembersPage: + description: Pagination metadata for the selected pagination mode. + oneOf: + - $ref: "#/components/schemas/TeamHierarchyMembersOffsetPage" + - $ref: "#/components/schemas/TeamHierarchyMembersNumberPage" + TeamHierarchyMembersResponse: + description: Direct and inherited members of the requested team. + properties: + data: + description: >- + Membership relationships for users who belong to the requested team or inherit membership through its descendant teams. Each user appears once, even if they belong to multiple teams in the hierarchy. Each relationship identifies the user and requested team, and indicates whether the user is a direct member of the requested team. + items: + $ref: "#/components/schemas/TeamHierarchyMember" + type: array + included: + description: Requested users and the team. May be absent when the result is empty, even if requested. + items: + $ref: "#/components/schemas/TeamHierarchyMemberIncluded" + type: array + links: + $ref: "#/components/schemas/TeamHierarchyMembersResponseLinks" + meta: + $ref: "#/components/schemas/TeamHierarchyMembersResponseMeta" + required: + - data + - meta + - links + type: object + TeamHierarchyMembersResponseLinks: + description: Page navigation links. Unavailable links are omitted. + properties: + first: + description: First page URL. + example: https://api.datadoghq.com/api/v2/team/692e8073-12c4-4c71-8408-5090bd44c9c8/members?page%5Bnumber%5D=0&page%5Bsize%5D=100 + type: string + last: + description: Last page URL. + example: https://api.datadoghq.com/api/v2/team/692e8073-12c4-4c71-8408-5090bd44c9c8/members?page%5Bnumber%5D=0&page%5Bsize%5D=100 + type: string + next: + description: Next page URL. + example: https://api.datadoghq.com/api/v2/team/692e8073-12c4-4c71-8408-5090bd44c9c8/members?page%5Bnumber%5D=0&page%5Bsize%5D=100 + type: string + prev: + description: Previous page URL. + example: https://api.datadoghq.com/api/v2/team/692e8073-12c4-4c71-8408-5090bd44c9c8/members?page%5Bnumber%5D=0&page%5Bsize%5D=100 + type: string + self: + description: Current page URL. + example: https://api.datadoghq.com/api/v2/team/692e8073-12c4-4c71-8408-5090bd44c9c8/members?page%5Bnumber%5D=0&page%5Bsize%5D=100 + type: string + type: object + TeamHierarchyMembersResponseMeta: + description: Pagination metadata for the filtered members. + properties: + page: + $ref: "#/components/schemas/TeamHierarchyMembersPage" + required: + - page + type: object TeamIncluded: description: Included resources related to the team oneOf: @@ -246701,6 +247055,268 @@ paths: operator: OR permissions: - teams_read + /api/v2/team/{team_id}/members: + get: + description: |- + List the direct and inherited members of a team, deduplicated by user. + Members of descendant teams are included unless `filter[is_direct_only]` is true. + Datadog support users are always excluded. + + Use `page[number]` and `page[size]` to paginate through the results. + Invalid query parameters return a JSON:API error with status 400. + Invalid or unknown team UUIDs return status 404. + operationId: ListTeamHierarchyMembers + parameters: + - description: UUID of the requested root team. + in: path + name: team_id + required: true + schema: + example: 692e8073-12c4-4c71-8408-5090bd44c9c8 + type: string + - description: Return only direct members. By default, members inherited from descendant teams are also returned. + in: query + name: filter[is_direct_only] + required: false + schema: + default: false + example: false + type: boolean + - description: Include service accounts. Datadog support users are always excluded. + in: query + name: filter[include_service_accounts] + required: false + schema: + default: true + example: true + type: boolean + - description: Filter by a case-insensitive substring of the user name, handle, or email. + in: query + name: filter[keyword] + required: false + schema: + example: alice + type: string + - description: "Comma-separated resources to include: `user` and `team`. The included team is the requested team. Whitespace is trimmed, and duplicate or empty entries are ignored." + in: query + name: include + required: false + schema: + example: user,team + pattern: ^\s*((user|team)\s*)?(,\s*((user|team)\s*)?)*$ + type: string + - description: "Comma-separated sort fields: `name`, `handle`, `is_direct`, and `provisioned_by`. Fields are applied in order, each optionally prefixed with `-` for descending order. By default, team admins come first, followed by other direct members, then inherited members, sorted by name within each group." + in: query + name: sort + required: false + schema: + example: is_direct,-name + type: string + - description: Zero-based page number. Negative values become 0. Defaults to 0. + in: query + name: page[number] + required: false + schema: + default: 0 + example: 0 + format: int64 + type: integer + - description: Requested number of members per page. Defaults to and maxes out at 100. + in: query + name: page[size] + required: false + schema: + default: 100 + example: 100 + format: int64 + type: integer + responses: + "200": + content: + application/json: + examples: + default: + summary: Direct and inherited members with number pagination + value: + data: + - attributes: + direct_role: admin + is_direct: true + provisioned_by: manual + provisioned_by_id: + id: UserTeamRelationship:692e8073-12c4-4c71-8408-5090bd44c9c8:00000000-0000-0000-0000-000000000001 + relationships: + team: + data: + id: 692e8073-12c4-4c71-8408-5090bd44c9c8 + type: teams + user: + data: + id: 00000000-0000-0000-0000-000000000001 + type: users + type: user_team_relationship + - attributes: + direct_role: + is_direct: false + provisioned_by: + provisioned_by_id: + id: UserTeamRelationship:692e8073-12c4-4c71-8408-5090bd44c9c8:00000000-0000-0000-0000-000000000002 + relationships: + team: + data: + id: 692e8073-12c4-4c71-8408-5090bd44c9c8 + type: teams + user: + data: + id: 00000000-0000-0000-0000-000000000002 + type: users + type: user_team_relationship + links: + first: https://api.datadoghq.com/api/v2/team/692e8073-12c4-4c71-8408-5090bd44c9c8/members?page%5Bnumber%5D=0&page%5Bsize%5D=100 + last: https://api.datadoghq.com/api/v2/team/692e8073-12c4-4c71-8408-5090bd44c9c8/members?page%5Bnumber%5D=0&page%5Bsize%5D=100 + self: https://api.datadoghq.com/api/v2/team/692e8073-12c4-4c71-8408-5090bd44c9c8/members?page%5Bnumber%5D=0&page%5Bsize%5D=100 + meta: + page: + first_number: 0 + last_number: 0 + next_number: + number: 0 + prev_number: + size: 100 + total: 2 + type: number_size + empty: + summary: No matching members, with included resources omitted + value: + data: [] + links: + first: https://api.datadoghq.com/api/v2/team/692e8073-12c4-4c71-8408-5090bd44c9c8/members?page%5Bnumber%5D=0&page%5Bsize%5D=100 + last: https://api.datadoghq.com/api/v2/team/692e8073-12c4-4c71-8408-5090bd44c9c8/members?page%5Bnumber%5D=0&page%5Bsize%5D=100 + self: https://api.datadoghq.com/api/v2/team/692e8073-12c4-4c71-8408-5090bd44c9c8/members?page%5Bnumber%5D=0&page%5Bsize%5D=100 + meta: + page: + first_number: 0 + last_number: 0 + next_number: + number: 0 + prev_number: + size: 100 + total: 0 + type: number_size + included_resources: + summary: Users and the team with number pagination + value: + data: + - attributes: + direct_role: admin + is_direct: true + provisioned_by: manual + provisioned_by_id: + id: UserTeamRelationship:692e8073-12c4-4c71-8408-5090bd44c9c8:00000000-0000-0000-0000-000000000001 + relationships: + team: + data: + id: 692e8073-12c4-4c71-8408-5090bd44c9c8 + type: teams + user: + data: + id: 00000000-0000-0000-0000-000000000001 + type: users + type: user_team_relationship + - attributes: + direct_role: + is_direct: false + provisioned_by: + provisioned_by_id: + id: UserTeamRelationship:692e8073-12c4-4c71-8408-5090bd44c9c8:00000000-0000-0000-0000-000000000002 + relationships: + team: + data: + id: 692e8073-12c4-4c71-8408-5090bd44c9c8 + type: teams + user: + data: + id: 00000000-0000-0000-0000-000000000002 + type: users + type: user_team_relationship + included: + - attributes: + email: alice@example.com + handle: alice@example.com + name: Alice + title: + id: 00000000-0000-0000-0000-000000000001 + type: users + - attributes: + email: bob@example.com + handle: bob@example.com + name: + title: + id: 00000000-0000-0000-0000-000000000002 + type: users + - attributes: + handle: platform + name: Platform + id: 692e8073-12c4-4c71-8408-5090bd44c9c8 + type: teams + links: + first: https://api.datadoghq.com/api/v2/team/692e8073-12c4-4c71-8408-5090bd44c9c8/members?include=user%2Cteam&page%5Bnumber%5D=0&page%5Bsize%5D=100 + last: https://api.datadoghq.com/api/v2/team/692e8073-12c4-4c71-8408-5090bd44c9c8/members?include=user%2Cteam&page%5Bnumber%5D=0&page%5Bsize%5D=100 + self: https://api.datadoghq.com/api/v2/team/692e8073-12c4-4c71-8408-5090bd44c9c8/members?include=user%2Cteam&page%5Bnumber%5D=0&page%5Bsize%5D=100 + meta: + page: + first_number: 0 + last_number: 0 + next_number: + number: 0 + prev_number: + size: 100 + total: 2 + type: number_size + schema: + $ref: "#/components/schemas/TeamHierarchyMembersResponse" + description: OK + "400": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Bad Request + "401": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Unauthorized + "403": + $ref: "#/components/responses/ForbiddenResponse" + "404": + content: + application/json: + schema: + $ref: "#/components/schemas/JSONAPIErrorResponse" + description: Not Found + "429": + $ref: "#/components/responses/TooManyRequestsResponse" + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - teams_read + summary: Get team hierarchy members + tags: + - Teams + x-pagination: + limitParam: page[size] + pageParam: page[number] + resultsPath: data + x-permission: + operator: OR + permissions: + - teams_read + x-unstable: |- + **Note**: This endpoint is in Preview and is subject to change. + If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/). /api/v2/team/{team_id}/memberships: get: description: Get a paginated list of members for a team diff --git a/examples/v2/teams/ListTeamHierarchyMembers.py b/examples/v2/teams/ListTeamHierarchyMembers.py new file mode 100644 index 0000000000..40c89dc020 --- /dev/null +++ b/examples/v2/teams/ListTeamHierarchyMembers.py @@ -0,0 +1,26 @@ +""" +Get team hierarchy members returns "OK" response +""" + +from os import environ +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.teams_api import TeamsApi + +# there is a valid "dd_team" in the system +DD_TEAM_DATA_ID = environ["DD_TEAM_DATA_ID"] + +# there is a valid "user" in the system +USER_DATA_ATTRIBUTES_EMAIL = environ["USER_DATA_ATTRIBUTES_EMAIL"] + +configuration = Configuration() +configuration.access_token = environ["DD_BEARER_TOKEN"] +configuration.unstable_operations["list_team_hierarchy_members"] = True +with ApiClient(configuration) as api_client: + api_instance = TeamsApi(api_client) + response = api_instance.list_team_hierarchy_members( + team_id=DD_TEAM_DATA_ID, + filter_keyword=USER_DATA_ATTRIBUTES_EMAIL, + include="user,team", + ) + + print(response) diff --git a/examples/v2/teams/ListTeamHierarchyMembers_1000871040.py b/examples/v2/teams/ListTeamHierarchyMembers_1000871040.py new file mode 100644 index 0000000000..7c29786174 --- /dev/null +++ b/examples/v2/teams/ListTeamHierarchyMembers_1000871040.py @@ -0,0 +1,25 @@ +""" +Get team hierarchy members paginates by number and size +""" + +from os import environ +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.teams_api import TeamsApi + +# there is a valid "dd_team" in the system +DD_TEAM_DATA_ID = environ["DD_TEAM_DATA_ID"] + +configuration = Configuration() +configuration.access_token = environ["DD_BEARER_TOKEN"] +configuration.unstable_operations["list_team_hierarchy_members"] = True +with ApiClient(configuration) as api_client: + api_instance = TeamsApi(api_client) + response = api_instance.list_team_hierarchy_members( + team_id=DD_TEAM_DATA_ID, + filter_keyword="Example-Team", + sort="-is_direct", + page_number=1, + page_size=1, + ) + + print(response) diff --git a/examples/v2/teams/ListTeamHierarchyMembers_2494043793.py b/examples/v2/teams/ListTeamHierarchyMembers_2494043793.py new file mode 100644 index 0000000000..36160cea38 --- /dev/null +++ b/examples/v2/teams/ListTeamHierarchyMembers_2494043793.py @@ -0,0 +1,22 @@ +""" +Get team hierarchy members filters names case insensitively +""" + +from os import environ +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.teams_api import TeamsApi + +# there is a valid "dd_team" in the system +DD_TEAM_DATA_ID = environ["DD_TEAM_DATA_ID"] + +configuration = Configuration() +configuration.access_token = environ["DD_BEARER_TOKEN"] +configuration.unstable_operations["list_team_hierarchy_members"] = True +with ApiClient(configuration) as api_client: + api_instance = TeamsApi(api_client) + response = api_instance.list_team_hierarchy_members( + team_id=DD_TEAM_DATA_ID, + filter_keyword="hIeRaRcHy MeMbEr", + ) + + print(response) diff --git a/examples/v2/teams/ListTeamHierarchyMembers_3103330950.py b/examples/v2/teams/ListTeamHierarchyMembers_3103330950.py new file mode 100644 index 0000000000..4a26a13543 --- /dev/null +++ b/examples/v2/teams/ListTeamHierarchyMembers_3103330950.py @@ -0,0 +1,23 @@ +""" +Get team hierarchy members returns empty results +""" + +from os import environ +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.teams_api import TeamsApi + +# there is a valid "dd_team" in the system +DD_TEAM_DATA_ID = environ["DD_TEAM_DATA_ID"] + +configuration = Configuration() +configuration.access_token = environ["DD_BEARER_TOKEN"] +configuration.unstable_operations["list_team_hierarchy_members"] = True +with ApiClient(configuration) as api_client: + api_instance = TeamsApi(api_client) + response = api_instance.list_team_hierarchy_members( + team_id=DD_TEAM_DATA_ID, + filter_keyword="no-matching-member-Example-Team", + include="user,team", + ) + + print(response) diff --git a/examples/v2/teams/ListTeamHierarchyMembers_3197180671.py b/examples/v2/teams/ListTeamHierarchyMembers_3197180671.py new file mode 100644 index 0000000000..9315abbbd5 --- /dev/null +++ b/examples/v2/teams/ListTeamHierarchyMembers_3197180671.py @@ -0,0 +1,24 @@ +""" +Get team hierarchy members deduplicates direct and inherited membership +""" + +from os import environ +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.teams_api import TeamsApi + +# there is a valid "dd_team" in the system +DD_TEAM_DATA_ID = environ["DD_TEAM_DATA_ID"] + +configuration = Configuration() +configuration.access_token = environ["DD_BEARER_TOKEN"] +configuration.unstable_operations["list_team_hierarchy_members"] = True +with ApiClient(configuration) as api_client: + api_instance = TeamsApi(api_client) + response = api_instance.list_team_hierarchy_members( + team_id=DD_TEAM_DATA_ID, + filter_keyword="Example-Team", + include="team", + sort="-is_direct,handle", + ) + + print(response) diff --git a/examples/v2/teams/ListTeamHierarchyMembers_3330810309.py b/examples/v2/teams/ListTeamHierarchyMembers_3330810309.py new file mode 100644 index 0000000000..8b69b238e5 --- /dev/null +++ b/examples/v2/teams/ListTeamHierarchyMembers_3330810309.py @@ -0,0 +1,23 @@ +""" +Get team hierarchy members includes inherited users with null root membership attributes +""" + +from os import environ +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.teams_api import TeamsApi + +# there is a valid "dd_team" in the system +DD_TEAM_DATA_ID = environ["DD_TEAM_DATA_ID"] + +configuration = Configuration() +configuration.access_token = environ["DD_BEARER_TOKEN"] +configuration.unstable_operations["list_team_hierarchy_members"] = True +with ApiClient(configuration) as api_client: + api_instance = TeamsApi(api_client) + response = api_instance.list_team_hierarchy_members( + team_id=DD_TEAM_DATA_ID, + filter_keyword="Example-Team", + include="user,team", + ) + + print(response) diff --git a/examples/v2/teams/ListTeamHierarchyMembers_3355644561.py b/examples/v2/teams/ListTeamHierarchyMembers_3355644561.py new file mode 100644 index 0000000000..dfcbec0e22 --- /dev/null +++ b/examples/v2/teams/ListTeamHierarchyMembers_3355644561.py @@ -0,0 +1,24 @@ +""" +Get team hierarchy members filters direct members +""" + +from os import environ +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.teams_api import TeamsApi + +# there is a valid "dd_team" in the system +DD_TEAM_DATA_ID = environ["DD_TEAM_DATA_ID"] + +configuration = Configuration() +configuration.access_token = environ["DD_BEARER_TOKEN"] +configuration.unstable_operations["list_team_hierarchy_members"] = True +with ApiClient(configuration) as api_client: + api_instance = TeamsApi(api_client) + response = api_instance.list_team_hierarchy_members( + team_id=DD_TEAM_DATA_ID, + filter_is_direct_only=True, + filter_include_service_accounts=False, + filter_keyword="Example-Team", + ) + + print(response) diff --git a/examples/v2/teams/ListTeamHierarchyMembers_3685423949.py b/examples/v2/teams/ListTeamHierarchyMembers_3685423949.py new file mode 100644 index 0000000000..bbaacd298e --- /dev/null +++ b/examples/v2/teams/ListTeamHierarchyMembers_3685423949.py @@ -0,0 +1,23 @@ +""" +Get team hierarchy members sorts inherited members before direct members +""" + +from os import environ +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.teams_api import TeamsApi + +# there is a valid "dd_team" in the system +DD_TEAM_DATA_ID = environ["DD_TEAM_DATA_ID"] + +configuration = Configuration() +configuration.access_token = environ["DD_BEARER_TOKEN"] +configuration.unstable_operations["list_team_hierarchy_members"] = True +with ApiClient(configuration) as api_client: + api_instance = TeamsApi(api_client) + response = api_instance.list_team_hierarchy_members( + team_id=DD_TEAM_DATA_ID, + filter_keyword="Example-Team", + sort="is_direct,-name", + ) + + print(response) diff --git a/examples/v2/teams/ListTeamHierarchyMembers_4182775736.py b/examples/v2/teams/ListTeamHierarchyMembers_4182775736.py new file mode 100644 index 0000000000..87da5fda3d --- /dev/null +++ b/examples/v2/teams/ListTeamHierarchyMembers_4182775736.py @@ -0,0 +1,23 @@ +""" +Get team hierarchy members returns "OK" response with pagination +""" + +from os import environ +from datadog_api_client import ApiClient, Configuration +from datadog_api_client.v2.api.teams_api import TeamsApi + +# there is a valid "dd_team" in the system +DD_TEAM_DATA_ID = environ["DD_TEAM_DATA_ID"] + +configuration = Configuration() +configuration.access_token = environ["DD_BEARER_TOKEN"] +configuration.unstable_operations["list_team_hierarchy_members"] = True +with ApiClient(configuration) as api_client: + api_instance = TeamsApi(api_client) + items = api_instance.list_team_hierarchy_members_with_pagination( + team_id=DD_TEAM_DATA_ID, + filter_keyword="Example-Team", + page_size=1, + ) + for item in items: + print(item) diff --git a/src/datadog_api_client/configuration.py b/src/datadog_api_client/configuration.py index c34a033838..c6522f677a 100644 --- a/src/datadog_api_client/configuration.py +++ b/src/datadog_api_client/configuration.py @@ -881,6 +881,7 @@ def __init__( "v2.update_custom_ruleset": False, "v2.add_member_team": False, "v2.list_member_teams": False, + "v2.list_team_hierarchy_members": False, "v2.remove_member_team": False, "v2.create_timeseries_anomaly_investigation": False, "v2.create_web_integration_account": False, diff --git a/src/datadog_api_client/v2/api/teams_api.py b/src/datadog_api_client/v2/api/teams_api.py index b02cbf4e4c..f7f82e2328 100644 --- a/src/datadog_api_client/v2/api/teams_api.py +++ b/src/datadog_api_client/v2/api/teams_api.py @@ -38,6 +38,8 @@ from datadog_api_client.v2.model.team_links_response import TeamLinksResponse from datadog_api_client.v2.model.team_link_response import TeamLinkResponse from datadog_api_client.v2.model.team_link_create_request import TeamLinkCreateRequest +from datadog_api_client.v2.model.team_hierarchy_members_response import TeamHierarchyMembersResponse +from datadog_api_client.v2.model.team_hierarchy_member import TeamHierarchyMember from datadog_api_client.v2.model.user_teams_response import UserTeamsResponse from datadog_api_client.v2.model.get_team_memberships_sort import GetTeamMembershipsSort from datadog_api_client.v2.model.user_team import UserTeam @@ -745,6 +747,65 @@ def __init__(self, api_client=None): api_client=api_client, ) + self._list_team_hierarchy_members_endpoint = _Endpoint( + settings={ + "response_type": (TeamHierarchyMembersResponse,), + "auth": ["apiKeyAuth", "appKeyAuth", "AuthZ"], + "endpoint_path": "/api/v2/team/{team_id}/members", + "operation_id": "list_team_hierarchy_members", + "http_method": "GET", + "version": "v2", + }, + params_map={ + "team_id": { + "required": True, + "openapi_types": (str,), + "attribute": "team_id", + "location": "path", + }, + "filter_is_direct_only": { + "openapi_types": (bool,), + "attribute": "filter[is_direct_only]", + "location": "query", + }, + "filter_include_service_accounts": { + "openapi_types": (bool,), + "attribute": "filter[include_service_accounts]", + "location": "query", + }, + "filter_keyword": { + "openapi_types": (str,), + "attribute": "filter[keyword]", + "location": "query", + }, + "include": { + "validation": {}, + "openapi_types": (str,), + "attribute": "include", + "location": "query", + }, + "sort": { + "openapi_types": (str,), + "attribute": "sort", + "location": "query", + }, + "page_number": { + "openapi_types": (int,), + "attribute": "page[number]", + "location": "query", + }, + "page_size": { + "openapi_types": (int,), + "attribute": "page[size]", + "location": "query", + }, + }, + headers_map={ + "accept": ["application/json"], + }, + api_client=api_client, + ) + self._list_teams_endpoint = _Endpoint( settings={ "response_type": (TeamsResponse,), @@ -1805,6 +1866,145 @@ def list_team_hierarchy_links_with_pagination( } return endpoint.call_with_http_info_paginated(pagination) + def list_team_hierarchy_members( + self, + team_id: str, + *, + filter_is_direct_only: Union[bool, UnsetType] = unset, + filter_include_service_accounts: Union[bool, UnsetType] = unset, + filter_keyword: Union[str, UnsetType] = unset, + include: Union[str, UnsetType] = unset, + sort: Union[str, UnsetType] = unset, + page_number: Union[int, UnsetType] = unset, + page_size: Union[int, UnsetType] = unset, + ) -> TeamHierarchyMembersResponse: + """Get team hierarchy members. + + List the direct and inherited members of a team, deduplicated by user. + Members of descendant teams are included unless ``filter[is_direct_only]`` is true. + Datadog support users are always excluded. + + Use ``page[number]`` and ``page[size]`` to paginate through the results. + Invalid query parameters return a JSON:API error with status 400. + Invalid or unknown team UUIDs return status 404. + + :param team_id: UUID of the requested root team. + :type team_id: str + :param filter_is_direct_only: Return only direct members. By default, members inherited from descendant teams are also returned. + :type filter_is_direct_only: bool, optional + :param filter_include_service_accounts: Include service accounts. Datadog support users are always excluded. + :type filter_include_service_accounts: bool, optional + :param filter_keyword: Filter by a case-insensitive substring of the user name, handle, or email. + :type filter_keyword: str, optional + :param include: Comma-separated resources to include: ``user`` and ``team``. The included team is the requested team. Whitespace is trimmed, and duplicate or empty entries are ignored. + :type include: str, optional + :param sort: Comma-separated sort fields: ``name`` , ``handle`` , ``is_direct`` , and ``provisioned_by``. Fields are applied in order, each optionally prefixed with ``-`` for descending order. By default, team admins come first, followed by other direct members, then inherited members, sorted by name within each group. + :type sort: str, optional + :param page_number: Zero-based page number. Negative values become 0. Defaults to 0. + :type page_number: int, optional + :param page_size: Requested number of members per page. Defaults to and maxes out at 100. + :type page_size: int, optional + :rtype: TeamHierarchyMembersResponse + """ + kwargs: Dict[str, Any] = {} + kwargs["team_id"] = team_id + + if filter_is_direct_only is not unset: + kwargs["filter_is_direct_only"] = filter_is_direct_only + + if filter_include_service_accounts is not unset: + kwargs["filter_include_service_accounts"] = filter_include_service_accounts + + if filter_keyword is not unset: + kwargs["filter_keyword"] = filter_keyword + + if include is not unset: + kwargs["include"] = include + + if sort is not unset: + kwargs["sort"] = sort + + if page_number is not unset: + kwargs["page_number"] = page_number + + if page_size is not unset: + kwargs["page_size"] = page_size + + return self._list_team_hierarchy_members_endpoint.call_with_http_info(**kwargs) + + def list_team_hierarchy_members_with_pagination( + self, + team_id: str, + *, + filter_is_direct_only: Union[bool, UnsetType] = unset, + filter_include_service_accounts: Union[bool, UnsetType] = unset, + filter_keyword: Union[str, UnsetType] = unset, + include: Union[str, UnsetType] = unset, + sort: Union[str, UnsetType] = unset, + page_number: Union[int, UnsetType] = unset, + page_size: Union[int, UnsetType] = unset, + ) -> collections.abc.Iterable[TeamHierarchyMember]: + """Get team hierarchy members. + + Provide a paginated version of :meth:`list_team_hierarchy_members`, returning all items. + + :param team_id: UUID of the requested root team. + :type team_id: str + :param filter_is_direct_only: Return only direct members. By default, members inherited from descendant teams are also returned. + :type filter_is_direct_only: bool, optional + :param filter_include_service_accounts: Include service accounts. Datadog support users are always excluded. + :type filter_include_service_accounts: bool, optional + :param filter_keyword: Filter by a case-insensitive substring of the user name, handle, or email. + :type filter_keyword: str, optional + :param include: Comma-separated resources to include: ``user`` and ``team``. The included team is the requested team. Whitespace is trimmed, and duplicate or empty entries are ignored. + :type include: str, optional + :param sort: Comma-separated sort fields: ``name`` , ``handle`` , ``is_direct`` , and ``provisioned_by``. Fields are applied in order, each optionally prefixed with ``-`` for descending order. By default, team admins come first, followed by other direct members, then inherited members, sorted by name within each group. + :type sort: str, optional + :param page_number: Zero-based page number. Negative values become 0. Defaults to 0. + :type page_number: int, optional + :param page_size: Requested number of members per page. Defaults to and maxes out at 100. + :type page_size: int, optional + + :return: A generator of paginated results. + :rtype: collections.abc.Iterable[TeamHierarchyMember] + """ + kwargs: Dict[str, Any] = {} + kwargs["team_id"] = team_id + + if filter_is_direct_only is not unset: + kwargs["filter_is_direct_only"] = filter_is_direct_only + + if filter_include_service_accounts is not unset: + kwargs["filter_include_service_accounts"] = filter_include_service_accounts + + if filter_keyword is not unset: + kwargs["filter_keyword"] = filter_keyword + + if include is not unset: + kwargs["include"] = include + + if sort is not unset: + kwargs["sort"] = sort + + if page_number is not unset: + kwargs["page_number"] = page_number + + if page_size is not unset: + kwargs["page_size"] = page_size + + local_page_size = get_attribute_from_path(kwargs, "page_size", 100) + endpoint = self._list_team_hierarchy_members_endpoint + set_attribute_from_path(kwargs, "page_size", local_page_size, endpoint.params_map) + pagination = { + "limit_value": local_page_size, + "results_path": "data", + "page_param": "page_number", + "page_start": 0, + "endpoint": endpoint, + "kwargs": kwargs, + } + return endpoint.call_with_http_info_paginated(pagination) + def list_teams( self, *, diff --git a/src/datadog_api_client/v2/model/team_hierarchy_member.py b/src/datadog_api_client/v2/model/team_hierarchy_member.py new file mode 100644 index 0000000000..36302280e3 --- /dev/null +++ b/src/datadog_api_client/v2/model/team_hierarchy_member.py @@ -0,0 +1,69 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.team_hierarchy_member_attributes import TeamHierarchyMemberAttributes + from datadog_api_client.v2.model.team_hierarchy_member_relationships import TeamHierarchyMemberRelationships + from datadog_api_client.v2.model.team_hierarchy_member_type import TeamHierarchyMemberType + + +class TeamHierarchyMember(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.team_hierarchy_member_attributes import TeamHierarchyMemberAttributes + from datadog_api_client.v2.model.team_hierarchy_member_relationships import TeamHierarchyMemberRelationships + from datadog_api_client.v2.model.team_hierarchy_member_type import TeamHierarchyMemberType + + return { + "attributes": (TeamHierarchyMemberAttributes,), + "id": (str,), + "relationships": (TeamHierarchyMemberRelationships,), + "type": (TeamHierarchyMemberType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "relationships": "relationships", + "type": "type", + } + + def __init__( + self_, + attributes: TeamHierarchyMemberAttributes, + id: str, + relationships: TeamHierarchyMemberRelationships, + type: TeamHierarchyMemberType, + **kwargs, + ): + """ + A user relationship to the requested team. + + :param attributes: Membership attributes relative to the requested team. + :type attributes: TeamHierarchyMemberAttributes + + :param id: Relationship identifier containing the team UUID and user UUID. + :type id: str + + :param relationships: User and requested team linkage. + :type relationships: TeamHierarchyMemberRelationships + + :param type: Team hierarchy membership resource type. + :type type: TeamHierarchyMemberType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.id = id + self_.relationships = relationships + self_.type = type diff --git a/src/datadog_api_client/v2/model/team_hierarchy_member_attributes.py b/src/datadog_api_client/v2/model/team_hierarchy_member_attributes.py new file mode 100644 index 0000000000..34a6362d2d --- /dev/null +++ b/src/datadog_api_client/v2/model/team_hierarchy_member_attributes.py @@ -0,0 +1,60 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + none_type, +) + + +class TeamHierarchyMemberAttributes(ModelNormal): + @cached_property + def openapi_types(_): + return { + "direct_role": (str, none_type), + "is_direct": (bool,), + "provisioned_by": (str, none_type), + "provisioned_by_id": (str, none_type), + } + + attribute_map = { + "direct_role": "direct_role", + "is_direct": "is_direct", + "provisioned_by": "provisioned_by", + "provisioned_by_id": "provisioned_by_id", + } + + def __init__( + self_, + direct_role: Union[str, none_type], + is_direct: bool, + provisioned_by: Union[str, none_type], + provisioned_by_id: Union[str, none_type], + **kwargs, + ): + """ + Membership attributes relative to the requested team. + + :param direct_role: Role on the requested team: admin or member. Null for inherited members. + :type direct_role: str, none_type + + :param is_direct: Whether the user belongs directly to the requested team. + :type is_direct: bool + + :param provisioned_by: Membership provisioner. Null for inherited members. + :type provisioned_by: str, none_type + + :param provisioned_by_id: Identifier supplied by the membership provisioner. Null when unavailable or for inherited members. + :type provisioned_by_id: str, none_type + """ + super().__init__(kwargs) + + self_.direct_role = direct_role + self_.is_direct = is_direct + self_.provisioned_by = provisioned_by + self_.provisioned_by_id = provisioned_by_id diff --git a/src/datadog_api_client/v2/model/team_hierarchy_member_included.py b/src/datadog_api_client/v2/model/team_hierarchy_member_included.py new file mode 100644 index 0000000000..b2599f3371 --- /dev/null +++ b/src/datadog_api_client/v2/model/team_hierarchy_member_included.py @@ -0,0 +1,46 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelComposed, + cached_property, +) + + +class TeamHierarchyMemberIncluded(ModelComposed): + def __init__(self, **kwargs): + """ + An included user or the requested team, distinguished by resource type. + + :param attributes: Attributes of user object returned by the API. + :type attributes: UserAttributes + + :param id: UUID of the user. + :type id: UUID + + :param type: Users resource type. + :type type: UsersType + """ + super().__init__(kwargs) + + @cached_property + def _composed_schemas(_): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + from datadog_api_client.v2.model.team_hierarchy_member_user import TeamHierarchyMemberUser + from datadog_api_client.v2.model.team_hierarchy_member_team import TeamHierarchyMemberTeam + + return { + "oneOf": [ + TeamHierarchyMemberUser, + TeamHierarchyMemberTeam, + ], + } diff --git a/src/datadog_api_client/v2/model/team_hierarchy_member_relationships.py b/src/datadog_api_client/v2/model/team_hierarchy_member_relationships.py new file mode 100644 index 0000000000..fa20536c9f --- /dev/null +++ b/src/datadog_api_client/v2/model/team_hierarchy_member_relationships.py @@ -0,0 +1,52 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.team_hierarchy_member_team_relationship import TeamHierarchyMemberTeamRelationship + from datadog_api_client.v2.model.team_hierarchy_member_user_relationship import TeamHierarchyMemberUserRelationship + + +class TeamHierarchyMemberRelationships(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.team_hierarchy_member_team_relationship import ( + TeamHierarchyMemberTeamRelationship, + ) + from datadog_api_client.v2.model.team_hierarchy_member_user_relationship import ( + TeamHierarchyMemberUserRelationship, + ) + + return { + "team": (TeamHierarchyMemberTeamRelationship,), + "user": (TeamHierarchyMemberUserRelationship,), + } + + attribute_map = { + "team": "team", + "user": "user", + } + + def __init__(self_, team: TeamHierarchyMemberTeamRelationship, user: TeamHierarchyMemberUserRelationship, **kwargs): + """ + User and requested team linkage. + + :param team: Linkage to the requested team. + :type team: TeamHierarchyMemberTeamRelationship + + :param user: Linkage to the user. + :type user: TeamHierarchyMemberUserRelationship + """ + super().__init__(kwargs) + + self_.team = team + self_.user = user diff --git a/src/datadog_api_client/v2/model/team_hierarchy_member_team.py b/src/datadog_api_client/v2/model/team_hierarchy_member_team.py new file mode 100644 index 0000000000..808606b540 --- /dev/null +++ b/src/datadog_api_client/v2/model/team_hierarchy_member_team.py @@ -0,0 +1,64 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, + UUID, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.team_hierarchy_member_team_attributes import TeamHierarchyMemberTeamAttributes + from datadog_api_client.v2.model.team_hierarchy_member_team_type import TeamHierarchyMemberTeamType + + +class TeamHierarchyMemberTeam(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.team_hierarchy_member_team_attributes import TeamHierarchyMemberTeamAttributes + from datadog_api_client.v2.model.team_hierarchy_member_team_type import TeamHierarchyMemberTeamType + + return { + "attributes": (TeamHierarchyMemberTeamAttributes,), + "id": (UUID,), + "type": (TeamHierarchyMemberTeamType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__( + self_, + id: UUID, + type: TeamHierarchyMemberTeamType, + attributes: Union[TeamHierarchyMemberTeamAttributes, UnsetType] = unset, + **kwargs, + ): + """ + The requested team, included at most once. Descendant teams are not included. + + :param attributes: Available attributes of the requested team. + :type attributes: TeamHierarchyMemberTeamAttributes, optional + + :param id: UUID of the requested team. + :type id: UUID + + :param type: Requested team resource type. + :type type: TeamHierarchyMemberTeamType + """ + if attributes is not unset: + kwargs["attributes"] = attributes + super().__init__(kwargs) + + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/team_hierarchy_member_team_attributes.py b/src/datadog_api_client/v2/model/team_hierarchy_member_team_attributes.py new file mode 100644 index 0000000000..3356fbe4ae --- /dev/null +++ b/src/datadog_api_client/v2/model/team_hierarchy_member_team_attributes.py @@ -0,0 +1,43 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class TeamHierarchyMemberTeamAttributes(ModelNormal): + @cached_property + def openapi_types(_): + return { + "handle": (str,), + "name": (str,), + } + + attribute_map = { + "handle": "handle", + "name": "name", + } + + def __init__(self_, handle: Union[str, UnsetType] = unset, name: Union[str, UnsetType] = unset, **kwargs): + """ + Available attributes of the requested team. + + :param handle: Handle of the team. + :type handle: str, optional + + :param name: Name of the team. + :type name: str, optional + """ + if handle is not unset: + kwargs["handle"] = handle + if name is not unset: + kwargs["name"] = name + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/team_hierarchy_member_team_data.py b/src/datadog_api_client/v2/model/team_hierarchy_member_team_data.py new file mode 100644 index 0000000000..b65e1367c0 --- /dev/null +++ b/src/datadog_api_client/v2/model/team_hierarchy_member_team_data.py @@ -0,0 +1,47 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + UUID, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.team_hierarchy_member_team_type import TeamHierarchyMemberTeamType + + +class TeamHierarchyMemberTeamData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.team_hierarchy_member_team_type import TeamHierarchyMemberTeamType + + return { + "id": (UUID,), + "type": (TeamHierarchyMemberTeamType,), + } + + attribute_map = { + "id": "id", + "type": "type", + } + + def __init__(self_, id: UUID, type: TeamHierarchyMemberTeamType, **kwargs): + """ + Team resource identifier. + + :param id: UUID of the team. + :type id: UUID + + :param type: Requested team resource type. + :type type: TeamHierarchyMemberTeamType + """ + super().__init__(kwargs) + + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/team_hierarchy_member_team_relationship.py b/src/datadog_api_client/v2/model/team_hierarchy_member_team_relationship.py new file mode 100644 index 0000000000..aa4eb96efb --- /dev/null +++ b/src/datadog_api_client/v2/model/team_hierarchy_member_team_relationship.py @@ -0,0 +1,40 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.team_hierarchy_member_team_data import TeamHierarchyMemberTeamData + + +class TeamHierarchyMemberTeamRelationship(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.team_hierarchy_member_team_data import TeamHierarchyMemberTeamData + + return { + "data": (TeamHierarchyMemberTeamData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: TeamHierarchyMemberTeamData, **kwargs): + """ + Linkage to the requested team. + + :param data: Team resource identifier. + :type data: TeamHierarchyMemberTeamData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/team_hierarchy_member_team_type.py b/src/datadog_api_client/v2/model/team_hierarchy_member_team_type.py new file mode 100644 index 0000000000..4b3ac67eb2 --- /dev/null +++ b/src/datadog_api_client/v2/model/team_hierarchy_member_team_type.py @@ -0,0 +1,35 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class TeamHierarchyMemberTeamType(ModelSimple): + """ + Requested team resource type. + + :param value: If omitted defaults to "teams". Must be one of ["teams"]. + :type value: str + """ + + allowed_values = { + "teams", + } + TEAMS: ClassVar["TeamHierarchyMemberTeamType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +TeamHierarchyMemberTeamType.TEAMS = TeamHierarchyMemberTeamType("teams") diff --git a/src/datadog_api_client/v2/model/team_hierarchy_member_type.py b/src/datadog_api_client/v2/model/team_hierarchy_member_type.py new file mode 100644 index 0000000000..70a7f44a3d --- /dev/null +++ b/src/datadog_api_client/v2/model/team_hierarchy_member_type.py @@ -0,0 +1,35 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class TeamHierarchyMemberType(ModelSimple): + """ + Team hierarchy membership resource type. + + :param value: If omitted defaults to "user_team_relationship". Must be one of ["user_team_relationship"]. + :type value: str + """ + + allowed_values = { + "user_team_relationship", + } + USER_TEAM_RELATIONSHIP: ClassVar["TeamHierarchyMemberType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +TeamHierarchyMemberType.USER_TEAM_RELATIONSHIP = TeamHierarchyMemberType("user_team_relationship") diff --git a/src/datadog_api_client/v2/model/team_hierarchy_member_user.py b/src/datadog_api_client/v2/model/team_hierarchy_member_user.py new file mode 100644 index 0000000000..12fda1af51 --- /dev/null +++ b/src/datadog_api_client/v2/model/team_hierarchy_member_user.py @@ -0,0 +1,55 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + UUID, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.user_attributes import UserAttributes + from datadog_api_client.v2.model.users_type import UsersType + + +class TeamHierarchyMemberUser(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.user_attributes import UserAttributes + from datadog_api_client.v2.model.users_type import UsersType + + return { + "attributes": (UserAttributes,), + "id": (UUID,), + "type": (UsersType,), + } + + attribute_map = { + "attributes": "attributes", + "id": "id", + "type": "type", + } + + def __init__(self_, attributes: UserAttributes, id: UUID, type: UsersType, **kwargs): + """ + A user included in the hierarchy members response. + + :param attributes: Attributes of user object returned by the API. + :type attributes: UserAttributes + + :param id: UUID of the user. + :type id: UUID + + :param type: Users resource type. + :type type: UsersType + """ + super().__init__(kwargs) + + self_.attributes = attributes + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/team_hierarchy_member_user_data.py b/src/datadog_api_client/v2/model/team_hierarchy_member_user_data.py new file mode 100644 index 0000000000..6426ae8dd9 --- /dev/null +++ b/src/datadog_api_client/v2/model/team_hierarchy_member_user_data.py @@ -0,0 +1,47 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + UUID, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.users_type import UsersType + + +class TeamHierarchyMemberUserData(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.users_type import UsersType + + return { + "id": (UUID,), + "type": (UsersType,), + } + + attribute_map = { + "id": "id", + "type": "type", + } + + def __init__(self_, id: UUID, type: UsersType, **kwargs): + """ + User resource identifier. + + :param id: UUID of the user. + :type id: UUID + + :param type: Users resource type. + :type type: UsersType + """ + super().__init__(kwargs) + + self_.id = id + self_.type = type diff --git a/src/datadog_api_client/v2/model/team_hierarchy_member_user_relationship.py b/src/datadog_api_client/v2/model/team_hierarchy_member_user_relationship.py new file mode 100644 index 0000000000..35ff4a6b96 --- /dev/null +++ b/src/datadog_api_client/v2/model/team_hierarchy_member_user_relationship.py @@ -0,0 +1,40 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.team_hierarchy_member_user_data import TeamHierarchyMemberUserData + + +class TeamHierarchyMemberUserRelationship(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.team_hierarchy_member_user_data import TeamHierarchyMemberUserData + + return { + "data": (TeamHierarchyMemberUserData,), + } + + attribute_map = { + "data": "data", + } + + def __init__(self_, data: TeamHierarchyMemberUserData, **kwargs): + """ + Linkage to the user. + + :param data: User resource identifier. + :type data: TeamHierarchyMemberUserData + """ + super().__init__(kwargs) + + self_.data = data diff --git a/src/datadog_api_client/v2/model/team_hierarchy_members_number_page.py b/src/datadog_api_client/v2/model/team_hierarchy_members_number_page.py new file mode 100644 index 0000000000..ae77c2414f --- /dev/null +++ b/src/datadog_api_client/v2/model/team_hierarchy_members_number_page.py @@ -0,0 +1,96 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + none_type, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.team_hierarchy_members_number_page_type import TeamHierarchyMembersNumberPageType + + +class TeamHierarchyMembersNumberPage(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.team_hierarchy_members_number_page_type import ( + TeamHierarchyMembersNumberPageType, + ) + + return { + "first_number": (int,), + "last_number": (int, none_type), + "next_number": (int, none_type), + "number": (int,), + "prev_number": (int, none_type), + "size": (int,), + "total": (int,), + "type": (TeamHierarchyMembersNumberPageType,), + } + + attribute_map = { + "first_number": "first_number", + "last_number": "last_number", + "next_number": "next_number", + "number": "number", + "prev_number": "prev_number", + "size": "size", + "total": "total", + "type": "type", + } + + def __init__( + self_, + first_number: int, + last_number: Union[int, none_type], + next_number: Union[int, none_type], + number: int, + prev_number: Union[int, none_type], + size: int, + total: int, + type: TeamHierarchyMembersNumberPageType, + **kwargs, + ): + """ + Pagination metadata using number and size. + + :param first_number: First page number. + :type first_number: int + + :param last_number: Last page number. Null when unavailable. + :type last_number: int, none_type + + :param next_number: Next page number. Null when unavailable. + :type next_number: int, none_type + + :param number: Current zero-based page number. + :type number: int + + :param prev_number: Previous page number. Null when unavailable. + :type prev_number: int, none_type + + :param size: Maximum number of members per page. + :type size: int + + :param total: Total number of members matching the filters. + :type total: int + + :param type: Pagination mode. + :type type: TeamHierarchyMembersNumberPageType + """ + super().__init__(kwargs) + + self_.first_number = first_number + self_.last_number = last_number + self_.next_number = next_number + self_.number = number + self_.prev_number = prev_number + self_.size = size + self_.total = total + self_.type = type diff --git a/src/datadog_api_client/v2/model/team_hierarchy_members_number_page_type.py b/src/datadog_api_client/v2/model/team_hierarchy_members_number_page_type.py new file mode 100644 index 0000000000..6f131b58ed --- /dev/null +++ b/src/datadog_api_client/v2/model/team_hierarchy_members_number_page_type.py @@ -0,0 +1,35 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class TeamHierarchyMembersNumberPageType(ModelSimple): + """ + Pagination mode. + + :param value: If omitted defaults to "number_size". Must be one of ["number_size"]. + :type value: str + """ + + allowed_values = { + "number_size", + } + NUMBER_SIZE: ClassVar["TeamHierarchyMembersNumberPageType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +TeamHierarchyMembersNumberPageType.NUMBER_SIZE = TeamHierarchyMembersNumberPageType("number_size") diff --git a/src/datadog_api_client/v2/model/team_hierarchy_members_offset_page.py b/src/datadog_api_client/v2/model/team_hierarchy_members_offset_page.py new file mode 100644 index 0000000000..ff0d25e68f --- /dev/null +++ b/src/datadog_api_client/v2/model/team_hierarchy_members_offset_page.py @@ -0,0 +1,96 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + none_type, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.team_hierarchy_members_offset_page_type import TeamHierarchyMembersOffsetPageType + + +class TeamHierarchyMembersOffsetPage(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.team_hierarchy_members_offset_page_type import ( + TeamHierarchyMembersOffsetPageType, + ) + + return { + "first_offset": (int,), + "last_offset": (int, none_type), + "limit": (int,), + "next_offset": (int, none_type), + "offset": (int,), + "prev_offset": (int, none_type), + "total": (int,), + "type": (TeamHierarchyMembersOffsetPageType,), + } + + attribute_map = { + "first_offset": "first_offset", + "last_offset": "last_offset", + "limit": "limit", + "next_offset": "next_offset", + "offset": "offset", + "prev_offset": "prev_offset", + "total": "total", + "type": "type", + } + + def __init__( + self_, + first_offset: int, + last_offset: Union[int, none_type], + limit: int, + next_offset: Union[int, none_type], + offset: int, + prev_offset: Union[int, none_type], + total: int, + type: TeamHierarchyMembersOffsetPageType, + **kwargs, + ): + """ + Pagination metadata using offset and limit. + + :param first_offset: First offset. + :type first_offset: int + + :param last_offset: Last offset. Null when unavailable. + :type last_offset: int, none_type + + :param limit: Maximum number of members per page. + :type limit: int + + :param next_offset: Next offset. Null when unavailable. + :type next_offset: int, none_type + + :param offset: Current offset. + :type offset: int + + :param prev_offset: Previous offset. Null when unavailable. + :type prev_offset: int, none_type + + :param total: Total number of members matching the filters. + :type total: int + + :param type: Pagination mode. + :type type: TeamHierarchyMembersOffsetPageType + """ + super().__init__(kwargs) + + self_.first_offset = first_offset + self_.last_offset = last_offset + self_.limit = limit + self_.next_offset = next_offset + self_.offset = offset + self_.prev_offset = prev_offset + self_.total = total + self_.type = type diff --git a/src/datadog_api_client/v2/model/team_hierarchy_members_offset_page_type.py b/src/datadog_api_client/v2/model/team_hierarchy_members_offset_page_type.py new file mode 100644 index 0000000000..b75c7cadf4 --- /dev/null +++ b/src/datadog_api_client/v2/model/team_hierarchy_members_offset_page_type.py @@ -0,0 +1,35 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelSimple, + cached_property, +) + +from typing import ClassVar + + +class TeamHierarchyMembersOffsetPageType(ModelSimple): + """ + Pagination mode. + + :param value: If omitted defaults to "offset_limit". Must be one of ["offset_limit"]. + :type value: str + """ + + allowed_values = { + "offset_limit", + } + OFFSET_LIMIT: ClassVar["TeamHierarchyMembersOffsetPageType"] + + @cached_property + def openapi_types(_): + return { + "value": (str,), + } + + +TeamHierarchyMembersOffsetPageType.OFFSET_LIMIT = TeamHierarchyMembersOffsetPageType("offset_limit") diff --git a/src/datadog_api_client/v2/model/team_hierarchy_members_page.py b/src/datadog_api_client/v2/model/team_hierarchy_members_page.py new file mode 100644 index 0000000000..8d1fc01b90 --- /dev/null +++ b/src/datadog_api_client/v2/model/team_hierarchy_members_page.py @@ -0,0 +1,79 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + + +from datadog_api_client.model_utils import ( + ModelComposed, + cached_property, +) + + +class TeamHierarchyMembersPage(ModelComposed): + def __init__(self, **kwargs): + """ + Pagination metadata for the selected pagination mode. + + :param first_offset: First offset. + :type first_offset: int + + :param last_offset: Last offset. Null when unavailable. + :type last_offset: int, none_type + + :param limit: Maximum number of members per page. + :type limit: int + + :param next_offset: Next offset. Null when unavailable. + :type next_offset: int, none_type + + :param offset: Current offset. + :type offset: int + + :param prev_offset: Previous offset. Null when unavailable. + :type prev_offset: int, none_type + + :param total: Total number of members matching the filters. + :type total: int + + :param type: Pagination mode. + :type type: TeamHierarchyMembersOffsetPageType + + :param first_number: First page number. + :type first_number: int + + :param last_number: Last page number. Null when unavailable. + :type last_number: int, none_type + + :param next_number: Next page number. Null when unavailable. + :type next_number: int, none_type + + :param number: Current zero-based page number. + :type number: int + + :param prev_number: Previous page number. Null when unavailable. + :type prev_number: int, none_type + + :param size: Maximum number of members per page. + :type size: int + """ + super().__init__(kwargs) + + @cached_property + def _composed_schemas(_): + # we need this here to make our import statements work + # we must store _composed_schemas in here so the code is only run + # when we invoke this method. If we kept this at the class + # level we would get an error because the class level + # code would be run when this module is imported, and these composed + # classes don't exist yet because their module has not finished + # loading + from datadog_api_client.v2.model.team_hierarchy_members_offset_page import TeamHierarchyMembersOffsetPage + from datadog_api_client.v2.model.team_hierarchy_members_number_page import TeamHierarchyMembersNumberPage + + return { + "oneOf": [ + TeamHierarchyMembersOffsetPage, + TeamHierarchyMembersNumberPage, + ], + } diff --git a/src/datadog_api_client/v2/model/team_hierarchy_members_response.py b/src/datadog_api_client/v2/model/team_hierarchy_members_response.py new file mode 100644 index 0000000000..4288c3b653 --- /dev/null +++ b/src/datadog_api_client/v2/model/team_hierarchy_members_response.py @@ -0,0 +1,78 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import List, Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.team_hierarchy_member import TeamHierarchyMember + from datadog_api_client.v2.model.team_hierarchy_member_included import TeamHierarchyMemberIncluded + from datadog_api_client.v2.model.team_hierarchy_members_response_links import TeamHierarchyMembersResponseLinks + from datadog_api_client.v2.model.team_hierarchy_members_response_meta import TeamHierarchyMembersResponseMeta + from datadog_api_client.v2.model.team_hierarchy_member_user import TeamHierarchyMemberUser + from datadog_api_client.v2.model.team_hierarchy_member_team import TeamHierarchyMemberTeam + + +class TeamHierarchyMembersResponse(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.team_hierarchy_member import TeamHierarchyMember + from datadog_api_client.v2.model.team_hierarchy_member_included import TeamHierarchyMemberIncluded + from datadog_api_client.v2.model.team_hierarchy_members_response_links import TeamHierarchyMembersResponseLinks + from datadog_api_client.v2.model.team_hierarchy_members_response_meta import TeamHierarchyMembersResponseMeta + + return { + "data": ([TeamHierarchyMember],), + "included": ([TeamHierarchyMemberIncluded],), + "links": (TeamHierarchyMembersResponseLinks,), + "meta": (TeamHierarchyMembersResponseMeta,), + } + + attribute_map = { + "data": "data", + "included": "included", + "links": "links", + "meta": "meta", + } + + def __init__( + self_, + data: List[TeamHierarchyMember], + links: TeamHierarchyMembersResponseLinks, + meta: TeamHierarchyMembersResponseMeta, + included: Union[ + List[Union[TeamHierarchyMemberIncluded, TeamHierarchyMemberUser, TeamHierarchyMemberTeam]], UnsetType + ] = unset, + **kwargs, + ): + """ + Direct and inherited members of the requested team. + + :param data: Membership relationships for users who belong to the requested team or inherit membership through its descendant teams. Each user appears once, even if they belong to multiple teams in the hierarchy. Each relationship identifies the user and requested team, and indicates whether the user is a direct member of the requested team. + :type data: [TeamHierarchyMember] + + :param included: Requested users and the team. May be absent when the result is empty, even if requested. + :type included: [TeamHierarchyMemberIncluded], optional + + :param links: Page navigation links. Unavailable links are omitted. + :type links: TeamHierarchyMembersResponseLinks + + :param meta: Pagination metadata for the filtered members. + :type meta: TeamHierarchyMembersResponseMeta + """ + if included is not unset: + kwargs["included"] = included + super().__init__(kwargs) + + self_.data = data + self_.links = links + self_.meta = meta diff --git a/src/datadog_api_client/v2/model/team_hierarchy_members_response_links.py b/src/datadog_api_client/v2/model/team_hierarchy_members_response_links.py new file mode 100644 index 0000000000..f531a216f5 --- /dev/null +++ b/src/datadog_api_client/v2/model/team_hierarchy_members_response_links.py @@ -0,0 +1,72 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, + unset, + UnsetType, +) + + +class TeamHierarchyMembersResponseLinks(ModelNormal): + @cached_property + def openapi_types(_): + return { + "first": (str,), + "last": (str,), + "next": (str,), + "prev": (str,), + "self": (str,), + } + + attribute_map = { + "first": "first", + "last": "last", + "next": "next", + "prev": "prev", + "self": "self", + } + + def __init__( + self_, + first: Union[str, UnsetType] = unset, + last: Union[str, UnsetType] = unset, + next: Union[str, UnsetType] = unset, + prev: Union[str, UnsetType] = unset, + self: Union[str, UnsetType] = unset, + **kwargs, + ): + """ + Page navigation links. Unavailable links are omitted. + + :param first: First page URL. + :type first: str, optional + + :param last: Last page URL. + :type last: str, optional + + :param next: Next page URL. + :type next: str, optional + + :param prev: Previous page URL. + :type prev: str, optional + + :param self: Current page URL. + :type self: str, optional + """ + if first is not unset: + kwargs["first"] = first + if last is not unset: + kwargs["last"] = last + if next is not unset: + kwargs["next"] = next + if prev is not unset: + kwargs["prev"] = prev + if self is not unset: + kwargs["self"] = self + super().__init__(kwargs) diff --git a/src/datadog_api_client/v2/model/team_hierarchy_members_response_meta.py b/src/datadog_api_client/v2/model/team_hierarchy_members_response_meta.py new file mode 100644 index 0000000000..4ebb7f1d9d --- /dev/null +++ b/src/datadog_api_client/v2/model/team_hierarchy_members_response_meta.py @@ -0,0 +1,46 @@ +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. +# This product includes software developed at Datadog (https://www.datadoghq.com/). +# Copyright 2019-Present Datadog, Inc. +from __future__ import annotations + +from typing import Union, TYPE_CHECKING + +from datadog_api_client.model_utils import ( + ModelNormal, + cached_property, +) + + +if TYPE_CHECKING: + from datadog_api_client.v2.model.team_hierarchy_members_page import TeamHierarchyMembersPage + from datadog_api_client.v2.model.team_hierarchy_members_offset_page import TeamHierarchyMembersOffsetPage + from datadog_api_client.v2.model.team_hierarchy_members_number_page import TeamHierarchyMembersNumberPage + + +class TeamHierarchyMembersResponseMeta(ModelNormal): + @cached_property + def openapi_types(_): + from datadog_api_client.v2.model.team_hierarchy_members_page import TeamHierarchyMembersPage + + return { + "page": (TeamHierarchyMembersPage,), + } + + attribute_map = { + "page": "page", + } + + def __init__( + self_, + page: Union[TeamHierarchyMembersPage, TeamHierarchyMembersOffsetPage, TeamHierarchyMembersNumberPage], + **kwargs, + ): + """ + Pagination metadata for the filtered members. + + :param page: Pagination metadata for the selected pagination mode. + :type page: TeamHierarchyMembersPage + """ + super().__init__(kwargs) + + self_.page = page diff --git a/src/datadog_api_client/v2/models/__init__.py b/src/datadog_api_client/v2/models/__init__.py index bb0b15367f..f275dd5276 100644 --- a/src/datadog_api_client/v2/models/__init__.py +++ b/src/datadog_api_client/v2/models/__init__.py @@ -11848,6 +11848,27 @@ from datadog_api_client.v2.model.team_hierarchy_link_team_relationship import TeamHierarchyLinkTeamRelationship from datadog_api_client.v2.model.team_hierarchy_link_type import TeamHierarchyLinkType from datadog_api_client.v2.model.team_hierarchy_links_response import TeamHierarchyLinksResponse +from datadog_api_client.v2.model.team_hierarchy_member import TeamHierarchyMember +from datadog_api_client.v2.model.team_hierarchy_member_attributes import TeamHierarchyMemberAttributes +from datadog_api_client.v2.model.team_hierarchy_member_included import TeamHierarchyMemberIncluded +from datadog_api_client.v2.model.team_hierarchy_member_relationships import TeamHierarchyMemberRelationships +from datadog_api_client.v2.model.team_hierarchy_member_team import TeamHierarchyMemberTeam +from datadog_api_client.v2.model.team_hierarchy_member_team_attributes import TeamHierarchyMemberTeamAttributes +from datadog_api_client.v2.model.team_hierarchy_member_team_data import TeamHierarchyMemberTeamData +from datadog_api_client.v2.model.team_hierarchy_member_team_relationship import TeamHierarchyMemberTeamRelationship +from datadog_api_client.v2.model.team_hierarchy_member_team_type import TeamHierarchyMemberTeamType +from datadog_api_client.v2.model.team_hierarchy_member_type import TeamHierarchyMemberType +from datadog_api_client.v2.model.team_hierarchy_member_user import TeamHierarchyMemberUser +from datadog_api_client.v2.model.team_hierarchy_member_user_data import TeamHierarchyMemberUserData +from datadog_api_client.v2.model.team_hierarchy_member_user_relationship import TeamHierarchyMemberUserRelationship +from datadog_api_client.v2.model.team_hierarchy_members_number_page import TeamHierarchyMembersNumberPage +from datadog_api_client.v2.model.team_hierarchy_members_number_page_type import TeamHierarchyMembersNumberPageType +from datadog_api_client.v2.model.team_hierarchy_members_offset_page import TeamHierarchyMembersOffsetPage +from datadog_api_client.v2.model.team_hierarchy_members_offset_page_type import TeamHierarchyMembersOffsetPageType +from datadog_api_client.v2.model.team_hierarchy_members_page import TeamHierarchyMembersPage +from datadog_api_client.v2.model.team_hierarchy_members_response import TeamHierarchyMembersResponse +from datadog_api_client.v2.model.team_hierarchy_members_response_links import TeamHierarchyMembersResponseLinks +from datadog_api_client.v2.model.team_hierarchy_members_response_meta import TeamHierarchyMembersResponseMeta from datadog_api_client.v2.model.team_included import TeamIncluded from datadog_api_client.v2.model.team_link import TeamLink from datadog_api_client.v2.model.team_link_attributes import TeamLinkAttributes @@ -20754,6 +20775,27 @@ "TeamHierarchyLinkTeamRelationship", "TeamHierarchyLinkType", "TeamHierarchyLinksResponse", + "TeamHierarchyMember", + "TeamHierarchyMemberAttributes", + "TeamHierarchyMemberIncluded", + "TeamHierarchyMemberRelationships", + "TeamHierarchyMemberTeam", + "TeamHierarchyMemberTeamAttributes", + "TeamHierarchyMemberTeamData", + "TeamHierarchyMemberTeamRelationship", + "TeamHierarchyMemberTeamType", + "TeamHierarchyMemberType", + "TeamHierarchyMemberUser", + "TeamHierarchyMemberUserData", + "TeamHierarchyMemberUserRelationship", + "TeamHierarchyMembersNumberPage", + "TeamHierarchyMembersNumberPageType", + "TeamHierarchyMembersOffsetPage", + "TeamHierarchyMembersOffsetPageType", + "TeamHierarchyMembersPage", + "TeamHierarchyMembersResponse", + "TeamHierarchyMembersResponseLinks", + "TeamHierarchyMembersResponseMeta", "TeamIncluded", "TeamLink", "TeamLinkAttributes", diff --git a/tests/generated-test/test-runner-data/manifest.json b/tests/generated-test/test-runner-data/manifest.json index 8131b0f6f4..05975d4681 100644 --- a/tests/generated-test/test-runner-data/manifest.json +++ b/tests/generated-test/test-runner-data/manifest.json @@ -12292,6 +12292,90 @@ "scenario": "Get team hierarchy links returns \"OK\" response", "version": "v2" }, + { + "feature": "Teams", + "feature_file": "../../v2/features/teams.feature", + "file": "v2/teams/get-team-hierarchy-members-deduplicates-direct-and-inherited-membership.json", + "scenario": "Get team hierarchy members deduplicates direct and inherited membership", + "version": "v2" + }, + { + "feature": "Teams", + "feature_file": "../../v2/features/teams.feature", + "file": "v2/teams/get-team-hierarchy-members-filters-direct-members.json", + "scenario": "Get team hierarchy members filters direct members", + "version": "v2" + }, + { + "feature": "Teams", + "feature_file": "../../v2/features/teams.feature", + "file": "v2/teams/get-team-hierarchy-members-filters-names-case-insensitively.json", + "scenario": "Get team hierarchy members filters names case insensitively", + "version": "v2" + }, + { + "feature": "Teams", + "feature_file": "../../v2/features/teams.feature", + "file": "v2/teams/get-team-hierarchy-members-includes-inherited-users-with-null-root-membership-attributes.json", + "scenario": "Get team hierarchy members includes inherited users with null root membership attributes", + "version": "v2" + }, + { + "feature": "Teams", + "feature_file": "../../v2/features/teams.feature", + "file": "v2/teams/get-team-hierarchy-members-paginates-by-number-and-size.json", + "scenario": "Get team hierarchy members paginates by number and size", + "version": "v2" + }, + { + "feature": "Teams", + "feature_file": "../../v2/features/teams.feature", + "file": "v2/teams/get-team-hierarchy-members-rejects-unsupported-includes.json", + "scenario": "Get team hierarchy members rejects unsupported includes", + "version": "v2" + }, + { + "feature": "Teams", + "feature_file": "../../v2/features/teams.feature", + "file": "v2/teams/get-team-hierarchy-members-returns-bad-request-response.json", + "scenario": "Get team hierarchy members returns \"Bad Request\" response", + "version": "v2" + }, + { + "feature": "Teams", + "feature_file": "../../v2/features/teams.feature", + "file": "v2/teams/get-team-hierarchy-members-returns-not-found-response.json", + "scenario": "Get team hierarchy members returns \"Not Found\" response", + "version": "v2" + }, + { + "feature": "Teams", + "feature_file": "../../v2/features/teams.feature", + "file": "v2/teams/get-team-hierarchy-members-returns-ok-response.json", + "scenario": "Get team hierarchy members returns \"OK\" response", + "version": "v2" + }, + { + "feature": "Teams", + "feature_file": "../../v2/features/teams.feature", + "file": "v2/teams/get-team-hierarchy-members-returns-ok-response-with-pagination.json", + "scenario": "Get team hierarchy members returns \"OK\" response with pagination", + "version": "v2" + }, + { + "feature": "Teams", + "feature_file": "../../v2/features/teams.feature", + "file": "v2/teams/get-team-hierarchy-members-returns-empty-results.json", + "scenario": "Get team hierarchy members returns empty results", + "version": "v2" + }, + { + "feature": "Teams", + "feature_file": "../../v2/features/teams.feature", + "file": "v2/teams/get-team-hierarchy-members-sorts-inherited-members-before-direct-members.json", + "scenario": "Get team hierarchy members sorts inherited members before direct members", + "version": "v2" + }, { "feature": "Teams", "feature_file": "../../v2/features/teams.feature", diff --git a/tests/generated-test/test-runner-data/v2/teams/get-team-hierarchy-members-deduplicates-direct-and-inherited-membership.json b/tests/generated-test/test-runner-data/v2/teams/get-team-hierarchy-members-deduplicates-direct-and-inherited-membership.json new file mode 100644 index 0000000000..689768d33f --- /dev/null +++ b/tests/generated-test/test-runner-data/v2/teams/get-team-hierarchy-members-deduplicates-direct-and-inherited-membership.json @@ -0,0 +1,83 @@ +{ + "api": "Teams", + "expected_status": 200, + "feature": "Teams", + "id": "v2/Teams/Get team hierarchy members deduplicates direct and inherited membership", + "operation_id": "ListTeamHierarchyMembers", + "request": { + "body": null, + "content_type": null, + "method": "GET", + "pagination": false, + "parameters": [ + { + "explode": null, + "in": "path", + "name": "team_id", + "required": true, + "schema": { + "format": null, + "ref": null, + "type": "string" + }, + "source": { + "path": "dd_team.data.id", + "type": "fixture" + }, + "style": null + }, + { + "explode": null, + "in": "query", + "name": "filter[keyword]", + "required": false, + "schema": { + "format": null, + "ref": null, + "type": "string" + }, + "source": { + "type": "literal", + "value": "{{ unique }}" + }, + "style": null + }, + { + "explode": null, + "in": "query", + "name": "sort", + "required": false, + "schema": { + "format": null, + "ref": null, + "type": "string" + }, + "source": { + "type": "literal", + "value": "-is_direct,handle" + }, + "style": null + }, + { + "explode": null, + "in": "query", + "name": "include", + "required": false, + "schema": { + "format": null, + "ref": null, + "type": "string" + }, + "source": { + "type": "literal", + "value": "team" + }, + "style": null + } + ], + "path": "/api/v2/team/{team_id}/members" + }, + "scenario": "Get team hierarchy members deduplicates direct and inherited membership", + "schema_version": 1, + "version": "v2" +} diff --git a/tests/generated-test/test-runner-data/v2/teams/get-team-hierarchy-members-filters-direct-members.json b/tests/generated-test/test-runner-data/v2/teams/get-team-hierarchy-members-filters-direct-members.json new file mode 100644 index 0000000000..7bc6e79275 --- /dev/null +++ b/tests/generated-test/test-runner-data/v2/teams/get-team-hierarchy-members-filters-direct-members.json @@ -0,0 +1,83 @@ +{ + "api": "Teams", + "expected_status": 200, + "feature": "Teams", + "id": "v2/Teams/Get team hierarchy members filters direct members", + "operation_id": "ListTeamHierarchyMembers", + "request": { + "body": null, + "content_type": null, + "method": "GET", + "pagination": false, + "parameters": [ + { + "explode": null, + "in": "path", + "name": "team_id", + "required": true, + "schema": { + "format": null, + "ref": null, + "type": "string" + }, + "source": { + "path": "dd_team.data.id", + "type": "fixture" + }, + "style": null + }, + { + "explode": null, + "in": "query", + "name": "filter[keyword]", + "required": false, + "schema": { + "format": null, + "ref": null, + "type": "string" + }, + "source": { + "type": "literal", + "value": "{{ unique }}" + }, + "style": null + }, + { + "explode": null, + "in": "query", + "name": "filter[is_direct_only]", + "required": false, + "schema": { + "format": null, + "ref": null, + "type": "boolean" + }, + "source": { + "type": "literal", + "value": true + }, + "style": null + }, + { + "explode": null, + "in": "query", + "name": "filter[include_service_accounts]", + "required": false, + "schema": { + "format": null, + "ref": null, + "type": "boolean" + }, + "source": { + "type": "literal", + "value": false + }, + "style": null + } + ], + "path": "/api/v2/team/{team_id}/members" + }, + "scenario": "Get team hierarchy members filters direct members", + "schema_version": 1, + "version": "v2" +} diff --git a/tests/generated-test/test-runner-data/v2/teams/get-team-hierarchy-members-filters-names-case-insensitively.json b/tests/generated-test/test-runner-data/v2/teams/get-team-hierarchy-members-filters-names-case-insensitively.json new file mode 100644 index 0000000000..7f97446129 --- /dev/null +++ b/tests/generated-test/test-runner-data/v2/teams/get-team-hierarchy-members-filters-names-case-insensitively.json @@ -0,0 +1,51 @@ +{ + "api": "Teams", + "expected_status": 200, + "feature": "Teams", + "id": "v2/Teams/Get team hierarchy members filters names case insensitively", + "operation_id": "ListTeamHierarchyMembers", + "request": { + "body": null, + "content_type": null, + "method": "GET", + "pagination": false, + "parameters": [ + { + "explode": null, + "in": "path", + "name": "team_id", + "required": true, + "schema": { + "format": null, + "ref": null, + "type": "string" + }, + "source": { + "path": "dd_team.data.id", + "type": "fixture" + }, + "style": null + }, + { + "explode": null, + "in": "query", + "name": "filter[keyword]", + "required": false, + "schema": { + "format": null, + "ref": null, + "type": "string" + }, + "source": { + "type": "literal", + "value": "hIeRaRcHy MeMbEr" + }, + "style": null + } + ], + "path": "/api/v2/team/{team_id}/members" + }, + "scenario": "Get team hierarchy members filters names case insensitively", + "schema_version": 1, + "version": "v2" +} diff --git a/tests/generated-test/test-runner-data/v2/teams/get-team-hierarchy-members-includes-inherited-users-with-null-root-membership-attributes.json b/tests/generated-test/test-runner-data/v2/teams/get-team-hierarchy-members-includes-inherited-users-with-null-root-membership-attributes.json new file mode 100644 index 0000000000..4f78587a48 --- /dev/null +++ b/tests/generated-test/test-runner-data/v2/teams/get-team-hierarchy-members-includes-inherited-users-with-null-root-membership-attributes.json @@ -0,0 +1,67 @@ +{ + "api": "Teams", + "expected_status": 200, + "feature": "Teams", + "id": "v2/Teams/Get team hierarchy members includes inherited users with null root membership attributes", + "operation_id": "ListTeamHierarchyMembers", + "request": { + "body": null, + "content_type": null, + "method": "GET", + "pagination": false, + "parameters": [ + { + "explode": null, + "in": "path", + "name": "team_id", + "required": true, + "schema": { + "format": null, + "ref": null, + "type": "string" + }, + "source": { + "path": "dd_team.data.id", + "type": "fixture" + }, + "style": null + }, + { + "explode": null, + "in": "query", + "name": "filter[keyword]", + "required": false, + "schema": { + "format": null, + "ref": null, + "type": "string" + }, + "source": { + "type": "literal", + "value": "{{ unique }}" + }, + "style": null + }, + { + "explode": null, + "in": "query", + "name": "include", + "required": false, + "schema": { + "format": null, + "ref": null, + "type": "string" + }, + "source": { + "type": "literal", + "value": "user,team" + }, + "style": null + } + ], + "path": "/api/v2/team/{team_id}/members" + }, + "scenario": "Get team hierarchy members includes inherited users with null root membership attributes", + "schema_version": 1, + "version": "v2" +} diff --git a/tests/generated-test/test-runner-data/v2/teams/get-team-hierarchy-members-paginates-by-number-and-size.json b/tests/generated-test/test-runner-data/v2/teams/get-team-hierarchy-members-paginates-by-number-and-size.json new file mode 100644 index 0000000000..a99d33b2af --- /dev/null +++ b/tests/generated-test/test-runner-data/v2/teams/get-team-hierarchy-members-paginates-by-number-and-size.json @@ -0,0 +1,99 @@ +{ + "api": "Teams", + "expected_status": 200, + "feature": "Teams", + "id": "v2/Teams/Get team hierarchy members paginates by number and size", + "operation_id": "ListTeamHierarchyMembers", + "request": { + "body": null, + "content_type": null, + "method": "GET", + "pagination": false, + "parameters": [ + { + "explode": null, + "in": "path", + "name": "team_id", + "required": true, + "schema": { + "format": null, + "ref": null, + "type": "string" + }, + "source": { + "path": "dd_team.data.id", + "type": "fixture" + }, + "style": null + }, + { + "explode": null, + "in": "query", + "name": "filter[keyword]", + "required": false, + "schema": { + "format": null, + "ref": null, + "type": "string" + }, + "source": { + "type": "literal", + "value": "{{ unique }}" + }, + "style": null + }, + { + "explode": null, + "in": "query", + "name": "sort", + "required": false, + "schema": { + "format": null, + "ref": null, + "type": "string" + }, + "source": { + "type": "literal", + "value": "-is_direct" + }, + "style": null + }, + { + "explode": null, + "in": "query", + "name": "page[number]", + "required": false, + "schema": { + "format": "int64", + "ref": null, + "type": "integer" + }, + "source": { + "type": "literal", + "value": 1 + }, + "style": null + }, + { + "explode": null, + "in": "query", + "name": "page[size]", + "required": false, + "schema": { + "format": "int64", + "ref": null, + "type": "integer" + }, + "source": { + "type": "literal", + "value": 1 + }, + "style": null + } + ], + "path": "/api/v2/team/{team_id}/members" + }, + "scenario": "Get team hierarchy members paginates by number and size", + "schema_version": 1, + "version": "v2" +} diff --git a/tests/generated-test/test-runner-data/v2/teams/get-team-hierarchy-members-rejects-unsupported-includes.json b/tests/generated-test/test-runner-data/v2/teams/get-team-hierarchy-members-rejects-unsupported-includes.json new file mode 100644 index 0000000000..a1f419ed30 --- /dev/null +++ b/tests/generated-test/test-runner-data/v2/teams/get-team-hierarchy-members-rejects-unsupported-includes.json @@ -0,0 +1,51 @@ +{ + "api": "Teams", + "expected_status": 400, + "feature": "Teams", + "id": "v2/Teams/Get team hierarchy members rejects unsupported includes", + "operation_id": "ListTeamHierarchyMembers", + "request": { + "body": null, + "content_type": null, + "method": "GET", + "pagination": false, + "parameters": [ + { + "explode": null, + "in": "path", + "name": "team_id", + "required": true, + "schema": { + "format": null, + "ref": null, + "type": "string" + }, + "source": { + "path": "dd_team.data.id", + "type": "fixture" + }, + "style": null + }, + { + "explode": null, + "in": "query", + "name": "include", + "required": false, + "schema": { + "format": null, + "ref": null, + "type": "string" + }, + "source": { + "type": "literal", + "value": "descendants" + }, + "style": null + } + ], + "path": "/api/v2/team/{team_id}/members" + }, + "scenario": "Get team hierarchy members rejects unsupported includes", + "schema_version": 1, + "version": "v2" +} diff --git a/tests/generated-test/test-runner-data/v2/teams/get-team-hierarchy-members-returns-bad-request-response.json b/tests/generated-test/test-runner-data/v2/teams/get-team-hierarchy-members-returns-bad-request-response.json new file mode 100644 index 0000000000..c3082efdec --- /dev/null +++ b/tests/generated-test/test-runner-data/v2/teams/get-team-hierarchy-members-returns-bad-request-response.json @@ -0,0 +1,51 @@ +{ + "api": "Teams", + "expected_status": 400, + "feature": "Teams", + "id": "v2/Teams/Get team hierarchy members returns \"Bad Request\" response", + "operation_id": "ListTeamHierarchyMembers", + "request": { + "body": null, + "content_type": null, + "method": "GET", + "pagination": false, + "parameters": [ + { + "explode": null, + "in": "path", + "name": "team_id", + "required": true, + "schema": { + "format": null, + "ref": null, + "type": "string" + }, + "source": { + "path": "dd_team.data.id", + "type": "fixture" + }, + "style": null + }, + { + "explode": null, + "in": "query", + "name": "sort", + "required": false, + "schema": { + "format": null, + "ref": null, + "type": "string" + }, + "source": { + "type": "literal", + "value": "invalid" + }, + "style": null + } + ], + "path": "/api/v2/team/{team_id}/members" + }, + "scenario": "Get team hierarchy members returns \"Bad Request\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/tests/generated-test/test-runner-data/v2/teams/get-team-hierarchy-members-returns-empty-results.json b/tests/generated-test/test-runner-data/v2/teams/get-team-hierarchy-members-returns-empty-results.json new file mode 100644 index 0000000000..4f5c4090df --- /dev/null +++ b/tests/generated-test/test-runner-data/v2/teams/get-team-hierarchy-members-returns-empty-results.json @@ -0,0 +1,67 @@ +{ + "api": "Teams", + "expected_status": 200, + "feature": "Teams", + "id": "v2/Teams/Get team hierarchy members returns empty results", + "operation_id": "ListTeamHierarchyMembers", + "request": { + "body": null, + "content_type": null, + "method": "GET", + "pagination": false, + "parameters": [ + { + "explode": null, + "in": "path", + "name": "team_id", + "required": true, + "schema": { + "format": null, + "ref": null, + "type": "string" + }, + "source": { + "path": "dd_team.data.id", + "type": "fixture" + }, + "style": null + }, + { + "explode": null, + "in": "query", + "name": "filter[keyword]", + "required": false, + "schema": { + "format": null, + "ref": null, + "type": "string" + }, + "source": { + "type": "literal", + "value": "no-matching-member-{{ unique }}" + }, + "style": null + }, + { + "explode": null, + "in": "query", + "name": "include", + "required": false, + "schema": { + "format": null, + "ref": null, + "type": "string" + }, + "source": { + "type": "literal", + "value": "user,team" + }, + "style": null + } + ], + "path": "/api/v2/team/{team_id}/members" + }, + "scenario": "Get team hierarchy members returns empty results", + "schema_version": 1, + "version": "v2" +} diff --git a/tests/generated-test/test-runner-data/v2/teams/get-team-hierarchy-members-returns-not-found-response.json b/tests/generated-test/test-runner-data/v2/teams/get-team-hierarchy-members-returns-not-found-response.json new file mode 100644 index 0000000000..4b7774831d --- /dev/null +++ b/tests/generated-test/test-runner-data/v2/teams/get-team-hierarchy-members-returns-not-found-response.json @@ -0,0 +1,35 @@ +{ + "api": "Teams", + "expected_status": 404, + "feature": "Teams", + "id": "v2/Teams/Get team hierarchy members returns \"Not Found\" response", + "operation_id": "ListTeamHierarchyMembers", + "request": { + "body": null, + "content_type": null, + "method": "GET", + "pagination": false, + "parameters": [ + { + "explode": null, + "in": "path", + "name": "team_id", + "required": true, + "schema": { + "format": null, + "ref": null, + "type": "string" + }, + "source": { + "type": "literal", + "value": "00000000-0000-4000-8000-000000000000" + }, + "style": null + } + ], + "path": "/api/v2/team/{team_id}/members" + }, + "scenario": "Get team hierarchy members returns \"Not Found\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/tests/generated-test/test-runner-data/v2/teams/get-team-hierarchy-members-returns-ok-response-with-pagination.json b/tests/generated-test/test-runner-data/v2/teams/get-team-hierarchy-members-returns-ok-response-with-pagination.json new file mode 100644 index 0000000000..afcee1cb15 --- /dev/null +++ b/tests/generated-test/test-runner-data/v2/teams/get-team-hierarchy-members-returns-ok-response-with-pagination.json @@ -0,0 +1,67 @@ +{ + "api": "Teams", + "expected_status": 200, + "feature": "Teams", + "id": "v2/Teams/Get team hierarchy members returns \"OK\" response with pagination", + "operation_id": "ListTeamHierarchyMembers", + "request": { + "body": null, + "content_type": null, + "method": "GET", + "pagination": true, + "parameters": [ + { + "explode": null, + "in": "path", + "name": "team_id", + "required": true, + "schema": { + "format": null, + "ref": null, + "type": "string" + }, + "source": { + "path": "dd_team.data.id", + "type": "fixture" + }, + "style": null + }, + { + "explode": null, + "in": "query", + "name": "filter[keyword]", + "required": false, + "schema": { + "format": null, + "ref": null, + "type": "string" + }, + "source": { + "type": "literal", + "value": "{{ unique }}" + }, + "style": null + }, + { + "explode": null, + "in": "query", + "name": "page[size]", + "required": false, + "schema": { + "format": "int64", + "ref": null, + "type": "integer" + }, + "source": { + "type": "literal", + "value": 1 + }, + "style": null + } + ], + "path": "/api/v2/team/{team_id}/members" + }, + "scenario": "Get team hierarchy members returns \"OK\" response with pagination", + "schema_version": 1, + "version": "v2" +} diff --git a/tests/generated-test/test-runner-data/v2/teams/get-team-hierarchy-members-returns-ok-response.json b/tests/generated-test/test-runner-data/v2/teams/get-team-hierarchy-members-returns-ok-response.json new file mode 100644 index 0000000000..c83daecae4 --- /dev/null +++ b/tests/generated-test/test-runner-data/v2/teams/get-team-hierarchy-members-returns-ok-response.json @@ -0,0 +1,67 @@ +{ + "api": "Teams", + "expected_status": 200, + "feature": "Teams", + "id": "v2/Teams/Get team hierarchy members returns \"OK\" response", + "operation_id": "ListTeamHierarchyMembers", + "request": { + "body": null, + "content_type": null, + "method": "GET", + "pagination": false, + "parameters": [ + { + "explode": null, + "in": "path", + "name": "team_id", + "required": true, + "schema": { + "format": null, + "ref": null, + "type": "string" + }, + "source": { + "path": "dd_team.data.id", + "type": "fixture" + }, + "style": null + }, + { + "explode": null, + "in": "query", + "name": "filter[keyword]", + "required": false, + "schema": { + "format": null, + "ref": null, + "type": "string" + }, + "source": { + "type": "literal", + "value": "{{ user.data.attributes.email }}" + }, + "style": null + }, + { + "explode": null, + "in": "query", + "name": "include", + "required": false, + "schema": { + "format": null, + "ref": null, + "type": "string" + }, + "source": { + "type": "literal", + "value": "user,team" + }, + "style": null + } + ], + "path": "/api/v2/team/{team_id}/members" + }, + "scenario": "Get team hierarchy members returns \"OK\" response", + "schema_version": 1, + "version": "v2" +} diff --git a/tests/generated-test/test-runner-data/v2/teams/get-team-hierarchy-members-sorts-inherited-members-before-direct-members.json b/tests/generated-test/test-runner-data/v2/teams/get-team-hierarchy-members-sorts-inherited-members-before-direct-members.json new file mode 100644 index 0000000000..493d99f66b --- /dev/null +++ b/tests/generated-test/test-runner-data/v2/teams/get-team-hierarchy-members-sorts-inherited-members-before-direct-members.json @@ -0,0 +1,67 @@ +{ + "api": "Teams", + "expected_status": 200, + "feature": "Teams", + "id": "v2/Teams/Get team hierarchy members sorts inherited members before direct members", + "operation_id": "ListTeamHierarchyMembers", + "request": { + "body": null, + "content_type": null, + "method": "GET", + "pagination": false, + "parameters": [ + { + "explode": null, + "in": "path", + "name": "team_id", + "required": true, + "schema": { + "format": null, + "ref": null, + "type": "string" + }, + "source": { + "path": "dd_team.data.id", + "type": "fixture" + }, + "style": null + }, + { + "explode": null, + "in": "query", + "name": "filter[keyword]", + "required": false, + "schema": { + "format": null, + "ref": null, + "type": "string" + }, + "source": { + "type": "literal", + "value": "{{ unique }}" + }, + "style": null + }, + { + "explode": null, + "in": "query", + "name": "sort", + "required": false, + "schema": { + "format": null, + "ref": null, + "type": "string" + }, + "source": { + "type": "literal", + "value": "is_direct,-name" + }, + "style": null + } + ], + "path": "/api/v2/team/{team_id}/members" + }, + "scenario": "Get team hierarchy members sorts inherited members before direct members", + "schema_version": 1, + "version": "v2" +} diff --git a/tests/generated-test/test-server-data/v2/teams.json b/tests/generated-test/test-server-data/v2/teams.json index 155df675f1..ae078ac4c8 100644 --- a/tests/generated-test/test-server-data/v2/teams.json +++ b/tests/generated-test/test-server-data/v2/teams.json @@ -3730,6 +3730,3654 @@ "scenario": "Get team hierarchy links returns \"OK\" response", "version": "v2" }, + { + "feature": "Teams", + "frozen_at": "2026-10-20T16:17:15.165Z", + "interactions": [ + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "handle": "test-handle-c36a7248a9067833", + "name": "test-name-c36a7248a9067833" + }, + "type": "team" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/team", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"c431b345-4b84-4c7b-a4f2-a3bd3773a0bc\",\"type\":\"team\",\"attributes\":{\"avatar\":null,\"banner\":14,\"created_at\":\"2026-10-20T16:17:17.323875+00:00\",\"description\":null,\"handle\":\"test-handle-c36a7248a9067833\",\"hidden_modules\":null,\"is_managed\":false,\"link_count\":0,\"modified_at\":\"2026-10-20T16:17:17.323876+00:00\",\"name\":\"test-name-c36a7248a9067833\",\"summary\":null,\"user_count\":0,\"visible_modules\":null},\"relationships\":{\"team_links\":{\"data\":[],\"links\":{\"related\":\"/api/v2/team/c431b345-4b84-4c7b-a4f2-a3bd3773a0bc/links\"}},\"user_team_permissions\":{\"data\":null,\"links\":{\"related\":\"/api/v2/team/c431b345-4b84-4c7b-a4f2-a3bd3773a0bc/permission-settings\"}}}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "handle": "test-handle-2-c36a7248a9067833", + "name": "test-name-2-c36a7248a9067833" + }, + "type": "team" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/team", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"c8984857-6077-47d3-a2e0-6ecd0ad002ef\",\"type\":\"team\",\"attributes\":{\"avatar\":null,\"banner\":9,\"created_at\":\"2026-10-20T16:17:17.572334+00:00\",\"description\":null,\"handle\":\"test-handle-2-c36a7248a9067833\",\"hidden_modules\":null,\"is_managed\":false,\"link_count\":0,\"modified_at\":\"2026-10-20T16:17:17.572334+00:00\",\"name\":\"test-name-2-c36a7248a9067833\",\"summary\":null,\"user_count\":0,\"visible_modules\":null},\"relationships\":{\"team_links\":{\"data\":[],\"links\":{\"related\":\"/api/v2/team/c8984857-6077-47d3-a2e0-6ecd0ad002ef/links\"}},\"user_team_permissions\":{\"data\":null,\"links\":{\"related\":\"/api/v2/team/c8984857-6077-47d3-a2e0-6ecd0ad002ef/permission-settings\"}}}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "relationships": { + "parent_team": { + "data": { + "id": "c431b345-4b84-4c7b-a4f2-a3bd3773a0bc", + "type": "team" + } + }, + "sub_team": { + "data": { + "id": "c8984857-6077-47d3-a2e0-6ecd0ad002ef", + "type": "team" + } + } + }, + "type": "team_hierarchy_links" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/team-hierarchy-links", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"41879250-c4f4-4751-a484-f1a092959af9\",\"type\":\"team_hierarchy_links\",\"attributes\":{\"created_at\":\"2026-10-20T16:17:17.838807089Z\",\"provisioned_by\":\"\"},\"relationships\":{\"parent_team\":{\"data\":{\"id\":\"c431b345-4b84-4c7b-a4f2-a3bd3773a0bc\",\"type\":\"team\"}},\"sub_team\":{\"data\":{\"id\":\"c8984857-6077-47d3-a2e0-6ecd0ad002ef\",\"type\":\"team\"}}}},\"included\":[{\"id\":\"c431b345-4b84-4c7b-a4f2-a3bd3773a0bc\",\"type\":\"team\",\"attributes\":{\"avatar\":null,\"banner\":14,\"handle\":\"test-handle-c36a7248a9067833\",\"is_managed\":false,\"is_open_membership\":false,\"link_count\":0,\"name\":\"test-name-c36a7248a9067833\",\"summary\":null,\"user_count\":0}},{\"id\":\"c8984857-6077-47d3-a2e0-6ecd0ad002ef\",\"type\":\"team\",\"attributes\":{\"avatar\":null,\"banner\":9,\"handle\":\"test-handle-2-c36a7248a9067833\",\"is_managed\":false,\"is_open_membership\":false,\"link_count\":0,\"name\":\"test-name-2-c36a7248a9067833\",\"summary\":null,\"user_count\":0}}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "email": "hierarchy-Test-Get_team_hierarchy_members_deduplicates_direct_and_inherited_membership-1792513035@datadoghq.com", + "name": "Hierarchy member" + }, + "type": "users" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/users", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"type\":\"users\",\"id\":\"e7e78653-ee88-4e6d-8803-79156009e862\",\"attributes\":{\"uuid\":\"e7e78653-ee88-4e6d-8803-79156009e862\",\"name\":\"Hierarchy member\",\"handle\":\"hierarchy-test-get_team_hierarchy_members_deduplicates_direct_and_inherited_membership-1792513035@datadoghq.com\",\"created_at\":\"2026-10-20T16:17:18.106492+00:00\",\"modified_at\":\"2026-10-20T16:17:18.106492+00:00\",\"email\":\"hierarchy-test-get_team_hierarchy_members_deduplicates_direct_and_inherited_membership-1792513035@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/47d6d66718b8406d16643547000c8f67?s=48&d=retro\",\"title\":null,\"verified\":false,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Pending\",\"last_login_time\":null},\"relationships\":{\"roles\":{\"data\":[]},\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}}\n" + }, + "headers": { + "content-type": "application/json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "role": "admin" + }, + "relationships": { + "user": { + "data": { + "id": "e7e78653-ee88-4e6d-8803-79156009e862", + "type": "users" + } + } + }, + "type": "team_memberships" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/team/c8984857-6077-47d3-a2e0-6ecd0ad002ef/memberships", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"TeamMembership-c8984857-6077-47d3-a2e0-6ecd0ad002ef-71947471\",\"type\":\"team_memberships\",\"attributes\":{\"provisioned_by\":null,\"provisioned_by_id\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\",\"role\":\"admin\"},\"relationships\":{\"user\":{\"data\":{\"id\":\"e7e78653-ee88-4e6d-8803-79156009e862\",\"type\":\"users\"}}}},\"included\":[{\"id\":\"e7e78653-ee88-4e6d-8803-79156009e862\",\"type\":\"users\",\"attributes\":{\"disabled\":false,\"email\":\"hierarchy-test-get_team_hierarchy_members_deduplicates_direct_and_inherited_membership-1792513035@datadoghq.com\",\"handle\":\"hierarchy-test-get_team_hierarchy_members_deduplicates_direct_and_inherited_membership-1792513035@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/47d6d66718b8406d16643547000c8f67?d=retro\\u0026s=48\",\"name\":\"Hierarchy member\",\"service_account\":false,\"status\":\"Pending\"}}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "email": "Test-Get_team_hierarchy_members_deduplicates_direct_and_inherited_membership-1792513035@datadoghq.com", + "title": "user title" + }, + "type": "users" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/users", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"type\":\"users\",\"id\":\"b10d80ab-e01d-4f3d-8bee-e0ba5996bf55\",\"attributes\":{\"uuid\":\"b10d80ab-e01d-4f3d-8bee-e0ba5996bf55\",\"name\":null,\"handle\":\"test-get_team_hierarchy_members_deduplicates_direct_and_inherited_membership-1792513035@datadoghq.com\",\"created_at\":\"2026-10-20T16:17:18.678850+00:00\",\"modified_at\":\"2026-10-20T16:17:18.678850+00:00\",\"email\":\"test-get_team_hierarchy_members_deduplicates_direct_and_inherited_membership-1792513035@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/ab8e1e28a33de20e8b414c085889b815?s=48&d=retro\",\"title\":\"user title\",\"verified\":false,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Pending\",\"last_login_time\":null},\"relationships\":{\"roles\":{\"data\":[]},\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}}\n" + }, + "headers": { + "content-type": "application/json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "role": "admin" + }, + "relationships": { + "user": { + "data": { + "id": "b10d80ab-e01d-4f3d-8bee-e0ba5996bf55", + "type": "users" + } + } + }, + "type": "team_memberships" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/team/c431b345-4b84-4c7b-a4f2-a3bd3773a0bc/memberships", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"TeamMembership-c431b345-4b84-4c7b-a4f2-a3bd3773a0bc-71947472\",\"type\":\"team_memberships\",\"attributes\":{\"provisioned_by\":null,\"provisioned_by_id\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\",\"role\":\"admin\"},\"relationships\":{\"user\":{\"data\":{\"id\":\"b10d80ab-e01d-4f3d-8bee-e0ba5996bf55\",\"type\":\"users\"}}}},\"included\":[{\"id\":\"b10d80ab-e01d-4f3d-8bee-e0ba5996bf55\",\"type\":\"users\",\"attributes\":{\"disabled\":false,\"email\":\"test-get_team_hierarchy_members_deduplicates_direct_and_inherited_membership-1792513035@datadoghq.com\",\"handle\":\"test-get_team_hierarchy_members_deduplicates_direct_and_inherited_membership-1792513035@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/ab8e1e28a33de20e8b414c085889b815?d=retro\\u0026s=48\",\"name\":null,\"service_account\":false,\"status\":\"Pending\"}}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "role": "admin" + }, + "relationships": { + "user": { + "data": { + "id": "b10d80ab-e01d-4f3d-8bee-e0ba5996bf55", + "type": "users" + } + } + }, + "type": "team_memberships" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/team/c8984857-6077-47d3-a2e0-6ecd0ad002ef/memberships", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"TeamMembership-c8984857-6077-47d3-a2e0-6ecd0ad002ef-71947472\",\"type\":\"team_memberships\",\"attributes\":{\"provisioned_by\":null,\"provisioned_by_id\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\",\"role\":\"admin\"},\"relationships\":{\"user\":{\"data\":{\"id\":\"b10d80ab-e01d-4f3d-8bee-e0ba5996bf55\",\"type\":\"users\"}}}},\"included\":[{\"id\":\"b10d80ab-e01d-4f3d-8bee-e0ba5996bf55\",\"type\":\"users\",\"attributes\":{\"disabled\":false,\"email\":\"test-get_team_hierarchy_members_deduplicates_direct_and_inherited_membership-1792513035@datadoghq.com\",\"handle\":\"test-get_team_hierarchy_members_deduplicates_direct_and_inherited_membership-1792513035@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/ab8e1e28a33de20e8b414c085889b815?d=retro\\u0026s=48\",\"name\":null,\"service_account\":false,\"status\":\"Pending\"}}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/team/c431b345-4b84-4c7b-a4f2-a3bd3773a0bc/members", + "query": [ + [ + "filter[keyword]", + "Test-Get_team_hierarchy_members_deduplicates_direct_and_inherited_membership-1792513035" + ], + [ + "include", + "team" + ], + [ + "sort", + "-is_direct,handle" + ] + ] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":[{\"id\":\"UserTeamRelationship:c431b345-4b84-4c7b-a4f2-a3bd3773a0bc:b10d80ab-e01d-4f3d-8bee-e0ba5996bf55\",\"type\":\"user_team_relationship\",\"attributes\":{\"direct_role\":\"admin\",\"is_direct\":true,\"provisioned_by\":null,\"provisioned_by_id\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\"},\"relationships\":{\"team\":{\"data\":{\"id\":\"c431b345-4b84-4c7b-a4f2-a3bd3773a0bc\",\"type\":\"teams\"}},\"user\":{\"data\":{\"id\":\"b10d80ab-e01d-4f3d-8bee-e0ba5996bf55\",\"type\":\"users\"}}}},{\"id\":\"UserTeamRelationship:c431b345-4b84-4c7b-a4f2-a3bd3773a0bc:e7e78653-ee88-4e6d-8803-79156009e862\",\"type\":\"user_team_relationship\",\"attributes\":{\"direct_role\":null,\"is_direct\":false,\"provisioned_by\":null,\"provisioned_by_id\":null},\"relationships\":{\"team\":{\"data\":{\"id\":\"c431b345-4b84-4c7b-a4f2-a3bd3773a0bc\",\"type\":\"teams\"}},\"user\":{\"data\":{\"id\":\"e7e78653-ee88-4e6d-8803-79156009e862\",\"type\":\"users\"}}}}],\"meta\":{\"page\":{\"type\":\"offset_limit\",\"offset\":0,\"limit\":100,\"total\":2,\"first_offset\":0,\"prev_offset\":null,\"next_offset\":null,\"last_offset\":0}},\"links\":{\"self\":\"https://api.datadoghq.com/api/v2/team/c431b345-4b84-4c7b-a4f2-a3bd3773a0bc/members?filter%5Bkeyword%5D=Test-Get_team_hierarchy_members_deduplicates_direct_and_inherited_membership-1792513035\\u0026sort=-is_direct%2Chandle\\u0026include=team\",\"first\":\"https://api.datadoghq.com/api/v2/team/c431b345-4b84-4c7b-a4f2-a3bd3773a0bc/members?filter[keyword]=Test-Get_team_hierarchy_members_deduplicates_direct_and_inherited_membership-1792513035\\u0026include=team\\u0026page[limit]=100\\u0026page[offset]=0\\u0026sort=-is_direct,handle\",\"last\":\"https://api.datadoghq.com/api/v2/team/c431b345-4b84-4c7b-a4f2-a3bd3773a0bc/members?filter[keyword]=Test-Get_team_hierarchy_members_deduplicates_direct_and_inherited_membership-1792513035\\u0026include=team\\u0026page[limit]=100\\u0026page[offset]=0\\u0026sort=-is_direct,handle\"},\"included\":[{\"id\":\"c431b345-4b84-4c7b-a4f2-a3bd3773a0bc\",\"type\":\"teams\",\"attributes\":{\"handle\":\"test-handle-c36a7248a9067833\",\"name\":\"test-name-c36a7248a9067833\"}}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/team/c8984857-6077-47d3-a2e0-6ecd0ad002ef/memberships/b10d80ab-e01d-4f3d-8bee-e0ba5996bf55", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/team/c431b345-4b84-4c7b-a4f2-a3bd3773a0bc/memberships/b10d80ab-e01d-4f3d-8bee-e0ba5996bf55", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/users/b10d80ab-e01d-4f3d-8bee-e0ba5996bf55", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/team/c8984857-6077-47d3-a2e0-6ecd0ad002ef/memberships/e7e78653-ee88-4e6d-8803-79156009e862", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/users/e7e78653-ee88-4e6d-8803-79156009e862", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/team-hierarchy-links/41879250-c4f4-4751-a484-f1a092959af9", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/team/c8984857-6077-47d3-a2e0-6ecd0ad002ef", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/team/c431b345-4b84-4c7b-a4f2-a3bd3773a0bc", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + } + ], + "scenario": "Get team hierarchy members deduplicates direct and inherited membership", + "version": "v2" + }, + { + "feature": "Teams", + "frozen_at": "2026-10-20T16:17:22.023Z", + "interactions": [ + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "handle": "test-handle-6e5570209bc2c8a9", + "name": "test-name-6e5570209bc2c8a9" + }, + "type": "team" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/team", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"68621a1f-67f2-4203-a614-485d8dc94985\",\"type\":\"team\",\"attributes\":{\"avatar\":null,\"banner\":9,\"created_at\":\"2026-10-20T16:17:22.206891+00:00\",\"description\":null,\"handle\":\"test-handle-6e5570209bc2c8a9\",\"hidden_modules\":null,\"is_managed\":false,\"link_count\":0,\"modified_at\":\"2026-10-20T16:17:22.206891+00:00\",\"name\":\"test-name-6e5570209bc2c8a9\",\"summary\":null,\"user_count\":0,\"visible_modules\":null},\"relationships\":{\"team_links\":{\"data\":[],\"links\":{\"related\":\"/api/v2/team/68621a1f-67f2-4203-a614-485d8dc94985/links\"}},\"user_team_permissions\":{\"data\":null,\"links\":{\"related\":\"/api/v2/team/68621a1f-67f2-4203-a614-485d8dc94985/permission-settings\"}}}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "handle": "test-handle-2-6e5570209bc2c8a9", + "name": "test-name-2-6e5570209bc2c8a9" + }, + "type": "team" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/team", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"e87e3abc-f0dd-4761-adfd-abcf6ff91406\",\"type\":\"team\",\"attributes\":{\"avatar\":null,\"banner\":5,\"created_at\":\"2026-10-20T16:17:22.460938+00:00\",\"description\":null,\"handle\":\"test-handle-2-6e5570209bc2c8a9\",\"hidden_modules\":null,\"is_managed\":false,\"link_count\":0,\"modified_at\":\"2026-10-20T16:17:22.460938+00:00\",\"name\":\"test-name-2-6e5570209bc2c8a9\",\"summary\":null,\"user_count\":0,\"visible_modules\":null},\"relationships\":{\"team_links\":{\"data\":[],\"links\":{\"related\":\"/api/v2/team/e87e3abc-f0dd-4761-adfd-abcf6ff91406/links\"}},\"user_team_permissions\":{\"data\":null,\"links\":{\"related\":\"/api/v2/team/e87e3abc-f0dd-4761-adfd-abcf6ff91406/permission-settings\"}}}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "relationships": { + "parent_team": { + "data": { + "id": "68621a1f-67f2-4203-a614-485d8dc94985", + "type": "team" + } + }, + "sub_team": { + "data": { + "id": "e87e3abc-f0dd-4761-adfd-abcf6ff91406", + "type": "team" + } + } + }, + "type": "team_hierarchy_links" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/team-hierarchy-links", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"f0f518b0-1c4d-4381-9cec-29c1e3a1ebe3\",\"type\":\"team_hierarchy_links\",\"attributes\":{\"created_at\":\"2026-10-20T16:17:22.742932483Z\",\"provisioned_by\":\"\"},\"relationships\":{\"parent_team\":{\"data\":{\"id\":\"68621a1f-67f2-4203-a614-485d8dc94985\",\"type\":\"team\"}},\"sub_team\":{\"data\":{\"id\":\"e87e3abc-f0dd-4761-adfd-abcf6ff91406\",\"type\":\"team\"}}}},\"included\":[{\"id\":\"68621a1f-67f2-4203-a614-485d8dc94985\",\"type\":\"team\",\"attributes\":{\"avatar\":null,\"banner\":9,\"handle\":\"test-handle-6e5570209bc2c8a9\",\"is_managed\":false,\"is_open_membership\":false,\"link_count\":0,\"name\":\"test-name-6e5570209bc2c8a9\",\"summary\":null,\"user_count\":0}},{\"id\":\"e87e3abc-f0dd-4761-adfd-abcf6ff91406\",\"type\":\"team\",\"attributes\":{\"avatar\":null,\"banner\":5,\"handle\":\"test-handle-2-6e5570209bc2c8a9\",\"is_managed\":false,\"is_open_membership\":false,\"link_count\":0,\"name\":\"test-name-2-6e5570209bc2c8a9\",\"summary\":null,\"user_count\":0}}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "email": "hierarchy-Test-Get_team_hierarchy_members_filters_direct_members-1792513042@datadoghq.com", + "name": "Hierarchy member" + }, + "type": "users" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/users", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"type\":\"users\",\"id\":\"0a768693-26ef-4763-b13b-194713d13160\",\"attributes\":{\"uuid\":\"0a768693-26ef-4763-b13b-194713d13160\",\"name\":\"Hierarchy member\",\"handle\":\"hierarchy-test-get_team_hierarchy_members_filters_direct_members-1792513042@datadoghq.com\",\"created_at\":\"2026-10-20T16:17:23.005450+00:00\",\"modified_at\":\"2026-10-20T16:17:23.005450+00:00\",\"email\":\"hierarchy-test-get_team_hierarchy_members_filters_direct_members-1792513042@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/e35521be35d41b1b7dce0e437f5259cc?s=48&d=retro\",\"title\":null,\"verified\":false,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Pending\",\"last_login_time\":null},\"relationships\":{\"roles\":{\"data\":[]},\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}}\n" + }, + "headers": { + "content-type": "application/json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "role": "admin" + }, + "relationships": { + "user": { + "data": { + "id": "0a768693-26ef-4763-b13b-194713d13160", + "type": "users" + } + } + }, + "type": "team_memberships" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/team/e87e3abc-f0dd-4761-adfd-abcf6ff91406/memberships", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"TeamMembership-e87e3abc-f0dd-4761-adfd-abcf6ff91406-71947473\",\"type\":\"team_memberships\",\"attributes\":{\"provisioned_by\":null,\"provisioned_by_id\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\",\"role\":\"admin\"},\"relationships\":{\"user\":{\"data\":{\"id\":\"0a768693-26ef-4763-b13b-194713d13160\",\"type\":\"users\"}}}},\"included\":[{\"id\":\"0a768693-26ef-4763-b13b-194713d13160\",\"type\":\"users\",\"attributes\":{\"disabled\":false,\"email\":\"hierarchy-test-get_team_hierarchy_members_filters_direct_members-1792513042@datadoghq.com\",\"handle\":\"hierarchy-test-get_team_hierarchy_members_filters_direct_members-1792513042@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/e35521be35d41b1b7dce0e437f5259cc?d=retro\\u0026s=48\",\"name\":\"Hierarchy member\",\"service_account\":false,\"status\":\"Pending\"}}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "email": "Test-Get_team_hierarchy_members_filters_direct_members-1792513042@datadoghq.com", + "title": "user title" + }, + "type": "users" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/users", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"type\":\"users\",\"id\":\"010ada19-6be1-4c9f-a69d-74aed601d1b9\",\"attributes\":{\"uuid\":\"010ada19-6be1-4c9f-a69d-74aed601d1b9\",\"name\":null,\"handle\":\"test-get_team_hierarchy_members_filters_direct_members-1792513042@datadoghq.com\",\"created_at\":\"2026-10-20T16:17:23.555103+00:00\",\"modified_at\":\"2026-10-20T16:17:23.555103+00:00\",\"email\":\"test-get_team_hierarchy_members_filters_direct_members-1792513042@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/1e9425084b3d8211180a2ba1b9027b0f?s=48&d=retro\",\"title\":\"user title\",\"verified\":false,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Pending\",\"last_login_time\":null},\"relationships\":{\"roles\":{\"data\":[]},\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}}\n" + }, + "headers": { + "content-type": "application/json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "role": "admin" + }, + "relationships": { + "user": { + "data": { + "id": "010ada19-6be1-4c9f-a69d-74aed601d1b9", + "type": "users" + } + } + }, + "type": "team_memberships" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/team/68621a1f-67f2-4203-a614-485d8dc94985/memberships", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"TeamMembership-68621a1f-67f2-4203-a614-485d8dc94985-71947474\",\"type\":\"team_memberships\",\"attributes\":{\"provisioned_by\":null,\"provisioned_by_id\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\",\"role\":\"admin\"},\"relationships\":{\"user\":{\"data\":{\"id\":\"010ada19-6be1-4c9f-a69d-74aed601d1b9\",\"type\":\"users\"}}}},\"included\":[{\"id\":\"010ada19-6be1-4c9f-a69d-74aed601d1b9\",\"type\":\"users\",\"attributes\":{\"disabled\":false,\"email\":\"test-get_team_hierarchy_members_filters_direct_members-1792513042@datadoghq.com\",\"handle\":\"test-get_team_hierarchy_members_filters_direct_members-1792513042@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/1e9425084b3d8211180a2ba1b9027b0f?d=retro\\u0026s=48\",\"name\":null,\"service_account\":false,\"status\":\"Pending\"}}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/team/68621a1f-67f2-4203-a614-485d8dc94985/members", + "query": [ + [ + "filter[include_service_accounts]", + "false" + ], + [ + "filter[is_direct_only]", + "true" + ], + [ + "filter[keyword]", + "Test-Get_team_hierarchy_members_filters_direct_members-1792513042" + ] + ] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":[{\"id\":\"UserTeamRelationship:68621a1f-67f2-4203-a614-485d8dc94985:010ada19-6be1-4c9f-a69d-74aed601d1b9\",\"type\":\"user_team_relationship\",\"attributes\":{\"direct_role\":\"admin\",\"is_direct\":true,\"provisioned_by\":null,\"provisioned_by_id\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\"},\"relationships\":{\"team\":{\"data\":{\"id\":\"68621a1f-67f2-4203-a614-485d8dc94985\",\"type\":\"teams\"}},\"user\":{\"data\":{\"id\":\"010ada19-6be1-4c9f-a69d-74aed601d1b9\",\"type\":\"users\"}}}}],\"meta\":{\"page\":{\"type\":\"offset_limit\",\"offset\":0,\"limit\":100,\"total\":1,\"first_offset\":0,\"prev_offset\":null,\"next_offset\":null,\"last_offset\":0}},\"links\":{\"self\":\"https://api.datadoghq.com/api/v2/team/68621a1f-67f2-4203-a614-485d8dc94985/members?filter%5Bkeyword%5D=Test-Get_team_hierarchy_members_filters_direct_members-1792513042\\u0026filter%5Bis_direct_only%5D=true\\u0026filter%5Binclude_service_accounts%5D=false\",\"first\":\"https://api.datadoghq.com/api/v2/team/68621a1f-67f2-4203-a614-485d8dc94985/members?filter[include_service_accounts]=false\\u0026filter[is_direct_only]=true\\u0026filter[keyword]=Test-Get_team_hierarchy_members_filters_direct_members-1792513042\\u0026page[limit]=100\\u0026page[offset]=0\",\"last\":\"https://api.datadoghq.com/api/v2/team/68621a1f-67f2-4203-a614-485d8dc94985/members?filter[include_service_accounts]=false\\u0026filter[is_direct_only]=true\\u0026filter[keyword]=Test-Get_team_hierarchy_members_filters_direct_members-1792513042\\u0026page[limit]=100\\u0026page[offset]=0\"}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/team/68621a1f-67f2-4203-a614-485d8dc94985/memberships/010ada19-6be1-4c9f-a69d-74aed601d1b9", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/users/010ada19-6be1-4c9f-a69d-74aed601d1b9", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/team/e87e3abc-f0dd-4761-adfd-abcf6ff91406/memberships/0a768693-26ef-4763-b13b-194713d13160", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/users/0a768693-26ef-4763-b13b-194713d13160", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/team-hierarchy-links/f0f518b0-1c4d-4381-9cec-29c1e3a1ebe3", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/team/e87e3abc-f0dd-4761-adfd-abcf6ff91406", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/team/68621a1f-67f2-4203-a614-485d8dc94985", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + } + ], + "scenario": "Get team hierarchy members filters direct members", + "version": "v2" + }, + { + "feature": "Teams", + "frozen_at": "2026-10-20T16:17:26.511Z", + "interactions": [ + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "handle": "test-handle-9fa8b295281a71b5", + "name": "test-name-9fa8b295281a71b5" + }, + "type": "team" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/team", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"e4ac0cab-3371-4195-9f62-97d89ce8616c\",\"type\":\"team\",\"attributes\":{\"avatar\":null,\"banner\":5,\"created_at\":\"2026-10-20T16:17:26.702617+00:00\",\"description\":null,\"handle\":\"test-handle-9fa8b295281a71b5\",\"hidden_modules\":null,\"is_managed\":false,\"link_count\":0,\"modified_at\":\"2026-10-20T16:17:26.702617+00:00\",\"name\":\"test-name-9fa8b295281a71b5\",\"summary\":null,\"user_count\":0,\"visible_modules\":null},\"relationships\":{\"team_links\":{\"data\":[],\"links\":{\"related\":\"/api/v2/team/e4ac0cab-3371-4195-9f62-97d89ce8616c/links\"}},\"user_team_permissions\":{\"data\":null,\"links\":{\"related\":\"/api/v2/team/e4ac0cab-3371-4195-9f62-97d89ce8616c/permission-settings\"}}}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "handle": "test-handle-2-9fa8b295281a71b5", + "name": "test-name-2-9fa8b295281a71b5" + }, + "type": "team" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/team", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"0c63ab5a-cef0-4717-9a2b-27381e95744a\",\"type\":\"team\",\"attributes\":{\"avatar\":null,\"banner\":11,\"created_at\":\"2026-10-20T16:17:26.935127+00:00\",\"description\":null,\"handle\":\"test-handle-2-9fa8b295281a71b5\",\"hidden_modules\":null,\"is_managed\":false,\"link_count\":0,\"modified_at\":\"2026-10-20T16:17:26.935127+00:00\",\"name\":\"test-name-2-9fa8b295281a71b5\",\"summary\":null,\"user_count\":0,\"visible_modules\":null},\"relationships\":{\"team_links\":{\"data\":[],\"links\":{\"related\":\"/api/v2/team/0c63ab5a-cef0-4717-9a2b-27381e95744a/links\"}},\"user_team_permissions\":{\"data\":null,\"links\":{\"related\":\"/api/v2/team/0c63ab5a-cef0-4717-9a2b-27381e95744a/permission-settings\"}}}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "relationships": { + "parent_team": { + "data": { + "id": "e4ac0cab-3371-4195-9f62-97d89ce8616c", + "type": "team" + } + }, + "sub_team": { + "data": { + "id": "0c63ab5a-cef0-4717-9a2b-27381e95744a", + "type": "team" + } + } + }, + "type": "team_hierarchy_links" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/team-hierarchy-links", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"dba101c0-a9de-4fc3-8c5e-8454f661b59e\",\"type\":\"team_hierarchy_links\",\"attributes\":{\"created_at\":\"2026-10-20T16:17:27.20080516Z\",\"provisioned_by\":\"\"},\"relationships\":{\"parent_team\":{\"data\":{\"id\":\"e4ac0cab-3371-4195-9f62-97d89ce8616c\",\"type\":\"team\"}},\"sub_team\":{\"data\":{\"id\":\"0c63ab5a-cef0-4717-9a2b-27381e95744a\",\"type\":\"team\"}}}},\"included\":[{\"id\":\"e4ac0cab-3371-4195-9f62-97d89ce8616c\",\"type\":\"team\",\"attributes\":{\"avatar\":null,\"banner\":5,\"handle\":\"test-handle-9fa8b295281a71b5\",\"is_managed\":false,\"is_open_membership\":false,\"link_count\":0,\"name\":\"test-name-9fa8b295281a71b5\",\"summary\":null,\"user_count\":0}},{\"id\":\"0c63ab5a-cef0-4717-9a2b-27381e95744a\",\"type\":\"team\",\"attributes\":{\"avatar\":null,\"banner\":11,\"handle\":\"test-handle-2-9fa8b295281a71b5\",\"is_managed\":false,\"is_open_membership\":false,\"link_count\":0,\"name\":\"test-name-2-9fa8b295281a71b5\",\"summary\":null,\"user_count\":0}}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "email": "hierarchy-Test-Get_team_hierarchy_members_filters_names_case_insensitively-1792513046@datadoghq.com", + "name": "Hierarchy member" + }, + "type": "users" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/users", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"type\":\"users\",\"id\":\"501785dc-53da-49f8-ab50-8f375044cfa6\",\"attributes\":{\"uuid\":\"501785dc-53da-49f8-ab50-8f375044cfa6\",\"name\":\"Hierarchy member\",\"handle\":\"hierarchy-test-get_team_hierarchy_members_filters_names_case_insensitively-1792513046@datadoghq.com\",\"created_at\":\"2026-10-20T16:17:27.467467+00:00\",\"modified_at\":\"2026-10-20T16:17:27.467467+00:00\",\"email\":\"hierarchy-test-get_team_hierarchy_members_filters_names_case_insensitively-1792513046@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/f40c9dc213ecd8a3c70c46f605ac25f6?s=48&d=retro\",\"title\":null,\"verified\":false,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Pending\",\"last_login_time\":null},\"relationships\":{\"roles\":{\"data\":[]},\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}}\n" + }, + "headers": { + "content-type": "application/json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "role": "admin" + }, + "relationships": { + "user": { + "data": { + "id": "501785dc-53da-49f8-ab50-8f375044cfa6", + "type": "users" + } + } + }, + "type": "team_memberships" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/team/0c63ab5a-cef0-4717-9a2b-27381e95744a/memberships", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"TeamMembership-0c63ab5a-cef0-4717-9a2b-27381e95744a-71947475\",\"type\":\"team_memberships\",\"attributes\":{\"provisioned_by\":null,\"provisioned_by_id\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\",\"role\":\"admin\"},\"relationships\":{\"user\":{\"data\":{\"id\":\"501785dc-53da-49f8-ab50-8f375044cfa6\",\"type\":\"users\"}}}},\"included\":[{\"id\":\"501785dc-53da-49f8-ab50-8f375044cfa6\",\"type\":\"users\",\"attributes\":{\"disabled\":false,\"email\":\"hierarchy-test-get_team_hierarchy_members_filters_names_case_insensitively-1792513046@datadoghq.com\",\"handle\":\"hierarchy-test-get_team_hierarchy_members_filters_names_case_insensitively-1792513046@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/f40c9dc213ecd8a3c70c46f605ac25f6?d=retro\\u0026s=48\",\"name\":\"Hierarchy member\",\"service_account\":false,\"status\":\"Pending\"}}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/team/e4ac0cab-3371-4195-9f62-97d89ce8616c/members", + "query": [ + [ + "filter[keyword]", + "hIeRaRcHy MeMbEr" + ] + ] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":[{\"id\":\"UserTeamRelationship:e4ac0cab-3371-4195-9f62-97d89ce8616c:501785dc-53da-49f8-ab50-8f375044cfa6\",\"type\":\"user_team_relationship\",\"attributes\":{\"direct_role\":null,\"is_direct\":false,\"provisioned_by\":null,\"provisioned_by_id\":null},\"relationships\":{\"team\":{\"data\":{\"id\":\"e4ac0cab-3371-4195-9f62-97d89ce8616c\",\"type\":\"teams\"}},\"user\":{\"data\":{\"id\":\"501785dc-53da-49f8-ab50-8f375044cfa6\",\"type\":\"users\"}}}}],\"meta\":{\"page\":{\"type\":\"offset_limit\",\"offset\":0,\"limit\":100,\"total\":1,\"first_offset\":0,\"prev_offset\":null,\"next_offset\":null,\"last_offset\":0}},\"links\":{\"self\":\"https://api.datadoghq.com/api/v2/team/e4ac0cab-3371-4195-9f62-97d89ce8616c/members?filter%5Bkeyword%5D=hIeRaRcHy%20MeMbEr\",\"first\":\"https://api.datadoghq.com/api/v2/team/e4ac0cab-3371-4195-9f62-97d89ce8616c/members?filter[keyword]=hIeRaRcHy MeMbEr\\u0026page[limit]=100\\u0026page[offset]=0\",\"last\":\"https://api.datadoghq.com/api/v2/team/e4ac0cab-3371-4195-9f62-97d89ce8616c/members?filter[keyword]=hIeRaRcHy MeMbEr\\u0026page[limit]=100\\u0026page[offset]=0\"}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/team/0c63ab5a-cef0-4717-9a2b-27381e95744a/memberships/501785dc-53da-49f8-ab50-8f375044cfa6", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/users/501785dc-53da-49f8-ab50-8f375044cfa6", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/team-hierarchy-links/dba101c0-a9de-4fc3-8c5e-8454f661b59e", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/team/0c63ab5a-cef0-4717-9a2b-27381e95744a", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/team/e4ac0cab-3371-4195-9f62-97d89ce8616c", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + } + ], + "scenario": "Get team hierarchy members filters names case insensitively", + "version": "v2" + }, + { + "feature": "Teams", + "frozen_at": "2026-10-20T16:17:29.748Z", + "interactions": [ + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "handle": "test-handle-ee75adac6bb6b536", + "name": "test-name-ee75adac6bb6b536" + }, + "type": "team" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/team", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"a91b02e6-085c-4ac9-9289-58cd9ef4de65\",\"type\":\"team\",\"attributes\":{\"avatar\":null,\"banner\":3,\"created_at\":\"2026-10-20T16:17:29.934951+00:00\",\"description\":null,\"handle\":\"test-handle-ee75adac6bb6b536\",\"hidden_modules\":null,\"is_managed\":false,\"link_count\":0,\"modified_at\":\"2026-10-20T16:17:29.934951+00:00\",\"name\":\"test-name-ee75adac6bb6b536\",\"summary\":null,\"user_count\":0,\"visible_modules\":null},\"relationships\":{\"team_links\":{\"data\":[],\"links\":{\"related\":\"/api/v2/team/a91b02e6-085c-4ac9-9289-58cd9ef4de65/links\"}},\"user_team_permissions\":{\"data\":null,\"links\":{\"related\":\"/api/v2/team/a91b02e6-085c-4ac9-9289-58cd9ef4de65/permission-settings\"}}}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "handle": "test-handle-2-ee75adac6bb6b536", + "name": "test-name-2-ee75adac6bb6b536" + }, + "type": "team" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/team", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"cd9f6e4d-8c6c-4588-9b9d-3713d5e8f3f5\",\"type\":\"team\",\"attributes\":{\"avatar\":null,\"banner\":0,\"created_at\":\"2026-10-20T16:17:30.166541+00:00\",\"description\":null,\"handle\":\"test-handle-2-ee75adac6bb6b536\",\"hidden_modules\":null,\"is_managed\":false,\"link_count\":0,\"modified_at\":\"2026-10-20T16:17:30.166541+00:00\",\"name\":\"test-name-2-ee75adac6bb6b536\",\"summary\":null,\"user_count\":0,\"visible_modules\":null},\"relationships\":{\"team_links\":{\"data\":[],\"links\":{\"related\":\"/api/v2/team/cd9f6e4d-8c6c-4588-9b9d-3713d5e8f3f5/links\"}},\"user_team_permissions\":{\"data\":null,\"links\":{\"related\":\"/api/v2/team/cd9f6e4d-8c6c-4588-9b9d-3713d5e8f3f5/permission-settings\"}}}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "relationships": { + "parent_team": { + "data": { + "id": "a91b02e6-085c-4ac9-9289-58cd9ef4de65", + "type": "team" + } + }, + "sub_team": { + "data": { + "id": "cd9f6e4d-8c6c-4588-9b9d-3713d5e8f3f5", + "type": "team" + } + } + }, + "type": "team_hierarchy_links" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/team-hierarchy-links", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"8a9c48f0-2635-4c6c-b908-b9d2719b782f\",\"type\":\"team_hierarchy_links\",\"attributes\":{\"created_at\":\"2026-10-20T16:17:30.450855109Z\",\"provisioned_by\":\"\"},\"relationships\":{\"parent_team\":{\"data\":{\"id\":\"a91b02e6-085c-4ac9-9289-58cd9ef4de65\",\"type\":\"team\"}},\"sub_team\":{\"data\":{\"id\":\"cd9f6e4d-8c6c-4588-9b9d-3713d5e8f3f5\",\"type\":\"team\"}}}},\"included\":[{\"id\":\"a91b02e6-085c-4ac9-9289-58cd9ef4de65\",\"type\":\"team\",\"attributes\":{\"avatar\":null,\"banner\":3,\"handle\":\"test-handle-ee75adac6bb6b536\",\"is_managed\":false,\"is_open_membership\":false,\"link_count\":0,\"name\":\"test-name-ee75adac6bb6b536\",\"summary\":null,\"user_count\":0}},{\"id\":\"cd9f6e4d-8c6c-4588-9b9d-3713d5e8f3f5\",\"type\":\"team\",\"attributes\":{\"avatar\":null,\"banner\":0,\"handle\":\"test-handle-2-ee75adac6bb6b536\",\"is_managed\":false,\"is_open_membership\":false,\"link_count\":0,\"name\":\"test-name-2-ee75adac6bb6b536\",\"summary\":null,\"user_count\":0}}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "email": "hierarchy-Test-Get_team_hierarchy_members_includes_inherited_users_with_null_root_membership_attributes-1792513049@datadoghq.com", + "name": "Hierarchy member" + }, + "type": "users" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/users", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"type\":\"users\",\"id\":\"807ce33a-757e-4558-ae87-d6e9b804c061\",\"attributes\":{\"uuid\":\"807ce33a-757e-4558-ae87-d6e9b804c061\",\"name\":\"Hierarchy member\",\"handle\":\"hierarchy-test-get_team_hierarchy_members_includes_inherited_users_with_null_root_membership_attributes-1792513049@datadoghq.com\",\"created_at\":\"2026-10-20T16:17:30.727618+00:00\",\"modified_at\":\"2026-10-20T16:17:30.727618+00:00\",\"email\":\"hierarchy-test-get_team_hierarchy_members_includes_inherited_users_with_null_root_membership_attributes-1792513049@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/2dcff54befe8933b11038dea8aeafd3e?s=48&d=retro\",\"title\":null,\"verified\":false,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Pending\",\"last_login_time\":null},\"relationships\":{\"roles\":{\"data\":[]},\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}}\n" + }, + "headers": { + "content-type": "application/json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "role": "admin" + }, + "relationships": { + "user": { + "data": { + "id": "807ce33a-757e-4558-ae87-d6e9b804c061", + "type": "users" + } + } + }, + "type": "team_memberships" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/team/cd9f6e4d-8c6c-4588-9b9d-3713d5e8f3f5/memberships", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"TeamMembership-cd9f6e4d-8c6c-4588-9b9d-3713d5e8f3f5-71947476\",\"type\":\"team_memberships\",\"attributes\":{\"provisioned_by\":null,\"provisioned_by_id\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\",\"role\":\"admin\"},\"relationships\":{\"user\":{\"data\":{\"id\":\"807ce33a-757e-4558-ae87-d6e9b804c061\",\"type\":\"users\"}}}},\"included\":[{\"id\":\"807ce33a-757e-4558-ae87-d6e9b804c061\",\"type\":\"users\",\"attributes\":{\"disabled\":false,\"email\":\"hierarchy-test-get_team_hierarchy_members_includes_inherited_users_with_null_root_membership_attributes-1792513049@datadoghq.com\",\"handle\":\"hierarchy-test-get_team_hierarchy_members_includes_inherited_users_with_null_root_membership_attributes-1792513049@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/2dcff54befe8933b11038dea8aeafd3e?d=retro\\u0026s=48\",\"name\":\"Hierarchy member\",\"service_account\":false,\"status\":\"Pending\"}}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/team/a91b02e6-085c-4ac9-9289-58cd9ef4de65/members", + "query": [ + [ + "filter[keyword]", + "Test-Get_team_hierarchy_members_includes_inherited_users_with_null_root_membership_attributes-1792513049" + ], + [ + "include", + "user,team" + ] + ] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":[{\"id\":\"UserTeamRelationship:a91b02e6-085c-4ac9-9289-58cd9ef4de65:807ce33a-757e-4558-ae87-d6e9b804c061\",\"type\":\"user_team_relationship\",\"attributes\":{\"direct_role\":null,\"is_direct\":false,\"provisioned_by\":null,\"provisioned_by_id\":null},\"relationships\":{\"team\":{\"data\":{\"id\":\"a91b02e6-085c-4ac9-9289-58cd9ef4de65\",\"type\":\"teams\"}},\"user\":{\"data\":{\"id\":\"807ce33a-757e-4558-ae87-d6e9b804c061\",\"type\":\"users\"}}}}],\"meta\":{\"page\":{\"type\":\"offset_limit\",\"offset\":0,\"limit\":100,\"total\":1,\"first_offset\":0,\"prev_offset\":null,\"next_offset\":null,\"last_offset\":0}},\"links\":{\"self\":\"https://api.datadoghq.com/api/v2/team/a91b02e6-085c-4ac9-9289-58cd9ef4de65/members?filter%5Bkeyword%5D=Test-Get_team_hierarchy_members_includes_inherited_users_with_null_root_membership_attributes-1792513049\\u0026include=user%2Cteam\",\"first\":\"https://api.datadoghq.com/api/v2/team/a91b02e6-085c-4ac9-9289-58cd9ef4de65/members?filter[keyword]=Test-Get_team_hierarchy_members_includes_inherited_users_with_null_root_membership_attributes-1792513049\\u0026include=user,team\\u0026page[limit]=100\\u0026page[offset]=0\",\"last\":\"https://api.datadoghq.com/api/v2/team/a91b02e6-085c-4ac9-9289-58cd9ef4de65/members?filter[keyword]=Test-Get_team_hierarchy_members_includes_inherited_users_with_null_root_membership_attributes-1792513049\\u0026include=user,team\\u0026page[limit]=100\\u0026page[offset]=0\"},\"included\":[{\"id\":\"807ce33a-757e-4558-ae87-d6e9b804c061\",\"type\":\"users\",\"attributes\":{\"created_at\":\"2026-10-20T16:17:30.727618+00:00\",\"disabled\":false,\"email\":\"hierarchy-test-get_team_hierarchy_members_includes_inherited_users_with_null_root_membership_attributes-1792513049@datadoghq.com\",\"handle\":\"hierarchy-test-get_team_hierarchy_members_includes_inherited_users_with_null_root_membership_attributes-1792513049@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/2dcff54befe8933b11038dea8aeafd3e?d=retro\\u0026s=48\",\"modified_at\":\"2026-10-20T16:17:30.727618+00:00\",\"name\":\"Hierarchy member\",\"service_account\":false,\"status\":\"Pending\",\"title\":null,\"verified\":false}},{\"id\":\"a91b02e6-085c-4ac9-9289-58cd9ef4de65\",\"type\":\"teams\",\"attributes\":{\"handle\":\"test-handle-ee75adac6bb6b536\",\"name\":\"test-name-ee75adac6bb6b536\"}}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/team/cd9f6e4d-8c6c-4588-9b9d-3713d5e8f3f5/memberships/807ce33a-757e-4558-ae87-d6e9b804c061", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/users/807ce33a-757e-4558-ae87-d6e9b804c061", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/team-hierarchy-links/8a9c48f0-2635-4c6c-b908-b9d2719b782f", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/team/cd9f6e4d-8c6c-4588-9b9d-3713d5e8f3f5", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/team/a91b02e6-085c-4ac9-9289-58cd9ef4de65", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + } + ], + "scenario": "Get team hierarchy members includes inherited users with null root membership attributes", + "version": "v2" + }, + { + "feature": "Teams", + "frozen_at": "2026-10-20T16:17:32.939Z", + "interactions": [ + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "handle": "test-handle-3e67528452a8070e", + "name": "test-name-3e67528452a8070e" + }, + "type": "team" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/team", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"c3124fd1-8eae-456c-b095-5a895db68088\",\"type\":\"team\",\"attributes\":{\"avatar\":null,\"banner\":11,\"created_at\":\"2026-10-20T16:17:33.132728+00:00\",\"description\":null,\"handle\":\"test-handle-3e67528452a8070e\",\"hidden_modules\":null,\"is_managed\":false,\"link_count\":0,\"modified_at\":\"2026-10-20T16:17:33.132729+00:00\",\"name\":\"test-name-3e67528452a8070e\",\"summary\":null,\"user_count\":0,\"visible_modules\":null},\"relationships\":{\"team_links\":{\"data\":[],\"links\":{\"related\":\"/api/v2/team/c3124fd1-8eae-456c-b095-5a895db68088/links\"}},\"user_team_permissions\":{\"data\":null,\"links\":{\"related\":\"/api/v2/team/c3124fd1-8eae-456c-b095-5a895db68088/permission-settings\"}}}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "handle": "test-handle-2-3e67528452a8070e", + "name": "test-name-2-3e67528452a8070e" + }, + "type": "team" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/team", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"9e4773ce-3c0d-4a75-b7f9-9c02d15fc28e\",\"type\":\"team\",\"attributes\":{\"avatar\":null,\"banner\":5,\"created_at\":\"2026-10-20T16:17:33.386817+00:00\",\"description\":null,\"handle\":\"test-handle-2-3e67528452a8070e\",\"hidden_modules\":null,\"is_managed\":false,\"link_count\":0,\"modified_at\":\"2026-10-20T16:17:33.386817+00:00\",\"name\":\"test-name-2-3e67528452a8070e\",\"summary\":null,\"user_count\":0,\"visible_modules\":null},\"relationships\":{\"team_links\":{\"data\":[],\"links\":{\"related\":\"/api/v2/team/9e4773ce-3c0d-4a75-b7f9-9c02d15fc28e/links\"}},\"user_team_permissions\":{\"data\":null,\"links\":{\"related\":\"/api/v2/team/9e4773ce-3c0d-4a75-b7f9-9c02d15fc28e/permission-settings\"}}}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "relationships": { + "parent_team": { + "data": { + "id": "c3124fd1-8eae-456c-b095-5a895db68088", + "type": "team" + } + }, + "sub_team": { + "data": { + "id": "9e4773ce-3c0d-4a75-b7f9-9c02d15fc28e", + "type": "team" + } + } + }, + "type": "team_hierarchy_links" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/team-hierarchy-links", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"3461c720-496e-4460-95a6-ffa94eed2cf7\",\"type\":\"team_hierarchy_links\",\"attributes\":{\"created_at\":\"2026-10-20T16:17:33.668267849Z\",\"provisioned_by\":\"\"},\"relationships\":{\"parent_team\":{\"data\":{\"id\":\"c3124fd1-8eae-456c-b095-5a895db68088\",\"type\":\"team\"}},\"sub_team\":{\"data\":{\"id\":\"9e4773ce-3c0d-4a75-b7f9-9c02d15fc28e\",\"type\":\"team\"}}}},\"included\":[{\"id\":\"c3124fd1-8eae-456c-b095-5a895db68088\",\"type\":\"team\",\"attributes\":{\"avatar\":null,\"banner\":11,\"handle\":\"test-handle-3e67528452a8070e\",\"is_managed\":false,\"is_open_membership\":false,\"link_count\":0,\"name\":\"test-name-3e67528452a8070e\",\"summary\":null,\"user_count\":0}},{\"id\":\"9e4773ce-3c0d-4a75-b7f9-9c02d15fc28e\",\"type\":\"team\",\"attributes\":{\"avatar\":null,\"banner\":5,\"handle\":\"test-handle-2-3e67528452a8070e\",\"is_managed\":false,\"is_open_membership\":false,\"link_count\":0,\"name\":\"test-name-2-3e67528452a8070e\",\"summary\":null,\"user_count\":0}}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "email": "hierarchy-Test-Get_team_hierarchy_members_paginates_by_number_and_size-1792513052@datadoghq.com", + "name": "Hierarchy member" + }, + "type": "users" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/users", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"type\":\"users\",\"id\":\"2be6a556-0719-4824-9f49-b4ec431a5132\",\"attributes\":{\"uuid\":\"2be6a556-0719-4824-9f49-b4ec431a5132\",\"name\":\"Hierarchy member\",\"handle\":\"hierarchy-test-get_team_hierarchy_members_paginates_by_number_and_size-1792513052@datadoghq.com\",\"created_at\":\"2026-10-20T16:17:33.995050+00:00\",\"modified_at\":\"2026-10-20T16:17:33.995050+00:00\",\"email\":\"hierarchy-test-get_team_hierarchy_members_paginates_by_number_and_size-1792513052@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/1f79bbc3a890dff5a6cf4fc912ef725d?s=48&d=retro\",\"title\":null,\"verified\":false,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Pending\",\"last_login_time\":null},\"relationships\":{\"roles\":{\"data\":[]},\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}}\n" + }, + "headers": { + "content-type": "application/json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "role": "admin" + }, + "relationships": { + "user": { + "data": { + "id": "2be6a556-0719-4824-9f49-b4ec431a5132", + "type": "users" + } + } + }, + "type": "team_memberships" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/team/9e4773ce-3c0d-4a75-b7f9-9c02d15fc28e/memberships", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"TeamMembership-9e4773ce-3c0d-4a75-b7f9-9c02d15fc28e-71947478\",\"type\":\"team_memberships\",\"attributes\":{\"provisioned_by\":null,\"provisioned_by_id\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\",\"role\":\"admin\"},\"relationships\":{\"user\":{\"data\":{\"id\":\"2be6a556-0719-4824-9f49-b4ec431a5132\",\"type\":\"users\"}}}},\"included\":[{\"id\":\"2be6a556-0719-4824-9f49-b4ec431a5132\",\"type\":\"users\",\"attributes\":{\"disabled\":false,\"email\":\"hierarchy-test-get_team_hierarchy_members_paginates_by_number_and_size-1792513052@datadoghq.com\",\"handle\":\"hierarchy-test-get_team_hierarchy_members_paginates_by_number_and_size-1792513052@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/1f79bbc3a890dff5a6cf4fc912ef725d?d=retro\\u0026s=48\",\"name\":\"Hierarchy member\",\"service_account\":false,\"status\":\"Pending\"}}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "email": "Test-Get_team_hierarchy_members_paginates_by_number_and_size-1792513052@datadoghq.com", + "title": "user title" + }, + "type": "users" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/users", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"type\":\"users\",\"id\":\"2b1b56ec-9ae6-4ac7-acb5-f7ef7f576369\",\"attributes\":{\"uuid\":\"2b1b56ec-9ae6-4ac7-acb5-f7ef7f576369\",\"name\":null,\"handle\":\"test-get_team_hierarchy_members_paginates_by_number_and_size-1792513052@datadoghq.com\",\"created_at\":\"2026-10-20T16:17:34.571437+00:00\",\"modified_at\":\"2026-10-20T16:17:34.571437+00:00\",\"email\":\"test-get_team_hierarchy_members_paginates_by_number_and_size-1792513052@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/13facc5110340fafbef1c40dde1fdf48?s=48&d=retro\",\"title\":\"user title\",\"verified\":false,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Pending\",\"last_login_time\":null},\"relationships\":{\"roles\":{\"data\":[]},\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}}\n" + }, + "headers": { + "content-type": "application/json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "role": "admin" + }, + "relationships": { + "user": { + "data": { + "id": "2b1b56ec-9ae6-4ac7-acb5-f7ef7f576369", + "type": "users" + } + } + }, + "type": "team_memberships" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/team/c3124fd1-8eae-456c-b095-5a895db68088/memberships", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"TeamMembership-c3124fd1-8eae-456c-b095-5a895db68088-71947479\",\"type\":\"team_memberships\",\"attributes\":{\"provisioned_by\":null,\"provisioned_by_id\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\",\"role\":\"admin\"},\"relationships\":{\"user\":{\"data\":{\"id\":\"2b1b56ec-9ae6-4ac7-acb5-f7ef7f576369\",\"type\":\"users\"}}}},\"included\":[{\"id\":\"2b1b56ec-9ae6-4ac7-acb5-f7ef7f576369\",\"type\":\"users\",\"attributes\":{\"disabled\":false,\"email\":\"test-get_team_hierarchy_members_paginates_by_number_and_size-1792513052@datadoghq.com\",\"handle\":\"test-get_team_hierarchy_members_paginates_by_number_and_size-1792513052@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/13facc5110340fafbef1c40dde1fdf48?d=retro\\u0026s=48\",\"name\":null,\"service_account\":false,\"status\":\"Pending\"}}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/team/c3124fd1-8eae-456c-b095-5a895db68088/members", + "query": [ + [ + "filter[keyword]", + "Test-Get_team_hierarchy_members_paginates_by_number_and_size-1792513052" + ], + [ + "page[number]", + "1" + ], + [ + "page[size]", + "1" + ], + [ + "sort", + "-is_direct" + ] + ] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":[{\"id\":\"UserTeamRelationship:c3124fd1-8eae-456c-b095-5a895db68088:2be6a556-0719-4824-9f49-b4ec431a5132\",\"type\":\"user_team_relationship\",\"attributes\":{\"direct_role\":null,\"is_direct\":false,\"provisioned_by\":null,\"provisioned_by_id\":null},\"relationships\":{\"team\":{\"data\":{\"id\":\"c3124fd1-8eae-456c-b095-5a895db68088\",\"type\":\"teams\"}},\"user\":{\"data\":{\"id\":\"2be6a556-0719-4824-9f49-b4ec431a5132\",\"type\":\"users\"}}}}],\"meta\":{\"page\":{\"type\":\"number_size\",\"number\":1,\"size\":1,\"total\":2,\"first_number\":0,\"prev_number\":0,\"next_number\":null,\"last_number\":1}},\"links\":{\"self\":\"https://api.datadoghq.com/api/v2/team/c3124fd1-8eae-456c-b095-5a895db68088/members?filter%5Bkeyword%5D=Test-Get_team_hierarchy_members_paginates_by_number_and_size-1792513052\\u0026sort=-is_direct\\u0026page%5Bnumber%5D=1\\u0026page%5Bsize%5D=1\",\"first\":\"https://api.datadoghq.com/api/v2/team/c3124fd1-8eae-456c-b095-5a895db68088/members?filter[keyword]=Test-Get_team_hierarchy_members_paginates_by_number_and_size-1792513052\\u0026page[number]=0\\u0026page[size]=1\\u0026sort=-is_direct\",\"last\":\"https://api.datadoghq.com/api/v2/team/c3124fd1-8eae-456c-b095-5a895db68088/members?filter[keyword]=Test-Get_team_hierarchy_members_paginates_by_number_and_size-1792513052\\u0026page[number]=1\\u0026page[size]=1\\u0026sort=-is_direct\",\"prev\":\"https://api.datadoghq.com/api/v2/team/c3124fd1-8eae-456c-b095-5a895db68088/members?filter[keyword]=Test-Get_team_hierarchy_members_paginates_by_number_and_size-1792513052\\u0026page[number]=0\\u0026page[size]=1\\u0026sort=-is_direct\"}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/team/c3124fd1-8eae-456c-b095-5a895db68088/memberships/2b1b56ec-9ae6-4ac7-acb5-f7ef7f576369", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/users/2b1b56ec-9ae6-4ac7-acb5-f7ef7f576369", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/team/9e4773ce-3c0d-4a75-b7f9-9c02d15fc28e/memberships/2be6a556-0719-4824-9f49-b4ec431a5132", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/users/2be6a556-0719-4824-9f49-b4ec431a5132", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/team-hierarchy-links/3461c720-496e-4460-95a6-ffa94eed2cf7", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/team/9e4773ce-3c0d-4a75-b7f9-9c02d15fc28e", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/team/c3124fd1-8eae-456c-b095-5a895db68088", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + } + ], + "scenario": "Get team hierarchy members paginates by number and size", + "version": "v2" + }, + { + "feature": "Teams", + "frozen_at": "2026-10-20T16:17:38.097Z", + "interactions": [ + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "handle": "test-handle-d99fb67a9032e747", + "name": "test-name-d99fb67a9032e747" + }, + "type": "team" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/team", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"94df68fe-05bb-466e-9d5f-c469ec3da203\",\"type\":\"team\",\"attributes\":{\"avatar\":null,\"banner\":9,\"created_at\":\"2026-10-20T16:17:38.275526+00:00\",\"description\":null,\"handle\":\"test-handle-d99fb67a9032e747\",\"hidden_modules\":null,\"is_managed\":false,\"link_count\":0,\"modified_at\":\"2026-10-20T16:17:38.275526+00:00\",\"name\":\"test-name-d99fb67a9032e747\",\"summary\":null,\"user_count\":0,\"visible_modules\":null},\"relationships\":{\"team_links\":{\"data\":[],\"links\":{\"related\":\"/api/v2/team/94df68fe-05bb-466e-9d5f-c469ec3da203/links\"}},\"user_team_permissions\":{\"data\":null,\"links\":{\"related\":\"/api/v2/team/94df68fe-05bb-466e-9d5f-c469ec3da203/permission-settings\"}}}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/team/94df68fe-05bb-466e-9d5f-c469ec3da203/members", + "query": [ + [ + "include", + "descendants" + ] + ] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"errors\":[{\"status\":\"400\",\"title\":\"Invalid Parameter\",\"detail\":\"'descendants' is not a valid value for include. Supported values are: [user, team]\",\"source\":{\"parameter\":\"include\"}}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Bad Request", + "status": 400 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/team/94df68fe-05bb-466e-9d5f-c469ec3da203", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + } + ], + "scenario": "Get team hierarchy members rejects unsupported includes", + "version": "v2" + }, + { + "feature": "Teams", + "frozen_at": "2026-10-20T16:17:38.859Z", + "interactions": [ + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "handle": "test-handle-940bd9caf95f93ca", + "name": "test-name-940bd9caf95f93ca" + }, + "type": "team" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/team", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"94164ef6-ed82-41af-a152-9d5a5b540a92\",\"type\":\"team\",\"attributes\":{\"avatar\":null,\"banner\":3,\"created_at\":\"2026-10-20T16:17:39.041449+00:00\",\"description\":null,\"handle\":\"test-handle-940bd9caf95f93ca\",\"hidden_modules\":null,\"is_managed\":false,\"link_count\":0,\"modified_at\":\"2026-10-20T16:17:39.041449+00:00\",\"name\":\"test-name-940bd9caf95f93ca\",\"summary\":null,\"user_count\":0,\"visible_modules\":null},\"relationships\":{\"team_links\":{\"data\":[],\"links\":{\"related\":\"/api/v2/team/94164ef6-ed82-41af-a152-9d5a5b540a92/links\"}},\"user_team_permissions\":{\"data\":null,\"links\":{\"related\":\"/api/v2/team/94164ef6-ed82-41af-a152-9d5a5b540a92/permission-settings\"}}}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/team/94164ef6-ed82-41af-a152-9d5a5b540a92/members", + "query": [ + [ + "sort", + "invalid" + ] + ] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"errors\":[{\"status\":\"400\",\"title\":\"Invalid Parameter\",\"detail\":\"'invalid' is not a valid sort parameter. Supported sort parameters are: [name, handle, is_direct, provisioned_by]\",\"source\":{\"parameter\":\"sort\"}}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Bad Request", + "status": 400 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/team/94164ef6-ed82-41af-a152-9d5a5b540a92", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + } + ], + "scenario": "Get team hierarchy members returns \"Bad Request\" response", + "version": "v2" + }, + { + "feature": "Teams", + "frozen_at": "2026-10-20T16:17:39.613Z", + "interactions": [ + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/team/00000000-0000-4000-8000-000000000000/members", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"errors\":[{\"status\":\"404\",\"title\":\"Not Found\",\"detail\":\"no team found (teamId=00000000-0000-4000-8000-000000000000)\"}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Not Found", + "status": 404 + } + } + ], + "scenario": "Get team hierarchy members returns \"Not Found\" response", + "version": "v2" + }, + { + "feature": "Teams", + "frozen_at": "2026-10-20T16:17:39.824Z", + "interactions": [ + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "handle": "test-handle-21fa5a1bbb13a2ca", + "name": "test-name-21fa5a1bbb13a2ca" + }, + "type": "team" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/team", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"02d2a4eb-5ead-425c-8950-07a4b01bec2c\",\"type\":\"team\",\"attributes\":{\"avatar\":null,\"banner\":10,\"created_at\":\"2026-10-20T16:17:40.006116+00:00\",\"description\":null,\"handle\":\"test-handle-21fa5a1bbb13a2ca\",\"hidden_modules\":null,\"is_managed\":false,\"link_count\":0,\"modified_at\":\"2026-10-20T16:17:40.006116+00:00\",\"name\":\"test-name-21fa5a1bbb13a2ca\",\"summary\":null,\"user_count\":0,\"visible_modules\":null},\"relationships\":{\"team_links\":{\"data\":[],\"links\":{\"related\":\"/api/v2/team/02d2a4eb-5ead-425c-8950-07a4b01bec2c/links\"}},\"user_team_permissions\":{\"data\":null,\"links\":{\"related\":\"/api/v2/team/02d2a4eb-5ead-425c-8950-07a4b01bec2c/permission-settings\"}}}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "email": "Test-Get_team_hierarchy_members_returns_OK_response-1792513059@datadoghq.com", + "title": "user title" + }, + "type": "users" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/users", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"type\":\"users\",\"id\":\"a7b523b6-c43f-4435-8e0e-066635294c54\",\"attributes\":{\"uuid\":\"a7b523b6-c43f-4435-8e0e-066635294c54\",\"name\":null,\"handle\":\"test-get_team_hierarchy_members_returns_ok_response-1792513059@datadoghq.com\",\"created_at\":\"2026-10-20T16:17:40.294873+00:00\",\"modified_at\":\"2026-10-20T16:17:40.294873+00:00\",\"email\":\"test-get_team_hierarchy_members_returns_ok_response-1792513059@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/98de8457708c5ef1a3fdbdb16833255f?s=48&d=retro\",\"title\":\"user title\",\"verified\":false,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Pending\",\"last_login_time\":null},\"relationships\":{\"roles\":{\"data\":[]},\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}}\n" + }, + "headers": { + "content-type": "application/json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "role": "admin" + }, + "relationships": { + "user": { + "data": { + "id": "a7b523b6-c43f-4435-8e0e-066635294c54", + "type": "users" + } + } + }, + "type": "team_memberships" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/team/02d2a4eb-5ead-425c-8950-07a4b01bec2c/memberships", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"TeamMembership-02d2a4eb-5ead-425c-8950-07a4b01bec2c-71947480\",\"type\":\"team_memberships\",\"attributes\":{\"provisioned_by\":null,\"provisioned_by_id\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\",\"role\":\"admin\"},\"relationships\":{\"user\":{\"data\":{\"id\":\"a7b523b6-c43f-4435-8e0e-066635294c54\",\"type\":\"users\"}}}},\"included\":[{\"id\":\"a7b523b6-c43f-4435-8e0e-066635294c54\",\"type\":\"users\",\"attributes\":{\"disabled\":false,\"email\":\"test-get_team_hierarchy_members_returns_ok_response-1792513059@datadoghq.com\",\"handle\":\"test-get_team_hierarchy_members_returns_ok_response-1792513059@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/98de8457708c5ef1a3fdbdb16833255f?d=retro\\u0026s=48\",\"name\":null,\"service_account\":false,\"status\":\"Pending\"}}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/team/02d2a4eb-5ead-425c-8950-07a4b01bec2c/members", + "query": [ + [ + "filter[keyword]", + "test-get_team_hierarchy_members_returns_ok_response-1792513059@datadoghq.com" + ], + [ + "include", + "user,team" + ] + ] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":[{\"id\":\"UserTeamRelationship:02d2a4eb-5ead-425c-8950-07a4b01bec2c:a7b523b6-c43f-4435-8e0e-066635294c54\",\"type\":\"user_team_relationship\",\"attributes\":{\"direct_role\":\"admin\",\"is_direct\":true,\"provisioned_by\":null,\"provisioned_by_id\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\"},\"relationships\":{\"team\":{\"data\":{\"id\":\"02d2a4eb-5ead-425c-8950-07a4b01bec2c\",\"type\":\"teams\"}},\"user\":{\"data\":{\"id\":\"a7b523b6-c43f-4435-8e0e-066635294c54\",\"type\":\"users\"}}}}],\"meta\":{\"page\":{\"type\":\"offset_limit\",\"offset\":0,\"limit\":100,\"total\":1,\"first_offset\":0,\"prev_offset\":null,\"next_offset\":null,\"last_offset\":0}},\"links\":{\"self\":\"https://api.datadoghq.com/api/v2/team/02d2a4eb-5ead-425c-8950-07a4b01bec2c/members?filter%5Bkeyword%5D=test-get_team_hierarchy_members_returns_ok_response-1792513059%40datadoghq.com\\u0026include=user%2Cteam\",\"first\":\"https://api.datadoghq.com/api/v2/team/02d2a4eb-5ead-425c-8950-07a4b01bec2c/members?filter[keyword]=test-get_team_hierarchy_members_returns_ok_response-1792513059@datadoghq.com\\u0026include=user,team\\u0026page[limit]=100\\u0026page[offset]=0\",\"last\":\"https://api.datadoghq.com/api/v2/team/02d2a4eb-5ead-425c-8950-07a4b01bec2c/members?filter[keyword]=test-get_team_hierarchy_members_returns_ok_response-1792513059@datadoghq.com\\u0026include=user,team\\u0026page[limit]=100\\u0026page[offset]=0\"},\"included\":[{\"id\":\"a7b523b6-c43f-4435-8e0e-066635294c54\",\"type\":\"users\",\"attributes\":{\"created_at\":\"2026-10-20T16:17:40.294873+00:00\",\"disabled\":false,\"email\":\"test-get_team_hierarchy_members_returns_ok_response-1792513059@datadoghq.com\",\"handle\":\"test-get_team_hierarchy_members_returns_ok_response-1792513059@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/98de8457708c5ef1a3fdbdb16833255f?d=retro\\u0026s=48\",\"modified_at\":\"2026-10-20T16:17:40.294873+00:00\",\"name\":null,\"service_account\":false,\"status\":\"Pending\",\"title\":\"user title\",\"verified\":false}},{\"id\":\"02d2a4eb-5ead-425c-8950-07a4b01bec2c\",\"type\":\"teams\",\"attributes\":{\"handle\":\"test-handle-21fa5a1bbb13a2ca\",\"name\":\"test-name-21fa5a1bbb13a2ca\"}}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/team/02d2a4eb-5ead-425c-8950-07a4b01bec2c/memberships/a7b523b6-c43f-4435-8e0e-066635294c54", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/users/a7b523b6-c43f-4435-8e0e-066635294c54", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/team/02d2a4eb-5ead-425c-8950-07a4b01bec2c", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + } + ], + "scenario": "Get team hierarchy members returns \"OK\" response", + "version": "v2" + }, + { + "feature": "Teams", + "frozen_at": "2026-10-21T18:20:16.586Z", + "interactions": [ + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "handle": "test-handle-63ea1132a02fda4d", + "name": "test-name-63ea1132a02fda4d" + }, + "type": "team" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/team", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"4aa6a28c-26fb-4835-a93c-a7afbf705ac1\",\"type\":\"team\",\"attributes\":{\"avatar\":null,\"banner\":14,\"created_at\":\"2026-10-21T18:20:18.752288+00:00\",\"description\":null,\"handle\":\"test-handle-63ea1132a02fda4d\",\"hidden_modules\":null,\"is_managed\":false,\"link_count\":0,\"modified_at\":\"2026-10-21T18:20:18.752288+00:00\",\"name\":\"test-name-63ea1132a02fda4d\",\"summary\":null,\"user_count\":0,\"visible_modules\":null},\"relationships\":{\"team_links\":{\"data\":[],\"links\":{\"related\":\"/api/v2/team/4aa6a28c-26fb-4835-a93c-a7afbf705ac1/links\"}},\"user_team_permissions\":{\"data\":null,\"links\":{\"related\":\"/api/v2/team/4aa6a28c-26fb-4835-a93c-a7afbf705ac1/permission-settings\"}}}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "handle": "test-handle-2-63ea1132a02fda4d", + "name": "test-name-2-63ea1132a02fda4d" + }, + "type": "team" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/team", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"b44fa329-8ba1-4302-a15e-a7fa51cd29b1\",\"type\":\"team\",\"attributes\":{\"avatar\":null,\"banner\":2,\"created_at\":\"2026-10-21T18:20:18.847457+00:00\",\"description\":null,\"handle\":\"test-handle-2-63ea1132a02fda4d\",\"hidden_modules\":null,\"is_managed\":false,\"link_count\":0,\"modified_at\":\"2026-10-21T18:20:18.847457+00:00\",\"name\":\"test-name-2-63ea1132a02fda4d\",\"summary\":null,\"user_count\":0,\"visible_modules\":null},\"relationships\":{\"team_links\":{\"data\":[],\"links\":{\"related\":\"/api/v2/team/b44fa329-8ba1-4302-a15e-a7fa51cd29b1/links\"}},\"user_team_permissions\":{\"data\":null,\"links\":{\"related\":\"/api/v2/team/b44fa329-8ba1-4302-a15e-a7fa51cd29b1/permission-settings\"}}}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "relationships": { + "parent_team": { + "data": { + "id": "4aa6a28c-26fb-4835-a93c-a7afbf705ac1", + "type": "team" + } + }, + "sub_team": { + "data": { + "id": "b44fa329-8ba1-4302-a15e-a7fa51cd29b1", + "type": "team" + } + } + }, + "type": "team_hierarchy_links" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/team-hierarchy-links", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"7da37475-d6ed-42c1-ac7f-1dc7fec6f47b\",\"type\":\"team_hierarchy_links\",\"attributes\":{\"created_at\":\"2026-10-21T18:20:18.985967055Z\",\"provisioned_by\":\"\"},\"relationships\":{\"parent_team\":{\"data\":{\"id\":\"4aa6a28c-26fb-4835-a93c-a7afbf705ac1\",\"type\":\"team\"}},\"sub_team\":{\"data\":{\"id\":\"b44fa329-8ba1-4302-a15e-a7fa51cd29b1\",\"type\":\"team\"}}}},\"included\":[{\"id\":\"4aa6a28c-26fb-4835-a93c-a7afbf705ac1\",\"type\":\"team\",\"attributes\":{\"avatar\":null,\"banner\":14,\"handle\":\"test-handle-63ea1132a02fda4d\",\"is_managed\":false,\"is_open_membership\":false,\"link_count\":0,\"name\":\"test-name-63ea1132a02fda4d\",\"summary\":null,\"user_count\":0}},{\"id\":\"b44fa329-8ba1-4302-a15e-a7fa51cd29b1\",\"type\":\"team\",\"attributes\":{\"avatar\":null,\"banner\":2,\"handle\":\"test-handle-2-63ea1132a02fda4d\",\"is_managed\":false,\"is_open_membership\":false,\"link_count\":0,\"name\":\"test-name-2-63ea1132a02fda4d\",\"summary\":null,\"user_count\":0}}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "email": "hierarchy-Test-Get_team_hierarchy_members_returns_OK_response_with_pagination-1792606816@datadoghq.com", + "name": "Hierarchy member" + }, + "type": "users" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/users", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"type\":\"users\",\"id\":\"332ea5af-400d-44a9-b41e-a5050b389474\",\"attributes\":{\"uuid\":\"332ea5af-400d-44a9-b41e-a5050b389474\",\"name\":\"Hierarchy member\",\"handle\":\"hierarchy-test-get_team_hierarchy_members_returns_ok_response_with_pagination-1792606816@datadoghq.com\",\"created_at\":\"2026-10-21T18:20:19.092003+00:00\",\"modified_at\":\"2026-10-21T18:20:19.092003+00:00\",\"email\":\"hierarchy-test-get_team_hierarchy_members_returns_ok_response_with_pagination-1792606816@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/e5b9ac26b0638c99cd37f45dfe223311?s=48&d=retro\",\"title\":null,\"verified\":false,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Pending\",\"last_login_time\":null},\"relationships\":{\"roles\":{\"data\":[]},\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}}\n" + }, + "headers": { + "content-type": "application/json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "role": "admin" + }, + "relationships": { + "user": { + "data": { + "id": "332ea5af-400d-44a9-b41e-a5050b389474", + "type": "users" + } + } + }, + "type": "team_memberships" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/team/b44fa329-8ba1-4302-a15e-a7fa51cd29b1/memberships", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"TeamMembership-b44fa329-8ba1-4302-a15e-a7fa51cd29b1-71972306\",\"type\":\"team_memberships\",\"attributes\":{\"provisioned_by\":null,\"provisioned_by_id\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\",\"role\":\"admin\"},\"relationships\":{\"user\":{\"data\":{\"id\":\"332ea5af-400d-44a9-b41e-a5050b389474\",\"type\":\"users\"}}}},\"included\":[{\"id\":\"332ea5af-400d-44a9-b41e-a5050b389474\",\"type\":\"users\",\"attributes\":{\"disabled\":false,\"email\":\"hierarchy-test-get_team_hierarchy_members_returns_ok_response_with_pagination-1792606816@datadoghq.com\",\"handle\":\"hierarchy-test-get_team_hierarchy_members_returns_ok_response_with_pagination-1792606816@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/e5b9ac26b0638c99cd37f45dfe223311?d=retro\\u0026s=48\",\"name\":\"Hierarchy member\",\"service_account\":false,\"status\":\"Pending\"}}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "email": "Test-Get_team_hierarchy_members_returns_OK_response_with_pagination-1792606816@datadoghq.com", + "title": "user title" + }, + "type": "users" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/users", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"type\":\"users\",\"id\":\"5e946e21-2624-4259-8251-6e7ad76b5a2e\",\"attributes\":{\"uuid\":\"5e946e21-2624-4259-8251-6e7ad76b5a2e\",\"name\":null,\"handle\":\"test-get_team_hierarchy_members_returns_ok_response_with_pagination-1792606816@datadoghq.com\",\"created_at\":\"2026-10-21T18:20:19.353764+00:00\",\"modified_at\":\"2026-10-21T18:20:19.353764+00:00\",\"email\":\"test-get_team_hierarchy_members_returns_ok_response_with_pagination-1792606816@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/138b79b2d02fad9102b8cb5ef1ab21c9?s=48&d=retro\",\"title\":\"user title\",\"verified\":false,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Pending\",\"last_login_time\":null},\"relationships\":{\"roles\":{\"data\":[]},\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}}\n" + }, + "headers": { + "content-type": "application/json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "role": "admin" + }, + "relationships": { + "user": { + "data": { + "id": "5e946e21-2624-4259-8251-6e7ad76b5a2e", + "type": "users" + } + } + }, + "type": "team_memberships" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/team/4aa6a28c-26fb-4835-a93c-a7afbf705ac1/memberships", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"TeamMembership-4aa6a28c-26fb-4835-a93c-a7afbf705ac1-71972307\",\"type\":\"team_memberships\",\"attributes\":{\"provisioned_by\":null,\"provisioned_by_id\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\",\"role\":\"admin\"},\"relationships\":{\"user\":{\"data\":{\"id\":\"5e946e21-2624-4259-8251-6e7ad76b5a2e\",\"type\":\"users\"}}}},\"included\":[{\"id\":\"5e946e21-2624-4259-8251-6e7ad76b5a2e\",\"type\":\"users\",\"attributes\":{\"disabled\":false,\"email\":\"test-get_team_hierarchy_members_returns_ok_response_with_pagination-1792606816@datadoghq.com\",\"handle\":\"test-get_team_hierarchy_members_returns_ok_response_with_pagination-1792606816@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/138b79b2d02fad9102b8cb5ef1ab21c9?d=retro\\u0026s=48\",\"name\":null,\"service_account\":false,\"status\":\"Pending\"}}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/team/4aa6a28c-26fb-4835-a93c-a7afbf705ac1/members", + "query": [ + [ + "filter[keyword]", + "Test-Get_team_hierarchy_members_returns_OK_response_with_pagination-1792606816" + ], + [ + "page[number]", + "0" + ], + [ + "page[size]", + "1" + ] + ] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":[{\"id\":\"UserTeamRelationship:4aa6a28c-26fb-4835-a93c-a7afbf705ac1:5e946e21-2624-4259-8251-6e7ad76b5a2e\",\"type\":\"user_team_relationship\",\"attributes\":{\"direct_role\":\"admin\",\"is_direct\":true,\"provisioned_by\":null,\"provisioned_by_id\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\"},\"relationships\":{\"team\":{\"data\":{\"id\":\"4aa6a28c-26fb-4835-a93c-a7afbf705ac1\",\"type\":\"teams\"}},\"user\":{\"data\":{\"id\":\"5e946e21-2624-4259-8251-6e7ad76b5a2e\",\"type\":\"users\"}}}}],\"meta\":{\"page\":{\"type\":\"number_size\",\"number\":0,\"size\":1,\"total\":2,\"first_number\":0,\"prev_number\":null,\"next_number\":1,\"last_number\":1}},\"links\":{\"self\":\"https://api.datadoghq.com/api/v2/team/4aa6a28c-26fb-4835-a93c-a7afbf705ac1/members?filter%5Bkeyword%5D=Test-Get_team_hierarchy_members_returns_OK_response_with_pagination-1792606816\\u0026page%5Bsize%5D=1\\u0026page%5Bnumber%5D=0\",\"first\":\"https://api.datadoghq.com/api/v2/team/4aa6a28c-26fb-4835-a93c-a7afbf705ac1/members?filter[keyword]=Test-Get_team_hierarchy_members_returns_OK_response_with_pagination-1792606816\\u0026page[number]=0\\u0026page[size]=1\",\"last\":\"https://api.datadoghq.com/api/v2/team/4aa6a28c-26fb-4835-a93c-a7afbf705ac1/members?filter[keyword]=Test-Get_team_hierarchy_members_returns_OK_response_with_pagination-1792606816\\u0026page[number]=1\\u0026page[size]=1\",\"next\":\"https://api.datadoghq.com/api/v2/team/4aa6a28c-26fb-4835-a93c-a7afbf705ac1/members?filter[keyword]=Test-Get_team_hierarchy_members_returns_OK_response_with_pagination-1792606816\\u0026page[number]=1\\u0026page[size]=1\"}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/team/4aa6a28c-26fb-4835-a93c-a7afbf705ac1/members", + "query": [ + [ + "filter[keyword]", + "Test-Get_team_hierarchy_members_returns_OK_response_with_pagination-1792606816" + ], + [ + "page[number]", + "1" + ], + [ + "page[size]", + "1" + ] + ] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":[{\"id\":\"UserTeamRelationship:4aa6a28c-26fb-4835-a93c-a7afbf705ac1:332ea5af-400d-44a9-b41e-a5050b389474\",\"type\":\"user_team_relationship\",\"attributes\":{\"direct_role\":null,\"is_direct\":false,\"provisioned_by\":null,\"provisioned_by_id\":null},\"relationships\":{\"team\":{\"data\":{\"id\":\"4aa6a28c-26fb-4835-a93c-a7afbf705ac1\",\"type\":\"teams\"}},\"user\":{\"data\":{\"id\":\"332ea5af-400d-44a9-b41e-a5050b389474\",\"type\":\"users\"}}}}],\"meta\":{\"page\":{\"type\":\"number_size\",\"number\":1,\"size\":1,\"total\":2,\"first_number\":0,\"prev_number\":0,\"next_number\":null,\"last_number\":1}},\"links\":{\"self\":\"https://api.datadoghq.com/api/v2/team/4aa6a28c-26fb-4835-a93c-a7afbf705ac1/members?filter%5Bkeyword%5D=Test-Get_team_hierarchy_members_returns_OK_response_with_pagination-1792606816\\u0026page%5Bsize%5D=1\\u0026page%5Bnumber%5D=1\",\"first\":\"https://api.datadoghq.com/api/v2/team/4aa6a28c-26fb-4835-a93c-a7afbf705ac1/members?filter[keyword]=Test-Get_team_hierarchy_members_returns_OK_response_with_pagination-1792606816\\u0026page[number]=0\\u0026page[size]=1\",\"last\":\"https://api.datadoghq.com/api/v2/team/4aa6a28c-26fb-4835-a93c-a7afbf705ac1/members?filter[keyword]=Test-Get_team_hierarchy_members_returns_OK_response_with_pagination-1792606816\\u0026page[number]=1\\u0026page[size]=1\",\"prev\":\"https://api.datadoghq.com/api/v2/team/4aa6a28c-26fb-4835-a93c-a7afbf705ac1/members?filter[keyword]=Test-Get_team_hierarchy_members_returns_OK_response_with_pagination-1792606816\\u0026page[number]=0\\u0026page[size]=1\"}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/team/4aa6a28c-26fb-4835-a93c-a7afbf705ac1/members", + "query": [ + [ + "filter[keyword]", + "Test-Get_team_hierarchy_members_returns_OK_response_with_pagination-1792606816" + ], + [ + "page[number]", + "2" + ], + [ + "page[size]", + "1" + ] + ] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":[],\"meta\":{\"page\":{\"type\":\"number_size\",\"number\":2,\"size\":1,\"total\":2,\"first_number\":0,\"prev_number\":1,\"next_number\":null,\"last_number\":1}},\"links\":{\"self\":\"https://api.datadoghq.com/api/v2/team/4aa6a28c-26fb-4835-a93c-a7afbf705ac1/members?filter%5Bkeyword%5D=Test-Get_team_hierarchy_members_returns_OK_response_with_pagination-1792606816\\u0026page%5Bsize%5D=1\\u0026page%5Bnumber%5D=2\",\"first\":\"https://api.datadoghq.com/api/v2/team/4aa6a28c-26fb-4835-a93c-a7afbf705ac1/members?filter[keyword]=Test-Get_team_hierarchy_members_returns_OK_response_with_pagination-1792606816\\u0026page[number]=0\\u0026page[size]=1\",\"last\":\"https://api.datadoghq.com/api/v2/team/4aa6a28c-26fb-4835-a93c-a7afbf705ac1/members?filter[keyword]=Test-Get_team_hierarchy_members_returns_OK_response_with_pagination-1792606816\\u0026page[number]=1\\u0026page[size]=1\",\"prev\":\"https://api.datadoghq.com/api/v2/team/4aa6a28c-26fb-4835-a93c-a7afbf705ac1/members?filter[keyword]=Test-Get_team_hierarchy_members_returns_OK_response_with_pagination-1792606816\\u0026page[number]=1\\u0026page[size]=1\"}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/team/4aa6a28c-26fb-4835-a93c-a7afbf705ac1/memberships/5e946e21-2624-4259-8251-6e7ad76b5a2e", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/users/5e946e21-2624-4259-8251-6e7ad76b5a2e", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/team/b44fa329-8ba1-4302-a15e-a7fa51cd29b1/memberships/332ea5af-400d-44a9-b41e-a5050b389474", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/users/332ea5af-400d-44a9-b41e-a5050b389474", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/team-hierarchy-links/7da37475-d6ed-42c1-ac7f-1dc7fec6f47b", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/team/b44fa329-8ba1-4302-a15e-a7fa51cd29b1", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/team/4aa6a28c-26fb-4835-a93c-a7afbf705ac1", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + } + ], + "scenario": "Get team hierarchy members returns \"OK\" response with pagination", + "version": "v2" + }, + { + "feature": "Teams", + "frozen_at": "2026-10-20T16:17:41.933Z", + "interactions": [ + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "handle": "test-handle-ec9daca7dd9a1540", + "name": "test-name-ec9daca7dd9a1540" + }, + "type": "team" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/team", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"8c0b2465-ebba-491a-ac4c-20134ed219a5\",\"type\":\"team\",\"attributes\":{\"avatar\":null,\"banner\":5,\"created_at\":\"2026-10-20T16:17:42.121783+00:00\",\"description\":null,\"handle\":\"test-handle-ec9daca7dd9a1540\",\"hidden_modules\":null,\"is_managed\":false,\"link_count\":0,\"modified_at\":\"2026-10-20T16:17:42.121783+00:00\",\"name\":\"test-name-ec9daca7dd9a1540\",\"summary\":null,\"user_count\":0,\"visible_modules\":null},\"relationships\":{\"team_links\":{\"data\":[],\"links\":{\"related\":\"/api/v2/team/8c0b2465-ebba-491a-ac4c-20134ed219a5/links\"}},\"user_team_permissions\":{\"data\":null,\"links\":{\"related\":\"/api/v2/team/8c0b2465-ebba-491a-ac4c-20134ed219a5/permission-settings\"}}}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "handle": "test-handle-2-ec9daca7dd9a1540", + "name": "test-name-2-ec9daca7dd9a1540" + }, + "type": "team" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/team", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"e978614e-5d76-4908-98e7-2903bfcccdba\",\"type\":\"team\",\"attributes\":{\"avatar\":null,\"banner\":8,\"created_at\":\"2026-10-20T16:17:42.368024+00:00\",\"description\":null,\"handle\":\"test-handle-2-ec9daca7dd9a1540\",\"hidden_modules\":null,\"is_managed\":false,\"link_count\":0,\"modified_at\":\"2026-10-20T16:17:42.368024+00:00\",\"name\":\"test-name-2-ec9daca7dd9a1540\",\"summary\":null,\"user_count\":0,\"visible_modules\":null},\"relationships\":{\"team_links\":{\"data\":[],\"links\":{\"related\":\"/api/v2/team/e978614e-5d76-4908-98e7-2903bfcccdba/links\"}},\"user_team_permissions\":{\"data\":null,\"links\":{\"related\":\"/api/v2/team/e978614e-5d76-4908-98e7-2903bfcccdba/permission-settings\"}}}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "relationships": { + "parent_team": { + "data": { + "id": "8c0b2465-ebba-491a-ac4c-20134ed219a5", + "type": "team" + } + }, + "sub_team": { + "data": { + "id": "e978614e-5d76-4908-98e7-2903bfcccdba", + "type": "team" + } + } + }, + "type": "team_hierarchy_links" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/team-hierarchy-links", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"f24c2d02-2043-4b18-980a-a7f7da74865f\",\"type\":\"team_hierarchy_links\",\"attributes\":{\"created_at\":\"2026-10-20T16:17:42.660142606Z\",\"provisioned_by\":\"\"},\"relationships\":{\"parent_team\":{\"data\":{\"id\":\"8c0b2465-ebba-491a-ac4c-20134ed219a5\",\"type\":\"team\"}},\"sub_team\":{\"data\":{\"id\":\"e978614e-5d76-4908-98e7-2903bfcccdba\",\"type\":\"team\"}}}},\"included\":[{\"id\":\"8c0b2465-ebba-491a-ac4c-20134ed219a5\",\"type\":\"team\",\"attributes\":{\"avatar\":null,\"banner\":5,\"handle\":\"test-handle-ec9daca7dd9a1540\",\"is_managed\":false,\"is_open_membership\":false,\"link_count\":0,\"name\":\"test-name-ec9daca7dd9a1540\",\"summary\":null,\"user_count\":0}},{\"id\":\"e978614e-5d76-4908-98e7-2903bfcccdba\",\"type\":\"team\",\"attributes\":{\"avatar\":null,\"banner\":8,\"handle\":\"test-handle-2-ec9daca7dd9a1540\",\"is_managed\":false,\"is_open_membership\":false,\"link_count\":0,\"name\":\"test-name-2-ec9daca7dd9a1540\",\"summary\":null,\"user_count\":0}}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "email": "hierarchy-Test-Get_team_hierarchy_members_returns_empty_results-1792513061@datadoghq.com", + "name": "Hierarchy member" + }, + "type": "users" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/users", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"type\":\"users\",\"id\":\"afff5e9a-383d-4642-a062-4c3ea544f977\",\"attributes\":{\"uuid\":\"afff5e9a-383d-4642-a062-4c3ea544f977\",\"name\":\"Hierarchy member\",\"handle\":\"hierarchy-test-get_team_hierarchy_members_returns_empty_results-1792513061@datadoghq.com\",\"created_at\":\"2026-10-20T16:17:42.933104+00:00\",\"modified_at\":\"2026-10-20T16:17:42.933104+00:00\",\"email\":\"hierarchy-test-get_team_hierarchy_members_returns_empty_results-1792513061@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/c1f0829035833d29dcc79619ead1d412?s=48&d=retro\",\"title\":null,\"verified\":false,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Pending\",\"last_login_time\":null},\"relationships\":{\"roles\":{\"data\":[]},\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}}\n" + }, + "headers": { + "content-type": "application/json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "role": "admin" + }, + "relationships": { + "user": { + "data": { + "id": "afff5e9a-383d-4642-a062-4c3ea544f977", + "type": "users" + } + } + }, + "type": "team_memberships" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/team/e978614e-5d76-4908-98e7-2903bfcccdba/memberships", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"TeamMembership-e978614e-5d76-4908-98e7-2903bfcccdba-71947481\",\"type\":\"team_memberships\",\"attributes\":{\"provisioned_by\":null,\"provisioned_by_id\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\",\"role\":\"admin\"},\"relationships\":{\"user\":{\"data\":{\"id\":\"afff5e9a-383d-4642-a062-4c3ea544f977\",\"type\":\"users\"}}}},\"included\":[{\"id\":\"afff5e9a-383d-4642-a062-4c3ea544f977\",\"type\":\"users\",\"attributes\":{\"disabled\":false,\"email\":\"hierarchy-test-get_team_hierarchy_members_returns_empty_results-1792513061@datadoghq.com\",\"handle\":\"hierarchy-test-get_team_hierarchy_members_returns_empty_results-1792513061@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/c1f0829035833d29dcc79619ead1d412?d=retro\\u0026s=48\",\"name\":\"Hierarchy member\",\"service_account\":false,\"status\":\"Pending\"}}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/team/8c0b2465-ebba-491a-ac4c-20134ed219a5/members", + "query": [ + [ + "filter[keyword]", + "no-matching-member-Test-Get_team_hierarchy_members_returns_empty_results-1792513061" + ], + [ + "include", + "user,team" + ] + ] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":[],\"meta\":{\"page\":{\"type\":\"offset_limit\",\"offset\":0,\"limit\":100,\"total\":0,\"first_offset\":0,\"prev_offset\":null,\"next_offset\":null,\"last_offset\":0}},\"links\":{\"self\":\"https://api.datadoghq.com/api/v2/team/8c0b2465-ebba-491a-ac4c-20134ed219a5/members?filter%5Bkeyword%5D=no-matching-member-Test-Get_team_hierarchy_members_returns_empty_results-1792513061\\u0026include=user%2Cteam\",\"first\":\"https://api.datadoghq.com/api/v2/team/8c0b2465-ebba-491a-ac4c-20134ed219a5/members?filter[keyword]=no-matching-member-Test-Get_team_hierarchy_members_returns_empty_results-1792513061\\u0026include=user,team\\u0026page[limit]=100\\u0026page[offset]=0\",\"last\":\"https://api.datadoghq.com/api/v2/team/8c0b2465-ebba-491a-ac4c-20134ed219a5/members?filter[keyword]=no-matching-member-Test-Get_team_hierarchy_members_returns_empty_results-1792513061\\u0026include=user,team\\u0026page[limit]=100\\u0026page[offset]=0\"}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/team/e978614e-5d76-4908-98e7-2903bfcccdba/memberships/afff5e9a-383d-4642-a062-4c3ea544f977", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/users/afff5e9a-383d-4642-a062-4c3ea544f977", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/team-hierarchy-links/f24c2d02-2043-4b18-980a-a7f7da74865f", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/team/e978614e-5d76-4908-98e7-2903bfcccdba", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/team/8c0b2465-ebba-491a-ac4c-20134ed219a5", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + } + ], + "scenario": "Get team hierarchy members returns empty results", + "version": "v2" + }, + { + "feature": "Teams", + "frozen_at": "2026-10-20T16:17:46.133Z", + "interactions": [ + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "handle": "test-handle-16f197d2db3daaf0", + "name": "test-name-16f197d2db3daaf0" + }, + "type": "team" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/team", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"6fa845c4-6c51-48d9-a26d-a6652963d3d7\",\"type\":\"team\",\"attributes\":{\"avatar\":null,\"banner\":5,\"created_at\":\"2026-10-20T16:17:46.313985+00:00\",\"description\":null,\"handle\":\"test-handle-16f197d2db3daaf0\",\"hidden_modules\":null,\"is_managed\":false,\"link_count\":0,\"modified_at\":\"2026-10-20T16:17:46.313985+00:00\",\"name\":\"test-name-16f197d2db3daaf0\",\"summary\":null,\"user_count\":0,\"visible_modules\":null},\"relationships\":{\"team_links\":{\"data\":[],\"links\":{\"related\":\"/api/v2/team/6fa845c4-6c51-48d9-a26d-a6652963d3d7/links\"}},\"user_team_permissions\":{\"data\":null,\"links\":{\"related\":\"/api/v2/team/6fa845c4-6c51-48d9-a26d-a6652963d3d7/permission-settings\"}}}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "handle": "test-handle-2-16f197d2db3daaf0", + "name": "test-name-2-16f197d2db3daaf0" + }, + "type": "team" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/team", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"eb2f597e-e374-495b-bc3b-50c26fcee0ee\",\"type\":\"team\",\"attributes\":{\"avatar\":null,\"banner\":5,\"created_at\":\"2026-10-20T16:17:46.560941+00:00\",\"description\":null,\"handle\":\"test-handle-2-16f197d2db3daaf0\",\"hidden_modules\":null,\"is_managed\":false,\"link_count\":0,\"modified_at\":\"2026-10-20T16:17:46.560941+00:00\",\"name\":\"test-name-2-16f197d2db3daaf0\",\"summary\":null,\"user_count\":0,\"visible_modules\":null},\"relationships\":{\"team_links\":{\"data\":[],\"links\":{\"related\":\"/api/v2/team/eb2f597e-e374-495b-bc3b-50c26fcee0ee/links\"}},\"user_team_permissions\":{\"data\":null,\"links\":{\"related\":\"/api/v2/team/eb2f597e-e374-495b-bc3b-50c26fcee0ee/permission-settings\"}}}}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "relationships": { + "parent_team": { + "data": { + "id": "6fa845c4-6c51-48d9-a26d-a6652963d3d7", + "type": "team" + } + }, + "sub_team": { + "data": { + "id": "eb2f597e-e374-495b-bc3b-50c26fcee0ee", + "type": "team" + } + } + }, + "type": "team_hierarchy_links" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/team-hierarchy-links", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"5793ec72-5e73-46ca-b0c3-6a74e1d64a42\",\"type\":\"team_hierarchy_links\",\"attributes\":{\"created_at\":\"2026-10-20T16:17:46.859388416Z\",\"provisioned_by\":\"\"},\"relationships\":{\"parent_team\":{\"data\":{\"id\":\"6fa845c4-6c51-48d9-a26d-a6652963d3d7\",\"type\":\"team\"}},\"sub_team\":{\"data\":{\"id\":\"eb2f597e-e374-495b-bc3b-50c26fcee0ee\",\"type\":\"team\"}}}},\"included\":[{\"id\":\"6fa845c4-6c51-48d9-a26d-a6652963d3d7\",\"type\":\"team\",\"attributes\":{\"avatar\":null,\"banner\":5,\"handle\":\"test-handle-16f197d2db3daaf0\",\"is_managed\":false,\"is_open_membership\":false,\"link_count\":0,\"name\":\"test-name-16f197d2db3daaf0\",\"summary\":null,\"user_count\":0}},{\"id\":\"eb2f597e-e374-495b-bc3b-50c26fcee0ee\",\"type\":\"team\",\"attributes\":{\"avatar\":null,\"banner\":5,\"handle\":\"test-handle-2-16f197d2db3daaf0\",\"is_managed\":false,\"is_open_membership\":false,\"link_count\":0,\"name\":\"test-name-2-16f197d2db3daaf0\",\"summary\":null,\"user_count\":0}}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "email": "hierarchy-Test-Get_team_hierarchy_members_sorts_inherited_members_before_direct_members-1792513066@datadoghq.com", + "name": "Hierarchy member" + }, + "type": "users" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/users", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"type\":\"users\",\"id\":\"7ac4c748-1222-4b8e-962b-a6470458bee1\",\"attributes\":{\"uuid\":\"7ac4c748-1222-4b8e-962b-a6470458bee1\",\"name\":\"Hierarchy member\",\"handle\":\"hierarchy-test-get_team_hierarchy_members_sorts_inherited_members_before_direct_members-1792513066@datadoghq.com\",\"created_at\":\"2026-10-20T16:17:47.351948+00:00\",\"modified_at\":\"2026-10-20T16:17:47.351948+00:00\",\"email\":\"hierarchy-test-get_team_hierarchy_members_sorts_inherited_members_before_direct_members-1792513066@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/3efe3bed3f3e2280994c99d58611d129?s=48&d=retro\",\"title\":null,\"verified\":false,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Pending\",\"last_login_time\":null},\"relationships\":{\"roles\":{\"data\":[]},\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}}\n" + }, + "headers": { + "content-type": "application/json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "role": "admin" + }, + "relationships": { + "user": { + "data": { + "id": "7ac4c748-1222-4b8e-962b-a6470458bee1", + "type": "users" + } + } + }, + "type": "team_memberships" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/team/eb2f597e-e374-495b-bc3b-50c26fcee0ee/memberships", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"TeamMembership-eb2f597e-e374-495b-bc3b-50c26fcee0ee-71947482\",\"type\":\"team_memberships\",\"attributes\":{\"provisioned_by\":null,\"provisioned_by_id\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\",\"role\":\"admin\"},\"relationships\":{\"user\":{\"data\":{\"id\":\"7ac4c748-1222-4b8e-962b-a6470458bee1\",\"type\":\"users\"}}}},\"included\":[{\"id\":\"7ac4c748-1222-4b8e-962b-a6470458bee1\",\"type\":\"users\",\"attributes\":{\"disabled\":false,\"email\":\"hierarchy-test-get_team_hierarchy_members_sorts_inherited_members_before_direct_members-1792513066@datadoghq.com\",\"handle\":\"hierarchy-test-get_team_hierarchy_members_sorts_inherited_members_before_direct_members-1792513066@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/3efe3bed3f3e2280994c99d58611d129?d=retro\\u0026s=48\",\"name\":\"Hierarchy member\",\"service_account\":false,\"status\":\"Pending\"}}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "email": "Test-Get_team_hierarchy_members_sorts_inherited_members_before_direct_members-1792513066@datadoghq.com", + "title": "user title" + }, + "type": "users" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/users", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"type\":\"users\",\"id\":\"49945882-0401-4210-82ca-d248e90069dc\",\"attributes\":{\"uuid\":\"49945882-0401-4210-82ca-d248e90069dc\",\"name\":null,\"handle\":\"test-get_team_hierarchy_members_sorts_inherited_members_before_direct_members-1792513066@datadoghq.com\",\"created_at\":\"2026-10-20T16:17:47.899573+00:00\",\"modified_at\":\"2026-10-20T16:17:47.899573+00:00\",\"email\":\"test-get_team_hierarchy_members_sorts_inherited_members_before_direct_members-1792513066@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/daaffb4fa55f118ee9b31eb5e0ee2d79?s=48&d=retro\",\"title\":\"user title\",\"verified\":false,\"service_account\":false,\"disabled\":false,\"allowed_login_methods\":[],\"status\":\"Pending\",\"last_login_time\":null},\"relationships\":{\"roles\":{\"data\":[]},\"org\":{\"data\":{\"type\":\"orgs\",\"id\":\"4dee724d-00cc-11ea-a77b-570c9d03c6c5\"}}}}}\n" + }, + "headers": { + "content-type": "application/json" + }, + "reason": "Created", + "status": 201 + } + }, + { + "request": { + "body": { + "type": "json", + "value": { + "data": { + "attributes": { + "role": "admin" + }, + "relationships": { + "user": { + "data": { + "id": "49945882-0401-4210-82ca-d248e90069dc", + "type": "users" + } + } + }, + "type": "team_memberships" + } + } + }, + "content_type": "application/json", + "method": "POST", + "path": "/api/v2/team/6fa845c4-6c51-48d9-a26d-a6652963d3d7/memberships", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":{\"id\":\"TeamMembership-6fa845c4-6c51-48d9-a26d-a6652963d3d7-71947483\",\"type\":\"team_memberships\",\"attributes\":{\"provisioned_by\":null,\"provisioned_by_id\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\",\"role\":\"admin\"},\"relationships\":{\"user\":{\"data\":{\"id\":\"49945882-0401-4210-82ca-d248e90069dc\",\"type\":\"users\"}}}},\"included\":[{\"id\":\"49945882-0401-4210-82ca-d248e90069dc\",\"type\":\"users\",\"attributes\":{\"disabled\":false,\"email\":\"test-get_team_hierarchy_members_sorts_inherited_members_before_direct_members-1792513066@datadoghq.com\",\"handle\":\"test-get_team_hierarchy_members_sorts_inherited_members_before_direct_members-1792513066@datadoghq.com\",\"icon\":\"https://secure.gravatar.com/avatar/daaffb4fa55f118ee9b31eb5e0ee2d79?d=retro\\u0026s=48\",\"name\":null,\"service_account\":false,\"status\":\"Pending\"}}]}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "GET", + "path": "/api/v2/team/6fa845c4-6c51-48d9-a26d-a6652963d3d7/members", + "query": [ + [ + "filter[keyword]", + "Test-Get_team_hierarchy_members_sorts_inherited_members_before_direct_members-1792513066" + ], + [ + "sort", + "is_direct,-name" + ] + ] + }, + "response": { + "body": { + "encoding": "text", + "value": "{\"data\":[{\"id\":\"UserTeamRelationship:6fa845c4-6c51-48d9-a26d-a6652963d3d7:7ac4c748-1222-4b8e-962b-a6470458bee1\",\"type\":\"user_team_relationship\",\"attributes\":{\"direct_role\":null,\"is_direct\":false,\"provisioned_by\":null,\"provisioned_by_id\":null},\"relationships\":{\"team\":{\"data\":{\"id\":\"6fa845c4-6c51-48d9-a26d-a6652963d3d7\",\"type\":\"teams\"}},\"user\":{\"data\":{\"id\":\"7ac4c748-1222-4b8e-962b-a6470458bee1\",\"type\":\"users\"}}}},{\"id\":\"UserTeamRelationship:6fa845c4-6c51-48d9-a26d-a6652963d3d7:49945882-0401-4210-82ca-d248e90069dc\",\"type\":\"user_team_relationship\",\"attributes\":{\"direct_role\":\"admin\",\"is_direct\":true,\"provisioned_by\":null,\"provisioned_by_id\":\"028000b7-d90f-4d20-b4a9-6ff4a83b7950\"},\"relationships\":{\"team\":{\"data\":{\"id\":\"6fa845c4-6c51-48d9-a26d-a6652963d3d7\",\"type\":\"teams\"}},\"user\":{\"data\":{\"id\":\"49945882-0401-4210-82ca-d248e90069dc\",\"type\":\"users\"}}}}],\"meta\":{\"page\":{\"type\":\"offset_limit\",\"offset\":0,\"limit\":100,\"total\":2,\"first_offset\":0,\"prev_offset\":null,\"next_offset\":null,\"last_offset\":0}},\"links\":{\"self\":\"https://api.datadoghq.com/api/v2/team/6fa845c4-6c51-48d9-a26d-a6652963d3d7/members?filter%5Bkeyword%5D=Test-Get_team_hierarchy_members_sorts_inherited_members_before_direct_members-1792513066\\u0026sort=is_direct%2C-name\",\"first\":\"https://api.datadoghq.com/api/v2/team/6fa845c4-6c51-48d9-a26d-a6652963d3d7/members?filter[keyword]=Test-Get_team_hierarchy_members_sorts_inherited_members_before_direct_members-1792513066\\u0026page[limit]=100\\u0026page[offset]=0\\u0026sort=is_direct,-name\",\"last\":\"https://api.datadoghq.com/api/v2/team/6fa845c4-6c51-48d9-a26d-a6652963d3d7/members?filter[keyword]=Test-Get_team_hierarchy_members_sorts_inherited_members_before_direct_members-1792513066\\u0026page[limit]=100\\u0026page[offset]=0\\u0026sort=is_direct,-name\"}}" + }, + "headers": { + "content-type": "application/vnd.api+json" + }, + "reason": "OK", + "status": 200 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/team/6fa845c4-6c51-48d9-a26d-a6652963d3d7/memberships/49945882-0401-4210-82ca-d248e90069dc", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/users/49945882-0401-4210-82ca-d248e90069dc", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/team/eb2f597e-e374-495b-bc3b-50c26fcee0ee/memberships/7ac4c748-1222-4b8e-962b-a6470458bee1", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/users/7ac4c748-1222-4b8e-962b-a6470458bee1", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/team-hierarchy-links/5793ec72-5e73-46ca-b0c3-6a74e1d64a42", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/team/eb2f597e-e374-495b-bc3b-50c26fcee0ee", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + }, + { + "request": { + "body": { + "type": "empty", + "value": null + }, + "content_type": "", + "method": "DELETE", + "path": "/api/v2/team/6fa845c4-6c51-48d9-a26d-a6652963d3d7", + "query": [] + }, + "response": { + "body": { + "encoding": "text", + "value": "" + }, + "headers": {}, + "reason": "No Content", + "status": 204 + } + } + ], + "scenario": "Get team hierarchy members sorts inherited members before direct members", + "version": "v2" + }, { "feature": "Teams", "frozen_at": "2023-08-21T19:44:49.337Z", diff --git a/tests/v2/features/given.json b/tests/v2/features/given.json index 1eecd8ab2d..a97e50322f 100644 --- a/tests/v2/features/given.json +++ b/tests/v2/features/given.json @@ -1998,6 +1998,38 @@ "tag": "Teams", "operationId": "CreateTeamLink" }, + { + "parameters": [ + { + "name": "team_id", + "source": "dd_team_2.data.id" + }, + { + "name": "body", + "value": "{\n \"data\": {\n \"attributes\": {\n \"role\": \"admin\"\n },\n \"relationships\": {\n \"user\": {\n \"data\": {\n \"id\": \"{{team_hierarchy_user.data.id}}\",\n \"type\": \"users\"\n }\n }\n },\n \"type\": \"team_memberships\"\n }\n}" + } + ], + "step": "there is a valid \"team_hierarchy_child_membership\" in the system", + "key": "team_hierarchy_child_membership", + "tag": "Teams", + "operationId": "CreateTeamMembership" + }, + { + "parameters": [ + { + "name": "team_id", + "source": "dd_team_2.data.id" + }, + { + "name": "body", + "value": "{\n \"data\": {\n \"attributes\": {\n \"role\": \"admin\"\n },\n \"relationships\": {\n \"user\": {\n \"data\": {\n \"id\": \"{{user.data.id}}\",\n \"type\": \"users\"\n }\n }\n },\n \"type\": \"team_memberships\"\n }\n}" + } + ], + "step": "there is a valid \"team_hierarchy_duplicate_membership\" in the system", + "key": "team_hierarchy_duplicate_membership", + "tag": "Teams", + "operationId": "CreateTeamMembership" + }, { "parameters": [ { @@ -2043,6 +2075,18 @@ "tag": "Users", "operationId": "SendInvitations" }, + { + "parameters": [ + { + "name": "body", + "value": "{\n \"data\": {\n \"type\": \"users\",\n \"attributes\": {\n \"email\": \"hierarchy-{{ unique }}@datadoghq.com\",\n \"name\": \"Hierarchy member\"\n }\n }\n}" + } + ], + "step": "there is a valid \"team_hierarchy_user\" in the system", + "key": "team_hierarchy_user", + "tag": "Users", + "operationId": "CreateUser" + }, { "parameters": [ { diff --git a/tests/v2/features/teams.feature b/tests/v2/features/teams.feature index be7d684a43..9bdf0e7ab4 100644 --- a/tests/v2/features/teams.feature +++ b/tests/v2/features/teams.feature @@ -378,6 +378,233 @@ Feature: Teams When the request with pagination is sent Then the response status is 200 OK + @team:ddoghq/teams-and-ownership + Scenario: Get team hierarchy members deduplicates direct and inherited membership + Given operation "ListTeamHierarchyMembers" enabled + And new "ListTeamHierarchyMembers" request + And there is a valid "dd_team" in the system + And there is a valid "dd_team_2" in the system + And there is a valid "team_hierarchy_link" in the system + And there is a valid "team_hierarchy_user" in the system + And there is a valid "team_hierarchy_child_membership" in the system + And there is a valid "user" in the system + And there is a valid "team_membership" in the system + And there is a valid "team_hierarchy_duplicate_membership" in the system + And request contains "team_id" parameter from "dd_team.data.id" + And request contains "filter[keyword]" parameter with value "{{ unique }}" + And request contains "sort" parameter with value "-is_direct,handle" + And request contains "include" parameter with value "team" + When the request is sent + Then the response status is 200 OK + And the response "data" has length 2 + And the response "meta.page.total" is equal to 2 + And the response "data[0].relationships.user.data.id" is equal to "{{ user.data.id }}" + And the response "data[0].attributes.is_direct" is equal to true + And the response "data[0].attributes.direct_role" is equal to "admin" + And the response "data[1].relationships.user.data.id" is equal to "{{ team_hierarchy_user.data.id }}" + And the response "data[1].attributes.is_direct" is equal to false + And the response "included" has length 1 + And the response "included[0].id" is equal to "{{ dd_team.data.id }}" + + @team:ddoghq/teams-and-ownership + Scenario: Get team hierarchy members filters direct members + Given operation "ListTeamHierarchyMembers" enabled + And new "ListTeamHierarchyMembers" request + And there is a valid "dd_team" in the system + And there is a valid "dd_team_2" in the system + And there is a valid "team_hierarchy_link" in the system + And there is a valid "team_hierarchy_user" in the system + And there is a valid "team_hierarchy_child_membership" in the system + And there is a valid "user" in the system + And there is a valid "team_membership" in the system + And request contains "team_id" parameter from "dd_team.data.id" + And request contains "filter[keyword]" parameter with value "{{ unique }}" + And request contains "filter[is_direct_only]" parameter with value true + And request contains "filter[include_service_accounts]" parameter with value false + When the request is sent + Then the response status is 200 OK + And the response "data" has length 1 + And the response "data[0].relationships.user.data.id" is equal to "{{ user.data.id }}" + And the response "data[0].attributes.is_direct" is equal to true + + @team:ddoghq/teams-and-ownership + Scenario: Get team hierarchy members filters names case insensitively + Given operation "ListTeamHierarchyMembers" enabled + And new "ListTeamHierarchyMembers" request + And there is a valid "dd_team" in the system + And there is a valid "dd_team_2" in the system + And there is a valid "team_hierarchy_link" in the system + And there is a valid "team_hierarchy_user" in the system + And there is a valid "team_hierarchy_child_membership" in the system + And request contains "team_id" parameter from "dd_team.data.id" + And request contains "filter[keyword]" parameter with value "hIeRaRcHy MeMbEr" + When the request is sent + Then the response status is 200 OK + And the response "data" has length 1 + And the response "data[0].relationships.user.data.id" is equal to "{{ team_hierarchy_user.data.id }}" + + @team:ddoghq/teams-and-ownership + Scenario: Get team hierarchy members includes inherited users with null root membership attributes + Given operation "ListTeamHierarchyMembers" enabled + And new "ListTeamHierarchyMembers" request + And there is a valid "dd_team" in the system + And there is a valid "dd_team_2" in the system + And there is a valid "team_hierarchy_link" in the system + And there is a valid "team_hierarchy_user" in the system + And there is a valid "team_hierarchy_child_membership" in the system + And request contains "team_id" parameter from "dd_team.data.id" + And request contains "filter[keyword]" parameter with value "{{ unique }}" + And request contains "include" parameter with value "user,team" + When the request is sent + Then the response status is 200 OK + And the response "data" has length 1 + And the response "data[0].attributes.is_direct" is equal to false + And the response "data[0].attributes.direct_role" is equal to null + And the response "data[0].attributes.provisioned_by" is equal to null + And the response "data[0].attributes.provisioned_by_id" is equal to null + And the response "data[0].relationships.user.data.id" is equal to "{{ team_hierarchy_user.data.id }}" + And the response "data[0].relationships.team.data.id" is equal to "{{ dd_team.data.id }}" + And the response "included" has length 2 + And the response "included" has item with field "id" with value "{{ dd_team.data.id }}" + + @team:ddoghq/teams-and-ownership + Scenario: Get team hierarchy members paginates by number and size + Given operation "ListTeamHierarchyMembers" enabled + And new "ListTeamHierarchyMembers" request + And there is a valid "dd_team" in the system + And there is a valid "dd_team_2" in the system + And there is a valid "team_hierarchy_link" in the system + And there is a valid "team_hierarchy_user" in the system + And there is a valid "team_hierarchy_child_membership" in the system + And there is a valid "user" in the system + And there is a valid "team_membership" in the system + And request contains "team_id" parameter from "dd_team.data.id" + And request contains "filter[keyword]" parameter with value "{{ unique }}" + And request contains "sort" parameter with value "-is_direct" + And request contains "page[number]" parameter with value 1 + And request contains "page[size]" parameter with value 1 + When the request is sent + Then the response status is 200 OK + And the response "data" has length 1 + And the response "data[0].attributes.is_direct" is equal to false + And the response "meta.page.type" is equal to "number_size" + And the response "meta.page.number" is equal to 1 + And the response "meta.page.size" is equal to 1 + And the response "meta.page.total" is equal to 2 + + @skip-ruby @team:ddoghq/teams-and-ownership + Scenario: Get team hierarchy members rejects unsupported includes + Given operation "ListTeamHierarchyMembers" enabled + And new "ListTeamHierarchyMembers" request + And there is a valid "dd_team" in the system + And request contains "team_id" parameter from "dd_team.data.id" + And request contains "include" parameter with value "descendants" + When the request is sent + Then the response status is 400 Bad Request + And the response "errors[0].status" is equal to "400" + + @team:ddoghq/teams-and-ownership + Scenario: Get team hierarchy members returns "Bad Request" response + Given operation "ListTeamHierarchyMembers" enabled + And new "ListTeamHierarchyMembers" request + And there is a valid "dd_team" in the system + And request contains "team_id" parameter from "dd_team.data.id" + And request contains "sort" parameter with value "invalid" + When the request is sent + Then the response status is 400 Bad Request + And the response "errors[0].status" is equal to "400" + + @team:ddoghq/teams-and-ownership + Scenario: Get team hierarchy members returns "Not Found" response + Given operation "ListTeamHierarchyMembers" enabled + And new "ListTeamHierarchyMembers" request + And request contains "team_id" parameter with value "00000000-0000-4000-8000-000000000000" + When the request is sent + Then the response status is 404 Not Found + And the response "errors[0].status" is equal to "404" + + @team:ddoghq/teams-and-ownership + Scenario: Get team hierarchy members returns "OK" response + Given operation "ListTeamHierarchyMembers" enabled + And new "ListTeamHierarchyMembers" request + And there is a valid "dd_team" in the system + And there is a valid "user" in the system + And there is a valid "team_membership" in the system + And request contains "team_id" parameter from "dd_team.data.id" + And request contains "filter[keyword]" parameter with value "{{ user.data.attributes.email }}" + And request contains "include" parameter with value "user,team" + When the request is sent + Then the response status is 200 OK + And the response "data" has length 1 + And the response "data[0].id" is equal to "UserTeamRelationship:{{ dd_team.data.id }}:{{ user.data.id }}" + And the response "data[0].type" is equal to "user_team_relationship" + And the response "data[0].attributes.is_direct" is equal to true + And the response "data[0].attributes.direct_role" is equal to "admin" + And the response "data[0].relationships.user.data.type" is equal to "users" + And the response "data[0].relationships.team.data.type" is equal to "teams" + And the response "data[0].relationships.team.data.id" is equal to "{{ dd_team.data.id }}" + And the response "included" has length 2 + And the response "included" has item with field "id" with value "{{ user.data.id }}" + And the response "included" has item with field "id" with value "{{ dd_team.data.id }}" + And the response "meta.page.type" is equal to "offset_limit" + And the response "meta.page.limit" is equal to 100 + And the response "meta.page.total" is equal to 1 + + @team:ddoghq/teams-and-ownership @with-pagination + Scenario: Get team hierarchy members returns "OK" response with pagination + Given operation "ListTeamHierarchyMembers" enabled + And new "ListTeamHierarchyMembers" request + And there is a valid "dd_team" in the system + And there is a valid "dd_team_2" in the system + And there is a valid "team_hierarchy_link" in the system + And there is a valid "team_hierarchy_user" in the system + And there is a valid "team_hierarchy_child_membership" in the system + And there is a valid "user" in the system + And there is a valid "team_membership" in the system + And request contains "team_id" parameter from "dd_team.data.id" + And request contains "filter[keyword]" parameter with value "{{ unique }}" + And request contains "page[size]" parameter with value 1 + When the request with pagination is sent + Then the response status is 200 OK + And the response has 2 items + + @team:ddoghq/teams-and-ownership + Scenario: Get team hierarchy members returns empty results + Given operation "ListTeamHierarchyMembers" enabled + And new "ListTeamHierarchyMembers" request + And there is a valid "dd_team" in the system + And there is a valid "dd_team_2" in the system + And there is a valid "team_hierarchy_link" in the system + And there is a valid "team_hierarchy_user" in the system + And there is a valid "team_hierarchy_child_membership" in the system + And request contains "team_id" parameter from "dd_team.data.id" + And request contains "filter[keyword]" parameter with value "no-matching-member-{{ unique }}" + And request contains "include" parameter with value "user,team" + When the request is sent + Then the response status is 200 OK + And the response "data" has length 0 + And the response "meta.page.total" is equal to 0 + + @team:ddoghq/teams-and-ownership + Scenario: Get team hierarchy members sorts inherited members before direct members + Given operation "ListTeamHierarchyMembers" enabled + And new "ListTeamHierarchyMembers" request + And there is a valid "dd_team" in the system + And there is a valid "dd_team_2" in the system + And there is a valid "team_hierarchy_link" in the system + And there is a valid "team_hierarchy_user" in the system + And there is a valid "team_hierarchy_child_membership" in the system + And there is a valid "user" in the system + And there is a valid "team_membership" in the system + And request contains "team_id" parameter from "dd_team.data.id" + And request contains "filter[keyword]" parameter with value "{{ unique }}" + And request contains "sort" parameter with value "is_direct,-name" + When the request is sent + Then the response status is 200 OK + And the response "data" has length 2 + And the response "data[0].relationships.user.data.id" is equal to "{{ team_hierarchy_user.data.id }}" + And the response "data[1].relationships.user.data.id" is equal to "{{ user.data.id }}" + @team:ddoghq/teams-and-ownership Scenario: Get team memberships returns "API error response." response Given new "GetTeamMemberships" request diff --git a/tests/v2/features/undo.json b/tests/v2/features/undo.json index 37961c9528..3bff824b25 100644 --- a/tests/v2/features/undo.json +++ b/tests/v2/features/undo.json @@ -10990,6 +10990,12 @@ "type": "idempotent" } }, + "ListTeamHierarchyMembers": { + "tag": "Teams", + "undo": { + "type": "safe" + } + }, "GetTeamMemberships": { "tag": "Teams", "undo": {