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
320 changes: 320 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1909,6 +1909,14 @@ components:
required: true
schema:
type: string
VercelConfigurationID:
description: The Vercel configuration ID.
example: icfg_abc123
in: path
name: configuration_id
required: true
schema:
type: string
ViewIDPathParameter:
description: The UUID of the case view.
example: a1b2c3d4-e5f6-7890-abcd-ef1234567890
Expand Down Expand Up @@ -106727,6 +106735,168 @@ components:
required:
- value
type: object
VercelApiKey:
description: Datadog API key reference used by the Vercel integration to send telemetry.
properties:
id:
description: ID of the Datadog API key used by the Vercel integration.
example: 00000000-0000-0000-0000-000000000001
type: string
value:
description: Value of the Datadog API key. Returned as an empty string in read responses.
example: ""
type: string
required:
- id
- value
type: object
VercelConfigAttributes:
description: Attributes of the Datadog Vercel integration configuration.
properties:
apiKey:
$ref: "#/components/schemas/VercelApiKey"
logsConfig:
$ref: "#/components/schemas/VercelLogsConfig"
traceConfig:
$ref: "#/components/schemas/VercelTraceConfig"
required:
- apiKey
- logsConfig
- traceConfig
type: object
VercelConfigDataResponse:
description: Vercel configuration data returned by the API.
properties:
attributes:
$ref: "#/components/schemas/VercelConfigAttributes"
id:
description: Vercel configuration ID.
example: icfg_abc123
type: string
type:
$ref: "#/components/schemas/VercelConfigDataResponseType"
required:
- id
- type
- attributes
type: object
VercelConfigDataResponseType:
default: vercelConfiguration
description: Type identifier for a Vercel configuration resource.
enum:
- vercelConfiguration
example: vercelConfiguration
type: string
x-enum-varnames:
- VERCEL_CONFIGURATION
VercelConfigResponse:
description: Response containing the Datadog Vercel integration configuration.
properties:
data:
$ref: "#/components/schemas/VercelConfigDataResponse"
required:
- data
type: object
VercelEnvironment:
description: Vercel deployment environment.
enum:
- production
- preview
example: production
type: string
x-enum-varnames:
- PRODUCTION
- PREVIEW
VercelLogSource:
description: Source of logs that Vercel forwards to Datadog.
enum:
- static
- lambda
- edge
- build
- external
- firewall
example: lambda
type: string
x-enum-varnames:
- STATIC
- LAMBDA
- EDGE
- BUILD
- EXTERNAL
- FIREWALL
VercelLogsConfig:
description: Logs forwarding configuration for the Vercel integration.
properties:
enabled:
description: Whether logs forwarding is enabled.
example: true
type: boolean
environments:
description: List of Vercel deployment environments to forward telemetry from.
example:
- production
items:
$ref: "#/components/schemas/VercelEnvironment"
type: array
logSources:
description: List of Vercel log sources to forward to Datadog.
example:
- lambda
items:
$ref: "#/components/schemas/VercelLogSource"
type: array
samplingPercentage:
description: Percentage of logs to forward to Datadog, between 0 and 100.
example: 100
format: int32
maximum: 100
minimum: 0
type: integer
required:
- enabled
- samplingPercentage
- logSources
- environments
type: object
VercelTokenCreateRequest:
description: Request to exchange a Vercel marketplace authorization code for a Datadog-managed access token.
properties:
authGrantCode:
description: OAuth authorization code received from the Vercel marketplace flow.
example: code
type: string
vercelConfigurationId:
description: Vercel configuration identifier returned by the marketplace flow.
example: icfg_abc123
type: string
required:
- authGrantCode
- vercelConfigurationId
type: object
VercelTraceConfig:
description: Tracing configuration for the Vercel integration.
properties:
enabled:
description: Whether tracing is enabled.
example: true
type: boolean
isDeprecatedOtel:
description: Whether the configuration uses the deprecated OpenTelemetry tracing setup.
example: false
type: boolean
samplingPercentage:
description: Percentage of traces to forward to Datadog, between 0 and 100.
example: 100
format: int32
maximum: 100
minimum: 0
type: integer
required:
- enabled
- samplingPercentage
- isDeprecatedOtel
type: object
Version:
description: Version of the notification rule. It is updated when the rule is modified.
example: 1
Expand Down Expand Up @@ -191561,6 +191731,154 @@ paths:
"x-permission":
operator: OPEN
permissions: []
/api/v2/vercel/config/{configuration_id}:
get:
description: Retrieve the Datadog Vercel integration configuration for a given Vercel configuration. The response contains the API key reference, logs forwarding settings, and tracing settings stored in Datadog for this configuration.
operationId: GetVercelConfig
parameters:
- $ref: "#/components/parameters/VercelConfigurationID"
responses:
"200":
content:
application/json:
examples:
default:
value:
data:
attributes:
apiKey:
id: 00000000-0000-0000-0000-000000000001
value: ""
logsConfig:
enabled: true
environments:
- production
logSources:
- lambda
- edge
samplingPercentage: 100
traceConfig:
enabled: true
isDeprecatedOtel: false
samplingPercentage: 100
id: icfg_abc123
type: vercelConfiguration
schema:
$ref: "#/components/schemas/VercelConfigResponse"
description: OK
"400":
content:
application/json:
schema:
$ref: "#/components/schemas/JSONAPIErrorResponse"
description: Bad Request
"403":
content:
application/json:
schema:
$ref: "#/components/schemas/JSONAPIErrorResponse"
description: Forbidden
"404":
content:
application/json:
schema:
$ref: "#/components/schemas/JSONAPIErrorResponse"
description: Not Found
"429":
$ref: "#/components/responses/TooManyRequestsResponse"
summary: Get Vercel configuration
tags:
- Vercel
put:
description: Update the Datadog Vercel integration configuration for a given Vercel configuration. The provided payload replaces the existing API key reference, logs forwarding settings, and tracing settings stored in Datadog for this configuration.
operationId: UpdateVercelConfig
parameters:
- $ref: "#/components/parameters/VercelConfigurationID"
requestBody:
content:
application/json:
examples:
default:
value:
apiKey:
id: 00000000-0000-0000-0000-000000000001
value: ""
logsConfig:
enabled: true
environments:
- production
logSources:
- lambda
- edge
samplingPercentage: 100
traceConfig:
enabled: true
isDeprecatedOtel: false
samplingPercentage: 100
schema:
$ref: "#/components/schemas/VercelConfigAttributes"
required: true
responses:
"200":
description: OK
"400":
content:
application/json:
schema:
$ref: "#/components/schemas/JSONAPIErrorResponse"
description: Bad Request
"403":
content:
application/json:
schema:
$ref: "#/components/schemas/JSONAPIErrorResponse"
description: Forbidden
"404":
content:
application/json:
schema:
$ref: "#/components/schemas/JSONAPIErrorResponse"
description: Not Found
"429":
$ref: "#/components/responses/TooManyRequestsResponse"
summary: Update Vercel configuration
tags:
- Vercel
/api/v2/vercel/token:
post:
description: Exchange a Vercel marketplace authorization code for an access token and store it in Datadog so that the integration can call Vercel APIs on behalf of the customer. This endpoint is invoked once when a customer installs the Datadog integration from the Vercel marketplace.
operationId: CreateVercelToken
requestBody:
content:
application/json:
examples:
default:
value:
authGrantCode: "code"
vercelConfigurationId: "icfg_abc123"
schema:
$ref: "#/components/schemas/VercelTokenCreateRequest"
required: true
responses:
"200":
description: OK
"400":
content:
application/json:
schema:
$ref: "#/components/schemas/JSONAPIErrorResponse"
description: Bad Request
"403":
content:
application/json:
schema:
$ref: "#/components/schemas/JSONAPIErrorResponse"
description: Forbidden
"429":
$ref: "#/components/responses/TooManyRequestsResponse"
summary: Create Vercel access token
tags:
- Vercel
/api/v2/web-integrations/{integration_name}/accounts:
get:
description: List accounts for a given web integration.
Expand Down Expand Up @@ -193556,6 +193874,8 @@ tags:
externalDocs:
url: https://docs.datadoghq.com/account_management/users
name: Users
- description: Configure the Datadog Vercel integration. Endpoints in this section let you exchange a Vercel marketplace authorization code for a Datadog-managed access token and read or update the logs, traces, and API key configuration associated with a Vercel project.
name: Vercel
- description: |-
Manage web integration accounts programmatically through the Datadog API.
See the [Web Integrations page](https://app.datadoghq.com/integrations) for more information.
Expand Down
17 changes: 17 additions & 0 deletions examples/v2_vercel_CreateVercelToken.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
// Create Vercel access token returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV2::api_vercel::VercelAPI;
use datadog_api_client::datadogV2::model::VercelTokenCreateRequest;

#[tokio::main]
async fn main() {
let body = VercelTokenCreateRequest::new("code".to_string(), "icfg_abc123".to_string());
let configuration = datadog::Configuration::new();
let api = VercelAPI::with_config(configuration);
let resp = api.create_vercel_token(body).await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}
15 changes: 15 additions & 0 deletions examples/v2_vercel_GetVercelConfig.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
// Get Vercel configuration returns "OK" response
use datadog_api_client::datadog;
use datadog_api_client::datadogV2::api_vercel::VercelAPI;

#[tokio::main]
async fn main() {
let configuration = datadog::Configuration::new();
let api = VercelAPI::with_config(configuration);
let resp = api.get_vercel_config("configuration_id".to_string()).await;
if let Ok(value) = resp {
println!("{:#?}", value);
} else {
println!("{:#?}", resp.unwrap_err());
}
}
Loading
Loading