Skip to content
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": "2024-01-25 20:06:16.533092",
"spec_repo_commit": "29ecc007"
"regenerated": "2024-01-26 14:49:50.933084",
"spec_repo_commit": "a9a258a4"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-01-25 20:06:16.551632",
"spec_repo_commit": "29ecc007"
"regenerated": "2024-01-26 14:49:50.947768",
"spec_repo_commit": "a9a258a4"
}
}
}
260 changes: 260 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -839,6 +839,11 @@ components:
type: string
x-enum-varnames:
- BILLING_DIMENSIONS
ApiID:
description: API identifier.
example: 90646597-5fdb-4a17-a240-647003f8c028
format: uuid
type: string
ApmRetentionFilterType:
default: apm_retention_filter
description: The type of the resource.
Expand Down Expand Up @@ -4873,6 +4878,29 @@ components:
type: string
x-enum-varnames:
- COST_BY_ORG
CreateOpenAPIResponse:
description: Response for `CreateOpenAPI` operation.
properties:
data:
$ref: '#/components/schemas/CreateOpenAPIResponseData'
type: object
CreateOpenAPIResponseAttributes:
description: Attributes for `CreateOpenAPI`.
properties:
failed_endpoints:
description: List of endpoints which couldn't be parsed.
items:
$ref: '#/components/schemas/OpenAPIEndpoint'
type: array
type: object
CreateOpenAPIResponseData:
description: Data envelope for `CreateOpenAPIResponse`.
properties:
attributes:
$ref: '#/components/schemas/CreateOpenAPIResponseAttributes'
id:
$ref: '#/components/schemas/ApiID'
type: object
CreateRuleRequest:
description: Scorecard create rule request.
properties:
Expand Down Expand Up @@ -12079,6 +12107,24 @@ components:
type: string
x-enum-varnames:
- ON_DEMAND_CONCURRENCY_CAP
OpenAPIEndpoint:
description: Endpoint info extracted from an `OpenAPI` specification.
properties:
method:
description: The endpoint method.
type: string
path:
description: The endpoint path.
type: string
type: object
OpenAPIFile:
description: Object for API data in an `OpenAPI` format as a file.
properties:
openapi_spec_file:
description: Binary `OpenAPI` spec file
format: binary
type: string
type: object
OpsgenieServiceCreateAttributes:
description: The Opsgenie service attributes for a create request.
properties:
Expand Down Expand Up @@ -20284,6 +20330,29 @@ components:
example: min
type: string
type: object
UpdateOpenAPIResponse:
description: Response for `UpdateOpenAPI`.
properties:
data:
$ref: '#/components/schemas/UpdateOpenAPIResponseData'
type: object
UpdateOpenAPIResponseAttributes:
description: Attributes for `UpdateOpenAPI`.
properties:
failed_endpoints:
description: List of endpoints which couldn't be parsed.
items:
$ref: '#/components/schemas/OpenAPIEndpoint'
type: array
type: object
UpdateOpenAPIResponseData:
description: Data envelope for `UpdateOpenAPIResponse`.
properties:
attributes:
$ref: '#/components/schemas/UpdateOpenAPIResponseAttributes'
id:
$ref: '#/components/schemas/ApiID'
type: object
UsageApplicationSecurityMonitoringResponse:
description: Application Security Monitoring usage response.
properties:
Expand Down Expand Up @@ -21110,6 +21179,195 @@ paths:
tags:
- Key Management
x-codegen-request-body-name: body
/api/v2/apicatalog/api/{id}:
delete:
description: Delete a specific API by ID.
operationId: DeleteOpenAPI
parameters:
- description: ID of the API to delete
in: path
name: id
required: true
schema:
$ref: '#/components/schemas/ApiID'
responses:
'204':
description: API deleted successfully
'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: API not found error
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
summary: Delete an API
tags:
- API Management
x-unstable: '**Note**: This endpoint is in public beta.

