Skip to content
Open
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: 2 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3256,6 +3256,7 @@ components:
- incident_analytics
- product_analytics
- on_call_events
- errors
example: "logs"
type: string
x-enum-varnames:
Expand All @@ -3272,6 +3273,7 @@ components:
- INCIDENT_ANALYTICS
- PRODUCT_ANALYTICS
- ON_CALL_EVENTS
- ERRORS
FormulaAndFunctionMetricAggregation:
description: The aggregation methods available for metrics queries.
enum:
Expand Down
154 changes: 0 additions & 154 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82733,77 +82733,6 @@ components:
description: The title of the event.
example: "The event title"
type: string
ValidateAPIKeyResponse:
description: Response object for the API and application key validation status check.
properties:
status:
$ref: "#/components/schemas/ValidateAPIKeyStatus"
required:
- status
type: object
ValidateAPIKeyStatus:
description: Status of the validation. Always `ok` when both the API key and the application key are valid.
enum:
- ok
example: ok
type: string
x-enum-varnames:
- OK
ValidateV2Attributes:
description: Attributes of the API key validation response.
properties:
api_key_id:
description: The UUID of the API key.
example: "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6"
type: string
api_key_scopes:
description: List of scope names associated with the API key.
example:
- "remote_config_read"
items:
type: string
type: array
valid:
description: Whether the API key is valid.
example: true
type: boolean
required:
- valid
- api_key_scopes
- api_key_id
type: object
ValidateV2Data:
description: Data object containing the API key validation result.
properties:
attributes:
$ref: "#/components/schemas/ValidateV2Attributes"
id:
description: The UUID of the organization associated with the API key.
example: "550e8400-e29b-41d4-a716-446655440000"
type: string
type:
$ref: "#/components/schemas/ValidateV2Type"
required:
- id
- type
- attributes
type: object
ValidateV2Response:
description: Response for the API key validation endpoint.
properties:
data:
$ref: "#/components/schemas/ValidateV2Data"
required:
- data
type: object
ValidateV2Type:
description: Resource type for the API key validation response.
enum:
- validate_v2
example: validate_v2
type: string
x-enum-varnames:
- ValidateV2
ValidationError:
description: Represents a single validation error, including a human-readable title and metadata.
properties:
Expand Down Expand Up @@ -145701,89 +145630,6 @@ paths:
operator: OR
permissions:
- teams_read
/api/v2/validate:
get:
description: Check if the API key is valid. Returns the organization UUID, API key ID, and associated scopes.
operationId: Validate
responses:
"200":
content:
application/json:
examples:
default:
value:
data:
attributes:
api_key_id: "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6"
api_key_scopes:
- "remote_config_read"
valid: true
id: "550e8400-e29b-41d4-a716-446655440000"
type: "validate_v2"
schema:
$ref: "#/components/schemas/ValidateV2Response"
description: OK
"403":
content:
application/json:
schema:
$ref: "#/components/schemas/JSONAPIErrorResponse"
description: Forbidden
"429":
$ref: "#/components/responses/TooManyRequestsResponse"
security:
- apiKeyAuth: []
summary: Validate API key
tags:
- Key Management
"x-permission":
operator: OPEN
permissions: []
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/validate_keys:
get:
description: |-
Check that the API key and application key used for the request are both valid.
Returns `{"status": "ok"}` on success, `401` or `403` otherwise. Useful as a
lightweight authentication probe before issuing other API calls that require
full credentials.
operationId: ValidateAPIKey
responses:
"200":
content:
application/json:
examples:
default:
value:
status: ok
schema:
$ref: "#/components/schemas/ValidateAPIKeyResponse"
description: OK
"401":
content:
application/json:
schema:
$ref: "#/components/schemas/APIErrorResponse"
description: Unauthorized
"403":
content:
application/json:
schema:
$ref: "#/components/schemas/APIErrorResponse"
description: Forbidden
"429":
$ref: "#/components/responses/TooManyRequestsResponse"
security:
- apiKeyAuth: []
appKeyAuth: []
summary: Validate API and application keys
tags:
- Key Management
"x-permission":
operator: OPEN
permissions: []
/api/v2/web-integrations/{integration_name}/accounts:
get:
description: List accounts for a given web integration.
Expand Down
42 changes: 0 additions & 42 deletions docs/datadog_api_client.v2.model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36516,48 +36516,6 @@ datadog\_api\_client.v2.model.v2\_event\_response module
:members:
:show-inheritance:

datadog\_api\_client.v2.model.validate\_api\_key\_response module
-----------------------------------------------------------------

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

datadog\_api\_client.v2.model.validate\_api\_key\_status module
---------------------------------------------------------------

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

datadog\_api\_client.v2.model.validate\_v2\_attributes module
-------------------------------------------------------------

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

datadog\_api\_client.v2.model.validate\_v2\_data module
-------------------------------------------------------

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

datadog\_api\_client.v2.model.validate\_v2\_response module
-----------------------------------------------------------

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

datadog\_api\_client.v2.model.validate\_v2\_type module
-------------------------------------------------------

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

datadog\_api\_client.v2.model.validation\_error module
------------------------------------------------------

Expand Down
14 changes: 0 additions & 14 deletions examples/v2/key-management/Validate.py

