Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document missing parameters #1680

Merged
Merged
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
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2023-10-23 18:35:36.214958",
"spec_repo_commit": "696abec0"
"regenerated": "2023-10-24 18:01:02.090771",
"spec_repo_commit": "7e490450"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2023-10-23 18:35:36.233010",
"spec_repo_commit": "696abec0"
"regenerated": "2023-10-24 18:01:02.104260",
"spec_repo_commit": "7e490450"
}
}
}
78 changes: 76 additions & 2 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,13 @@ components:
headers: {}
links: {}
parameters:
APIKeyCategoryParameter:
description: Filter API keys by category.
in: query
name: filter[category]
required: false
schema:
type: string
APIKeyFilterCreatedAtEndParameter:
description: Only include API keys created on or before the specified date.
in: query
Expand Down Expand Up @@ -59,6 +66,13 @@ components:
schema:
example: created_by,modified_by
type: string
APIKeyReadConfigReadEnabledParameter:
description: Filter API keys by remote config read enabled status.
in: query
name: filter[remote_config_read_enabled]
required: false
schema:
type: boolean
APIKeysSortParameter:
description: 'API key attribute used to sort results. Sort order is ascending

Expand Down Expand Up @@ -17744,6 +17758,41 @@ components:
required:
- data
type: object
TeamsField:
description: Supported teams field.
enum:
- id
- name
- handle
- summary
- description
- avatar
- banner
- visible_modules
- hidden_modules
- created_at
- modified_at
- user_count
- link_count
- team_links
- user_team_permissions
type: string
x-enum-varnames:
- ID
- NAME
- HANDLE
- SUMMARY
- DESCRIPTION
- AVATAR
- BANNER
- VISIBLE_MODULES
- HIDDEN_MODULES
- CREATED_AT
- MODIFIED_AT
- USER_COUNT
- LINK_COUNT
- TEAM_LINKS
- USER_TEAM_PERMISSIONS
TeamsResponse:
description: Response with multiple teams
properties:
Expand Down Expand Up @@ -18378,8 +18427,8 @@ components:
description: User team permission attributes
properties:
permissions:
description: Object of team permission actions and boolean values indicating
of the currently logged in user can perform them on this team
description: Object of team permission actions and boolean values that a
logged in user can perform on this team.
readOnly: true
type: object
type: object
Expand Down Expand Up @@ -18634,6 +18683,8 @@ paths:
- $ref: '#/components/parameters/APIKeyFilterModifiedAtStartParameter'
- $ref: '#/components/parameters/APIKeyFilterModifiedAtEndParameter'
- $ref: '#/components/parameters/APIKeyIncludeParameter'
- $ref: '#/components/parameters/APIKeyReadConfigReadEnabledParameter'
- $ref: '#/components/parameters/APIKeyCategoryParameter'
responses:
'200':
content:
Expand Down Expand Up @@ -19067,6 +19118,7 @@ paths:
- $ref: '#/components/parameters/ApplicationKeyFilterParameter'
- $ref: '#/components/parameters/ApplicationKeyFilterCreatedAtStartParameter'
- $ref: '#/components/parameters/ApplicationKeyFilterCreatedAtEndParameter'
- $ref: '#/components/parameters/ApplicationKeyIncludeParameter'
responses:
'200':
content:
Expand Down Expand Up @@ -20106,6 +20158,7 @@ paths:
- $ref: '#/components/parameters/ApplicationKeyFilterParameter'
- $ref: '#/components/parameters/ApplicationKeyFilterCreatedAtStartParameter'
- $ref: '#/components/parameters/ApplicationKeyFilterCreatedAtEndParameter'
- $ref: '#/components/parameters/ApplicationKeyIncludeParameter'
responses:
'200':
content:
Expand Down Expand Up @@ -25055,6 +25108,12 @@ paths:
required: false
schema:
type: string
- description: Filter all roles by the given list of role IDs.
in: query
name: filter[id]
required: false
schema:
type: string
responses:
'200':
content:
Expand Down Expand Up @@ -27775,12 +27834,14 @@ paths:
- description: Specifies the order of the returned teams
in: query
name: sort
required: false
schema:
$ref: '#/components/schemas/ListTeamsSort'
- description: 'Included related resources optionally requested. Allowed enum
values: `team_links, user_team_permissions`'
in: query
name: include
required: false
schema:
items:
$ref: '#/components/schemas/ListTeamsInclude'
Expand All @@ -27789,13 +27850,24 @@ paths:
member
in: query
name: filter[keyword]
required: false
schema:
type: string
- description: When true, only returns teams the current user belongs to
in: query
name: filter[me]
required: false
schema:
type: boolean
- description: List of fields that need to be fetched.
explode: false
in: query
name: fields[team]
required: false
schema:
items:
$ref: '#/components/schemas/TeamsField'
type: array
responses:
'200':
content:
Expand Down Expand Up @@ -28210,11 +28282,13 @@ paths:
- description: Specifies the order of returned team memberships
in: query
name: sort
required: false
schema:
$ref: '#/components/schemas/GetTeamMembershipsSort'
- description: Search query, can be user email or name
in: query
name: filter[keyword]
required: false
schema:
type: string
responses:
Expand Down
7 changes: 7 additions & 0 deletions docs/datadog_api_client.v2.model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7918,6 +7918,13 @@ team\_update\_request
:members:
:show-inheritance:

