Skip to content

Commit d7e9b74

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 6991a08 of spec repo
1 parent 3310c36 commit d7e9b74

11 files changed

Lines changed: 761 additions & 47 deletions

File tree

.generator/schemas/v2/openapi.yaml

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81946,6 +81946,61 @@ components:
8194681946
description: The title of the event.
8194781947
example: "The event title"
8194881948
type: string
81949+
ValidateV2Attributes:
81950+
description: Attributes of the API key validation response.
81951+
properties:
81952+
api_key_id:
81953+
description: The UUID of the API key.
81954+
example: "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6"
81955+
type: string
81956+
api_key_scopes:
81957+
description: List of scope names associated with the API key.
81958+
example:
81959+
- "remote_config_read"
81960+
items:
81961+
type: string
81962+
type: array
81963+
valid:
81964+
description: Whether the API key is valid.
81965+
example: true
81966+
type: boolean
81967+
required:
81968+
- valid
81969+
- api_key_scopes
81970+
- api_key_id
81971+
type: object
81972+
ValidateV2Data:
81973+
description: Data object containing the API key validation result.
81974+
properties:
81975+
attributes:
81976+
$ref: "#/components/schemas/ValidateV2Attributes"
81977+
id:
81978+
description: The UUID of the organization associated with the API key.
81979+
example: "550e8400-e29b-41d4-a716-446655440000"
81980+
type: string
81981+
type:
81982+
$ref: "#/components/schemas/ValidateV2Type"
81983+
required:
81984+
- id
81985+
- type
81986+
- attributes
81987+
type: object
81988+
ValidateV2Response:
81989+
description: Response for the API key validation endpoint.
81990+
properties:
81991+
data:
81992+
$ref: "#/components/schemas/ValidateV2Data"
81993+
required:
81994+
- data
81995+
type: object
81996+
ValidateV2Type:
81997+
description: Resource type for the API key validation response.
81998+
enum:
81999+
- validate_v2
82000+
example: validate_v2
82001+
type: string
82002+
x-enum-varnames:
82003+
- ValidateV2
8194982004
ValidationError:
8195082005
description: Represents a single validation error, including a human-readable title and metadata.
8195182006
properties:
@@ -144508,6 +144563,47 @@ paths:
144508144563
operator: OR
144509144564
permissions:
144510144565
- teams_read
144566+
/api/v2/validate:
144567+
get:
144568+
description: Check if the API key is valid. Returns the organization UUID, API key ID, and associated scopes.
144569+
operationId: Validate
144570+
responses:
144571+
"200":
144572+
content:
144573+
application/json:
144574+
examples:
144575+
default:
144576+
value:
144577+
data:
144578+
attributes:
144579+
api_key_id: "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6"
144580+
api_key_scopes:
144581+
- "remote_config_read"
144582+
valid: true
144583+
id: "550e8400-e29b-41d4-a716-446655440000"
144584+
type: "validate_v2"
144585+
schema:
144586+
$ref: "#/components/schemas/ValidateV2Response"
144587+
description: OK
144588+
"403":
144589+
content:
144590+
application/json:
144591+
schema:
144592+
$ref: "#/components/schemas/JSONAPIErrorResponse"
144593+
description: Forbidden
144594+
"429":
144595+
$ref: "#/components/responses/TooManyRequestsResponse"
144596+
security:
144597+
- apiKeyAuth: []
144598+
summary: Validate API key
144599+
tags:
144600+
- Key Management
144601+
"x-permission":
144602+
operator: OPEN
144603+
permissions: []
144604+
x-unstable: |-
144605+
**Note**: This endpoint is in preview and is subject to change.
144606+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
144511144607
/api/v2/widgets/{experience_type}:
144512144608
get:
144513144609
description: |-
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Validate API key returns "OK" response
2+
3+
require "datadog_api_client"
4+
DatadogAPIClient.configure do |config|
5+
config.unstable_operations["v2.validate".to_sym] = true
6+
end
7+
api_instance = DatadogAPIClient::V2::KeyManagementAPI.new
8+
p api_instance.validate()

0 commit comments

Comments
 (0)