Skip to content

Commit

Permalink
Regenerate client from commit 4569968f of spec repo
Browse files Browse the repository at this point in the history
  • Loading branch information
ci.datadog-api-spec committed Jun 10, 2022
1 parent e9322b1 commit e08007c
Show file tree
Hide file tree
Showing 13 changed files with 755 additions and 4 deletions.
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.2",
"regenerated": "2022-06-09 11:12:58.922194",
"spec_repo_commit": "b9e36dc8"
"regenerated": "2022-06-10 17:54:56.890707",
"spec_repo_commit": "4569968f"
},
"v2": {
"apigentools_version": "1.6.2",
"regenerated": "2022-06-09 11:12:58.935757",
"spec_repo_commit": "b9e36dc8"
"regenerated": "2022-06-10 17:54:56.902721",
"spec_repo_commit": "4569968f"
}
}
}
158 changes: 158 additions & 0 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1299,6 +1299,96 @@ components:
type: integer
readOnly: true
type: object
DistributionPoint:
description: Array of distribution points.
example:
- 1575317847.0
- - 0.5
- 1.0
items:
description: List of distribution point.
oneOf:
- $ref: '#/components/schemas/DistributionPointTimestamp'
- $ref: '#/components/schemas/DistributionPointData'
maxItems: 2
minItems: 2
type: array
DistributionPointData:
description: Distribution point data.
items:
description: List of distribution point data.
format: double
type: number
type: array
DistributionPointTimestamp:
description: Distribution point timestamp. It should be in seconds and current.
format: double
type: number
DistributionPointsContentEncoding:
description: HTTP header used to compress the media-type.
enum:
- deflate
type: string
x-enum-varnames:
- DEFLATE
DistributionPointsPayload:
description: The distribution points payload.
properties:
series:
description: A list of distribution points series to submit to Datadog.
example:
- metric: system.load.1
points:
- - 1475317847.0
- - 1.0
- 2.0
items:
$ref: '#/components/schemas/DistributionPointsSeries'
type: array
required:
- series
type: object
DistributionPointsSeries:
description: A distribution points metric to submit to Datadog.
properties:
host:
description: The name of the host that produced the distribution point metric.
example: test.example.com
type: string
metric:
description: The name of the distribution points metric.
example: system.load.1
type: string
points:
description: Points relating to the distribution point metric. All points
must be tuples with timestamp and a list of values (cannot be a string).
Timestamps should be in POSIX time in seconds.
items:
$ref: '#/components/schemas/DistributionPoint'
type: array
tags:
description: A list of tags associated with the distribution point metric.
example:
- environment:test
items:
description: Individual tags.
type: string
type: array
type:
$ref: '#/components/schemas/DistributionPointsType'
required:
- metric
- points
type: object
DistributionPointsType:
default: distribution
description: The type of the distribution point.
enum:
- distribution
example: distribution
type: string
x-enum-varnames:
- DISTRIBUTION
DistributionWidgetDefinition:
description: "The Distribution visualization is another way of showing metrics\naggregated
across one or several tags, such as hosts.\nUnlike the heat map, a distribution
Expand Down Expand Up @@ -18016,6 +18106,74 @@ paths:
x-menu-order: 6
x-undo:
type: idempotent
/api/v1/distribution_points:
post:
description: "The distribution points end-point allows you to post distribution
data that can be graphed on Datadog\u2019s dashboards."
operationId: SubmitDistributionPoints
parameters:
- description: HTTP header used to compress the media-type.
in: header
name: Content-Encoding
required: false
schema:
$ref: '#/components/schemas/DistributionPointsContentEncoding'
requestBody:
content:
text/json:
examples:
dynamic-points:
description: "Post time-series data that can be graphed on Datadog\u2019s
dashboards."
externalValue: examples/metrics/distribution-points.json.sh
summary: Dynamic Points
x-variables:
NOW: $(date +%s)
schema:
$ref: '#/components/schemas/DistributionPointsPayload'
required: true
responses:
'202':
content:
text/json:
schema:
$ref: '#/components/schemas/IntakePayloadAccepted'
description: Payload accepted
'400':
content:
text/json:
schema:
$ref: '#/components/schemas/APIErrorResponse'
description: Bad Request
'403':
content:
text/json:
schema:
$ref: '#/components/schemas/APIErrorResponse'
description: Authentication error
'408':
content:
text/json:
schema:
$ref: '#/components/schemas/APIErrorResponse'
description: Request timeout
'413':
content:
text/json:
schema:
$ref: '#/components/schemas/APIErrorResponse'
description: Payload too large
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
security:
- apiKeyAuth: []
summary: Submit distribution points
tags:
- Metrics
x-codegen-request-body-name: body
x-menu-order: 1
x-undo:
type: safe
/api/v1/downtime:
get:
description: Get all scheduled downtimes.
Expand Down
22 changes: 22 additions & 0 deletions examples/v1/metrics/SubmitDistributionPoints.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Submit distribution points returns "Payload accepted" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V1::MetricsAPI.new