teams\_field
------------

.. automodule:: datadog_api_client.v2.model.teams_field
:members:
:show-inheritance:

teams\_response
---------------

Expand Down
20 changes: 20 additions & 0 deletions examples/v2/teams/ListTeams_3429963470.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
"""
Get all teams with fields_team parameter returns "OK" response
"""

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.teams_api import TeamsApi
from datadog_api_client.v2.model.teams_field import TeamsField

configuration = Configuration()
with ApiClient(configuration) as api_client:
api_instance = TeamsApi(api_client)
response = api_instance.list_teams(
fields_team=[
TeamsField.ID,
TeamsField.NAME,
TeamsField.HANDLE,
],
)

print(response)
44 changes: 44 additions & 0 deletions src/datadog_api_client/v2/api/key_management_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,16 @@ def __init__(self, api_client=None):
"attribute": "include",
"location": "query",
},
"filter_remote_config_read_enabled": {
"openapi_types": (bool,),
"attribute": "filter[remote_config_read_enabled]",
"location": "query",
},
"filter_category": {
"openapi_types": (str,),
"attribute": "filter[category]",
"location": "query",
},
},
headers_map={
"accept": ["application/json"],
Expand Down Expand Up @@ -326,6 +336,11 @@ def __init__(self, api_client=None):
"attribute": "filter[created_at][end]",
"location": "query",
},
"include": {
"openapi_types": (str,),
"attribute": "include",
"location": "query",
},
},
headers_map={
"accept": ["application/json"],
Expand Down Expand Up @@ -373,6 +388,11 @@ def __init__(self, api_client=None):
"attribute": "filter[created_at][end]",
"location": "query",
},
"include": {
"openapi_types": (str,),
"attribute": "include",
"location": "query",
},
},
headers_map={
"accept": ["application/json"],
Expand Down Expand Up @@ -618,6 +638,8 @@ def list_api_keys(
filter_modified_at_start: Union[str, UnsetType] = unset,
filter_modified_at_end: Union[str, UnsetType] = unset,
include: Union[str, UnsetType] = unset,
filter_remote_config_read_enabled: Union[bool, UnsetType] = unset,
filter_category: Union[str, UnsetType] = unset,
) -> APIKeysResponse:
"""Get all API keys.

Expand All @@ -643,6 +665,10 @@ def list_api_keys(
:type filter_modified_at_end: str, optional
:param include: Comma separated list of resource paths for related resources to include in the response. Supported resource paths are ``created_by`` and ``modified_by``.
:type include: str, optional
:param filter_remote_config_read_enabled: Filter API keys by remote config read enabled status.
:type filter_remote_config_read_enabled: bool, optional
:param filter_category: Filter API keys by category.
:type filter_category: str, optional
:rtype: APIKeysResponse
"""
kwargs: Dict[str, Any] = {}
Expand Down Expand Up @@ -673,6 +699,12 @@ def list_api_keys(
if include is not unset:
kwargs["include"] = include

if filter_remote_config_read_enabled is not unset:
kwargs["filter_remote_config_read_enabled"] = filter_remote_config_read_enabled

if filter_category is not unset:
kwargs["filter_category"] = filter_category

return self._list_api_keys_endpoint.call_with_http_info(**kwargs)

def list_application_keys(
Expand All @@ -684,6 +716,7 @@ def list_application_keys(
filter: Union[str, UnsetType] = unset,
filter_created_at_start: Union[str, UnsetType] = unset,
filter_created_at_end: Union[str, UnsetType] = unset,
include: Union[str, UnsetType] = unset,
) -> ListApplicationKeysResponse:
"""Get all application keys.

Expand All @@ -703,6 +736,8 @@ def list_application_keys(
:type filter_created_at_start: str, optional
:param filter_created_at_end: Only include application keys created on or before the specified date.
:type filter_created_at_end: str, optional
:param include: Resource path for related resources to include in the response. Only ``owned_by`` is supported.
:type include: str, optional
:rtype: ListApplicationKeysResponse
"""
kwargs: Dict[str, Any] = {}
Expand All @@ -724,6 +759,9 @@ def list_application_keys(
if filter_created_at_end is not unset:
kwargs["filter_created_at_end"] = filter_created_at_end

if include is not unset:
kwargs["include"] = include

return self._list_application_keys_endpoint.call_with_http_info(**kwargs)

def list_current_user_application_keys(
Expand All @@ -735,6 +773,7 @@ def list_current_user_application_keys(
filter: Union[str, UnsetType] = unset,
filter_created_at_start: Union[str, UnsetType] = unset,
filter_created_at_end: Union[str, UnsetType] = unset,
include: Union[str, UnsetType] = unset,
) -> ListApplicationKeysResponse:
"""Get all application keys owned by current user.

Expand All @@ -754,6 +793,8 @@ def list_current_user_application_keys(
:type filter_created_at_start: str, optional
:param filter_created_at_end: Only include application keys created on or before the specified date.
:type filter_created_at_end: str, optional
:param include: Resource path for related resources to include in the response. Only ``owned_by`` is supported.
:type include: str, optional
:rtype: ListApplicationKeysResponse
"""
kwargs: Dict[str, Any] = {}
Expand All @@ -775,6 +816,9 @@ def list_current_user_application_keys(
if filter_created_at_end is not unset:
kwargs["filter_created_at_end"] = filter_created_at_end

if include is not unset:
kwargs["include"] = include

return self._list_current_user_application_keys_endpoint.call_with_http_info(**kwargs)

def update_api_key(
Expand Down
11 changes: 11 additions & 0 deletions src/datadog_api_client/v2/api/roles_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,6 +255,11 @@ def __init__(self, api_client=None):
"attribute": "filter",
"location": "query",
},
"filter_id": {
"openapi_types": (str,),
"attribute": "filter[id]",
"location": "query",
},
},
headers_map={
"accept": ["application/json"],
Expand Down Expand Up @@ -532,6 +537,7 @@ def list_roles(
page_number: Union[int, UnsetType] = unset,
sort: Union[RolesSort, UnsetType] = unset,
filter: Union[str, UnsetType] = unset,
filter_id: Union[str, UnsetType] = unset,
) -> RolesResponse:
"""List roles.

Expand All @@ -547,6 +553,8 @@ def list_roles(
:type sort: RolesSort, optional
:param filter: Filter all roles by the given string.
:type filter: str, optional
:param filter_id: Filter all roles by the given list of role IDs.
:type filter_id: str, optional
:rtype: RolesResponse
"""
kwargs: Dict[str, Any] = {}
Expand All @@ -562,6 +570,9 @@ def list_roles(
if filter is not unset:
kwargs["filter"] = filter

if filter_id is not unset:
kwargs["filter_id"] = filter_id

return self._list_roles_endpoint.call_with_http_info(**kwargs)

def list_role_users(
Expand Down
Loading
Loading