Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -226475,7 +226475,7 @@ paths:
appKeyAuth: []
- AuthZ:
- teams_read
summary: Get all teams
summary: Get all teams with a test
tags:
- Teams
x-pagination:
Expand Down
2 changes: 1 addition & 1 deletion examples/v2/teams/ListTeams.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
Get all teams returns "OK" response
Get all teams with a test returns "OK" response
"""

from os import environ
Expand Down
15 changes: 15 additions & 0 deletions examples/v2/teams/ListTeams_3385988823.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
"""
Get all teams with a test 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

configuration = Configuration()
configuration.access_token = environ["DD_BEARER_TOKEN"]
with ApiClient(configuration) as api_client:
api_instance = TeamsApi(api_client)
items = api_instance.list_teams_with_pagination()
for item in items:
print(item)
15 changes: 15 additions & 0 deletions examples/v2/teams/ListTeams_3712027764.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
"""
Get all teams returns "OK" response
"""

from os import environ
from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.teams_api import TeamsApi

configuration = Configuration()
configuration.access_token = environ["DD_BEARER_TOKEN"]
with ApiClient(configuration) as api_client:
api_instance = TeamsApi(api_client)
response = api_instance.list_teams()

print(response)
4 changes: 2 additions & 2 deletions src/datadog_api_client/v2/api/teams_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1816,7 +1816,7 @@ def list_teams(
filter_me: Union[bool, UnsetType] = unset,
fields_team: Union[List[TeamsField], UnsetType] = unset,
) -> TeamsResponse:
"""Get all teams.
"""Get all teams with a test.

Get all teams.
Can be used to search for teams using the ``filter[keyword]`` and ``filter[me]`` query parameters.
Expand Down Expand Up @@ -1872,7 +1872,7 @@ def list_teams_with_pagination(
filter_me: Union[bool, UnsetType] = unset,
fields_team: Union[List[TeamsField], UnsetType] = unset,
) -> collections.abc.Iterable[Team]:
"""Get all teams.
"""Get all teams with a test.

Provide a paginated version of :meth:`list_teams`, returning all items.

Expand Down
12 changes: 12 additions & 0 deletions tests/v2/features/teams.feature
Original file line number Diff line number Diff line change
Expand Up @@ -312,6 +312,18 @@ Feature: Teams
Then the response status is 200 OK
And the response has 3 items

@generated @skip @team:DataDog/aaa-omg
Scenario: Get all teams with a test returns "OK" response
Given new "ListTeams" request
When the request is sent
Then the response status is 200 OK

@generated @skip @team:DataDog/aaa-omg @with-pagination
Scenario: Get all teams with a test returns "OK" response with pagination
Given new "ListTeams" request
When the request with pagination is sent
Then the response status is 200 OK

@team:DataDog/aaa-omg
Scenario: Get all teams with fields_team parameter returns "OK" response
Given new "ListTeams" request
Expand Down
Loading