body = DatadogAPIClient::V1::DistributionPointsPayload.new({
series: [
DatadogAPIClient::V1::DistributionPointsSeries.new({
metric: "system.load.1.dist",
points: [
[
Time.now,
[
1.0,
2.0,
],
],
],
}),
],
})
p api_instance.submit_distribution_points(body)
25 changes: 25 additions & 0 deletions examples/v1/metrics/SubmitDistributionPoints_3109558960.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Submit deflate distribution points returns "Payload accepted" response

require "datadog_api_client"
api_instance = DatadogAPIClient::V1::MetricsAPI.new

body = DatadogAPIClient::V1::DistributionPointsPayload.new({
series: [
DatadogAPIClient::V1::DistributionPointsSeries.new({
metric: "system.load.1.dist",
points: [
[
Time.now,
[
1.0,
2.0,
],
],
],
}),
],
})
opts = {
content_encoding: DistributionPointsContentEncoding::DEFLATE,
}
p api_instance.submit_distribution_points(body, opts)
36 changes: 36 additions & 0 deletions features/v1/metrics.feature
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,14 @@ Feature: Metrics
When the request is sent
Then the response status is 200 OK

@integration-only @skip-terraform-config @skip-validation @team:DataDog/metrics-aggregation
Scenario: Submit deflate distribution points returns "Payload accepted" response
Given new "SubmitDistributionPoints" request
And body with value {"series": [{"metric": "system.load.1.dist", "points": [[{{ timestamp("now") }}, [1.0, 2.0]]]}]}
And request contains "Content-Encoding" parameter with value "deflate"
When the request is sent
Then the response status is 202 Payload accepted

@integration-only @skip-terraform-config @skip-validation @team:DataDog/metrics-intake @team:DataDog/metrics-query
Scenario: Submit deflate metrics returns "Payload accepted" response
Given new "SubmitMetrics" request
Expand All @@ -116,6 +124,34 @@ Feature: Metrics
When the request is sent
Then the response status is 202 Payload accepted

@integration-only @skip-terraform-config @skip-validation @team:DataDog/metrics-aggregation
Scenario: Submit distribution points returns "Bad Request" response
Given new "SubmitDistributionPoints" request
And body with value {"series": [{"metric": "system.load.1.dist", "points": [[1475317847.0, 1.0]]}]}
When the request is sent
Then the response status is 400 Bad Request

@integration-only @skip-terraform-config @skip-validation @team:DataDog/metrics-aggregation
Scenario: Submit distribution points returns "Payload accepted" response
Given new "SubmitDistributionPoints" request
And body with value {"series": [{"metric": "system.load.1.dist", "points": [[{{ timestamp("now") }}, [1.0, 2.0]]]}]}
When the request is sent
Then the response status is 202 Payload accepted

@generated @skip @team:DataDog/metrics-aggregation
Scenario: Submit distribution points returns "Payload too large" response
Given new "SubmitDistributionPoints" request
And body with value {"series": [{"metric": "system.load.1", "points": [[1475317847.0, [1.0, 2.0]]]}]}
When the request is sent
Then the response status is 413 Payload too large

@generated @skip @team:DataDog/metrics-aggregation
Scenario: Submit distribution points returns "Request timeout" response
Given new "SubmitDistributionPoints" request
And body with value {"series": [{"metric": "system.load.1", "points": [[1475317847.0, [1.0, 2.0]]]}]}
When the request is sent
Then the response status is 408 Request timeout

@skip @team:DataDog/metrics-intake @team:DataDog/metrics-query
Scenario: Submit metrics returns "Bad Request" response
Given new "SubmitMetrics" request
Expand Down
6 changes: 6 additions & 0 deletions features/v1/undo.json
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,12 @@
"type": "idempotent"
}
},
"SubmitDistributionPoints": {
"tag": "Metrics",
"undo": {
"type": "safe"
}
},
"ListDowntimes": {
"tag": "Downtimes",
"undo": {
Expand Down
5 changes: 5 additions & 0 deletions lib/datadog_api_client/v1.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,11 @@
require 'datadog_api_client/v1/models/dashboard_template_variable_preset'
require 'datadog_api_client/v1/models/dashboard_template_variable_preset_value'
require 'datadog_api_client/v1/models/deleted_monitor'
require 'datadog_api_client/v1/models/distribution_point_item'
require 'datadog_api_client/v1/models/distribution_points_content_encoding'
require 'datadog_api_client/v1/models/distribution_points_payload'
require 'datadog_api_client/v1/models/distribution_points_series'
require 'datadog_api_client/v1/models/distribution_points_type'
require 'datadog_api_client/v1/models/distribution_widget_definition'
require 'datadog_api_client/v1/models/distribution_widget_definition_type'
require 'datadog_api_client/v1/models/distribution_widget_request'
Expand Down
Loading

0 comments on commit e08007c

Please sign in to comment.