If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
/api/v2/apicatalog/api/{id}/openapi:
get:
description: Retrieve information about a specific API in [OpenAPI](https://spec.openapis.org/oas/latest.html)
format file.
operationId: GetOpenAPI
parameters:
- description: ID of the API to retrieve
in: path
name: id
required: true
schema:
$ref: '#/components/schemas/ApiID'
responses:
'200':
content:
multipart/form-data:
schema:
format: binary
type: string
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: API not found error
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
summary: Get an API
tags:
- API Management
x-unstable: '**Note**: This endpoint is in public beta.

If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
put:
description: 'Update information about a specific API. The given content will
replace all API content of the given ID.

The ID is returned by the create API, or can be found in the URL in the API
catalog UI.

'
operationId: UpdateOpenAPI
parameters:
- description: ID of the API to modify
in: path
name: id
required: true
schema:
$ref: '#/components/schemas/ApiID'
requestBody:
content:
multipart/form-data:
schema:
$ref: '#/components/schemas/OpenAPIFile'
required: true
responses:
'200':
content:
application/json:
schema:
$ref: '#/components/schemas/UpdateOpenAPIResponse'
description: API updated successfully
'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: API not found error
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
summary: Update an API
tags:
- API Management
x-unstable: '**Note**: This endpoint is in public beta.

If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
/api/v2/apicatalog/openapi:
post:
description: 'Create a new API from the [OpenAPI](https://spec.openapis.org/oas/latest.html)
specification given.

It supports version `2.0`, `3.0` and `3.1` of the specification. A specific
extension section, `x-datadog`,

let you specify the `teamHandle` for your team responsible for the API in
Datadog.

It returns the created API ID.

'
operationId: CreateOpenAPI
requestBody:
content:
multipart/form-data:
schema:
$ref: '#/components/schemas/OpenAPIFile'
required: true
responses:
'201':
content:
application/json:
schema:
$ref: '#/components/schemas/CreateOpenAPIResponse'
description: API created successfully
'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 a new API
tags:
- API Management
x-unstable: '**Note**: This endpoint is in public beta.

If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
/api/v2/apm/config/metrics:
get:
description: Get the list of configured span-based metrics with their definitions.
Expand Down Expand Up @@ -33173,6 +33431,8 @@ servers:
default: api
description: The subdomain where the API is deployed.
tags:
- description: Configure your API endpoints through the Datadog API.
name: API Management
- description: Manage configuration of [APM retention filters](https://app.datadoghq.com/apm/traces/retention-filters)
for your organization. You need an API and application key with Admin rights to
interact with this endpoint. See [retention filters](https://docs.datadoghq.com/tracing/trace_pipeline/trace_retention/#retention-filters)
Expand Down
11 changes: 11 additions & 0 deletions examples/v2/api-management/CreateOpenAPI.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Create a new API returns "API created successfully" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.create_open_api".to_sym] = true
end
api_instance = DatadogAPIClient::V2::APIManagementAPI.new
opts = {
openapi_spec_file: File.open("openapi-spec.yaml", "r"),
}
p api_instance.create_open_api(opts)
11 changes: 11 additions & 0 deletions examples/v2/api-management/DeleteOpenAPI.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Delete an API returns "API deleted successfully" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.delete_open_api".to_sym] = true
end
api_instance = DatadogAPIClient::V2::APIManagementAPI.new

# there is a valid "managed_api" in the system
MANAGED_API_DATA_ID = ENV["MANAGED_API_DATA_ID"]
api_instance.delete_open_api(MANAGED_API_DATA_ID)
11 changes: 11 additions & 0 deletions examples/v2/api-management/GetOpenAPI.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Get an API returns "OK" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.get_open_api".to_sym] = true
end
api_instance = DatadogAPIClient::V2::APIManagementAPI.new

# there is a valid "managed_api" in the system
MANAGED_API_DATA_ID = ENV["MANAGED_API_DATA_ID"]
p api_instance.get_open_api(MANAGED_API_DATA_ID)
14 changes: 14 additions & 0 deletions examples/v2/api-management/UpdateOpenAPI.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Update an API returns "API updated successfully" response

require "datadog_api_client"
DatadogAPIClient.configure do |config|
config.unstable_operations["v2.update_open_api".to_sym] = true
end
api_instance = DatadogAPIClient::V2::APIManagementAPI.new

# there is a valid "managed_api" in the system
MANAGED_API_DATA_ID = ENV["MANAGED_API_DATA_ID"]
opts = {
openapi_spec_file: File.open("openapi-spec.yaml", "r"),
}
p api_instance.update_open_api(MANAGED_API_DATA_ID, opts)
13 changes: 13 additions & 0 deletions features/scenarios_model_mapping.rb
Original file line number Diff line number Diff line change
Expand Up @@ -891,6 +891,19 @@
"app_key_id" => "String",
"body" => "ApplicationKeyUpdateRequest",
},
"v2.DeleteOpenAPI" => {
"id" => "UUID",
},
"v2.GetOpenAPI" => {
"id" => "UUID",
},
"v2.UpdateOpenAPI" => {
"id" => "UUID",
"openapi_spec_file" => "File",
},
"v2.CreateOpenAPI" => {
"openapi_spec_file" => "File",
},
"v2.CreateSpansMetric" => {
"body" => "SpansMetricCreateRequest",
},
Expand Down
Loading