Skip to content

Commit c3f51cd

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 5b4da40 of spec repo
1 parent a12da75 commit c3f51cd

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
@@ -82245,6 +82245,61 @@ components:
8224582245
description: The title of the event.
8224682246
example: "The event title"
8224782247
type: string
82248+
ValidateV2Attributes:
82249+
description: Attributes of the API key validation response.
82250+
properties:
82251+
api_key_id:
82252+
description: The UUID of the API key.
82253+
example: "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6"
82254+
type: string
82255+
api_key_scopes:
82256+
description: List of scope names associated with the API key.
82257+
example:
82258+
- "remote_config_read"
82259+
items:
82260+
type: string
82261+
type: array
82262+
valid:
82263+
description: Whether the API key is valid.
82264+
example: true
82265+
type: boolean
82266+
required:
82267+
- valid
82268+
- api_key_scopes
82269+
- api_key_id
82270+
type: object
82271+
ValidateV2Data:
82272+
description: Data object containing the API key validation result.
82273+
properties:
82274+
attributes:
82275+
$ref: "#/components/schemas/ValidateV2Attributes"
82276+
id:
82277+
description: The UUID of the organization associated with the API key.
82278+
example: "550e8400-e29b-41d4-a716-446655440000"
82279+
type: string
82280+
type:
82281+
$ref: "#/components/schemas/ValidateV2Type"
82282+
required:
82283+
- id
82284+
- type
82285+
- attributes
82286+
type: object
82287+
ValidateV2Response:
82288+
description: Response for the API key validation endpoint.
82289+
properties:
82290+
data:
82291+
$ref: "#/components/schemas/ValidateV2Data"
82292+
required:
82293+
- data
82294+
type: object
82295+
ValidateV2Type:
82296+
description: Resource type for the API key validation response.
82297+
enum:
82298+
- validate_v2
82299+
example: validate_v2
82300+
type: string
82301+
x-enum-varnames:
82302+
- ValidateV2
8224882303
ValidationError:
8224982304
description: Represents a single validation error, including a human-readable title and metadata.
8225082305
properties:
@@ -144871,6 +144926,47 @@ paths:
144871144926
operator: OR
144872144927
permissions:
144873144928
- teams_read
144929+
/api/v2/validate:
144930+
get:
144931+
description: Check if the API key is valid. Returns the organization UUID, API key ID, and associated scopes.
144932+
operationId: Validate
144933+
responses:
144934+
"200":
144935+
content:
144936+
application/json:
144937+
examples:
144938+
default:
144939+
value:
144940+
data:
144941+
attributes:
144942+
api_key_id: "a1b2c3d4-e5f6-47a8-b9c0-d1e2f3a4b5c6"
144943+
api_key_scopes:
144944+
- "remote_config_read"
144945+
valid: true
144946+
id: "550e8400-e29b-41d4-a716-446655440000"
144947+
type: "validate_v2"
144948+
schema:
144949+
$ref: "#/components/schemas/ValidateV2Response"
144950+
description: OK
144951+
"403":
144952+
content:
144953+
application/json:
144954+
schema:
144955+
$ref: "#/components/schemas/JSONAPIErrorResponse"
144956+
description: Forbidden
144957+
"429":
144958+
$ref: "#/components/responses/TooManyRequestsResponse"
144959+
security:
144960+
- apiKeyAuth: []
144961+
summary: Validate API key
144962+
tags:
144963+
- Key Management
144964+
"x-permission":
144965+
operator: OPEN
144966+
permissions: []
144967+
x-unstable: |-
144968+
**Note**: This endpoint is in preview and is subject to change.
144969+
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).
144874144970
/api/v2/widgets/{experience_type}:
144875144971
get:
144876144972
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)