This file was deleted.

13 changes: 0 additions & 13 deletions examples/v2/key-management/ValidateAPIKey.py

This file was deleted.

1 change: 0 additions & 1 deletion src/datadog_api_client/configuration.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,7 +295,6 @@ def __init__(
"v2.update_llm_obs_experiment": False,
"v2.update_llm_obs_project": False,
"v2.anonymize_users": False,
"v2.validate": False,
"v2.create_open_api": False,
"v2.delete_open_api": False,
"v2.get_open_api": False,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class FormulaAndFunctionEventsDataSource(ModelSimple):
"""
Data source for event platform-based queries.

:param value: Must be one of ["logs", "spans", "network", "rum", "security_signals", "profiles", "audit", "events", "ci_tests", "ci_pipelines", "incident_analytics", "product_analytics", "on_call_events"].
:param value: Must be one of ["logs", "spans", "network", "rum", "security_signals", "profiles", "audit", "events", "ci_tests", "ci_pipelines", "incident_analytics", "product_analytics", "on_call_events", "errors"].
:type value: str
"""

Expand All @@ -34,6 +34,7 @@ class FormulaAndFunctionEventsDataSource(ModelSimple):
"incident_analytics",
"product_analytics",
"on_call_events",
"errors",
}
LOGS: ClassVar["FormulaAndFunctionEventsDataSource"]
SPANS: ClassVar["FormulaAndFunctionEventsDataSource"]
Expand All @@ -48,6 +49,7 @@ class FormulaAndFunctionEventsDataSource(ModelSimple):
INCIDENT_ANALYTICS: ClassVar["FormulaAndFunctionEventsDataSource"]
PRODUCT_ANALYTICS: ClassVar["FormulaAndFunctionEventsDataSource"]
ON_CALL_EVENTS: ClassVar["FormulaAndFunctionEventsDataSource"]
ERRORS: ClassVar["FormulaAndFunctionEventsDataSource"]

@cached_property
def openapi_types(_):
Expand All @@ -69,3 +71,4 @@ def openapi_types(_):
FormulaAndFunctionEventsDataSource.INCIDENT_ANALYTICS = FormulaAndFunctionEventsDataSource("incident_analytics")
FormulaAndFunctionEventsDataSource.PRODUCT_ANALYTICS = FormulaAndFunctionEventsDataSource("product_analytics")
FormulaAndFunctionEventsDataSource.ON_CALL_EVENTS = FormulaAndFunctionEventsDataSource("on_call_events")
FormulaAndFunctionEventsDataSource.ERRORS = FormulaAndFunctionEventsDataSource("errors")
61 changes: 0 additions & 61 deletions src/datadog_api_client/v2/api/key_management_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
from datadog_api_client.v2.model.personal_access_token_create_request import PersonalAccessTokenCreateRequest
from datadog_api_client.v2.model.personal_access_token_response import PersonalAccessTokenResponse
from datadog_api_client.v2.model.personal_access_token_update_request import PersonalAccessTokenUpdateRequest
from datadog_api_client.v2.model.validate_v2_response import ValidateV2Response
from datadog_api_client.v2.model.validate_api_key_response import ValidateAPIKeyResponse


class KeyManagementApi:
Expand Down Expand Up @@ -624,38 +622,6 @@ def __init__(self, api_client=None):
api_client=api_client,
)

self._validate_endpoint = _Endpoint(
settings={
"response_type": (ValidateV2Response,),
"auth": ["apiKeyAuth"],
"endpoint_path": "/api/v2/validate",
"operation_id": "validate",
"http_method": "GET",
"version": "v2",
},
params_map={},
headers_map={
"accept": ["application/json"],
},
api_client=api_client,
)

self._validate_api_key_endpoint = _Endpoint(
settings={
"response_type": (ValidateAPIKeyResponse,),
"auth": ["apiKeyAuth", "appKeyAuth"],
"endpoint_path": "/api/v2/validate_keys",
"operation_id": "validate_api_key",
"http_method": "GET",
"version": "v2",
},
params_map={},
headers_map={
"accept": ["application/json"],
},
api_client=api_client,
)

def create_api_key(
self,
body: APIKeyCreateRequest,
Expand Down Expand Up @@ -1179,30 +1145,3 @@ def update_personal_access_token(
kwargs["body"] = body

return self._update_personal_access_token_endpoint.call_with_http_info(**kwargs)

def validate(
self,
) -> ValidateV2Response:
"""Validate API key.

Check if the API key is valid. Returns the organization UUID, API key ID, and associated scopes.

:rtype: ValidateV2Response
"""
kwargs: Dict[str, Any] = {}
return self._validate_endpoint.call_with_http_info(**kwargs)

def validate_api_key(
self,
) -> ValidateAPIKeyResponse:
"""Validate API and application keys.

Check that the API key and application key used for the request are both valid.
Returns ``{"status": "ok"}`` on success, ``401`` or ``403`` otherwise. Useful as a
lightweight authentication probe before issuing other API calls that require
full credentials.

:rtype: ValidateAPIKeyResponse
"""
kwargs: Dict[str, Any] = {}
return self._validate_api_key_endpoint.call_with_http_info(**kwargs)
Loading
Loading