Skip to content

Commit

Permalink
Regenerate client from commit 14ee8ee4 of spec repo
Browse files Browse the repository at this point in the history
  • Loading branch information
ci.datadog-api-spec committed Apr 7, 2022
1 parent 85f41ae commit 44f49ce
Show file tree
Hide file tree
Showing 13 changed files with 1,104 additions and 33 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-04-06 13:53:29.324880",
"spec_repo_commit": "0c154010"
"regenerated": "2022-04-07 13:35:21.960325",
"spec_repo_commit": "14ee8ee4"
},
"v2": {
"apigentools_version": "1.6.2",
"regenerated": "2022-04-06 13:53:29.337308",
"spec_repo_commit": "0c154010"
"regenerated": "2022-04-07 13:35:21.972282",
"spec_repo_commit": "14ee8ee4"
}
}
}
7 changes: 4 additions & 3 deletions .generator/schemas/v1/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9342,8 +9342,9 @@ components:
type: string
type: array
type:
default: gauge
description: The type of the metric either `count`, `gauge`, or `rate`.
default: ''
description: The type of the metric. Valid types are "",`count`, `gauge`,
and `rate`.
example: rate
type: string
required:
Expand Down Expand Up @@ -23071,7 +23072,7 @@ paths:
3.2 megabytes (3200000 bytes). Compressed payloads must have a decompressed
size of less than 62 megabytes (62914560 bytes).\n\nIf you\u2019re submitting
metrics directly to the Datadog API without using DogStatsD, expect:\n\n-
64 bits for the timestamp\n- 32 bits for the value\n- 40 bytes for the metric
64 bits for the timestamp\n- 64 bits for the value\n- 40 bytes for the metric
names\n- 50 bytes for the timeseries\n- The full payload is approximately
100 bytes. However, with the DogStatsD API,\ncompression is applied, which
reduces the payload size."
Expand Down
173 changes: 173 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2506,6 +2506,14 @@ components:
required:
- data
type: object
IntakePayloadAccepted:
description: The payload accepted for intake.
properties:
status:
description: The status of the intake payload.
example: ok
type: string
type: object
ListApplicationKeysResponse:
description: Response for a list of application keys.
properties:
Expand Down Expand Up @@ -3772,6 +3780,14 @@ components:
pattern: ^[A-Za-z][A-Za-z0-9\.\-\_:\/]*$
type: string
type: array
MetricContentEncoding:
default: deflate
description: HTTP header used to compress the media-type.
enum:
- deflate
type: string
x-enum-varnames:
- DEFLATE
MetricCustomAggregation:
description: A time and space aggregation combination for use in query.
example:
Expand Down Expand Up @@ -4166,6 +4182,22 @@ components:
type: array
readOnly: true
type: object
MetricsPayload:
description: The metrics' payload.
properties:
series:
description: A list of time series to submit to Datadog.
example:
- metric: system.load.1
points:
- - 1475317847
- 0.7
items:
$ref: '#/components/schemas/Series'
type: array
required:
- series
type: object
NullableRelationshipToUser:
description: Relationship to user.
properties:
Expand Down Expand Up @@ -4406,6 +4438,26 @@ components:
type: string
x-enum-varnames:
- PERMISSIONS
Point:
description: Array of timeseries points.
example:
- 1575317847
- 0.5
items:
description: 'Each point is of the form `[POSIX_timestamp, numeric_value]`.
The timestamp should be in seconds and current.
The numeric value format should be a 64bit float gauge-type value.
Current is defined as not more than 10 minutes in the future or more than
1 hour in the past.'
format: double
nullable: true
type: number
maxItems: 2
minItems: 2
type: array
ProcessSummariesMeta:
description: Response metadata object.
properties:
Expand Down Expand Up @@ -6403,6 +6455,53 @@ components:
x-enum-varnames:
- TIMESTAMP_ASCENDING
- TIMESTAMP_DESCENDING
Series:
description: 'A metric to submit to Datadog.
See [Datadog metrics](https://docs.datadoghq.com/developers/metrics/#custom-metrics-properties).'
properties:
host:
description: The name of the host that produced the metric.
example: test.example.com
type: string
interval:
default: null
description: If the type of the metric is rate or count, define the corresponding
interval.
example: 20
format: int64
nullable: true
type: integer
metric:
description: The name of the timeseries.
example: system.load.1
type: string
points:
description: Points relating to a metric. All points must be tuples with
timestamp and a scalar value (cannot be a string). Timestamps should be
in POSIX time in seconds, and cannot be more than ten minutes in the future
or more than one hour in the past.
items:
$ref: '#/components/schemas/Point'
type: array
tags:
description: A list of tags associated with the metric.
example:
- environment:test
items:
description: Individual tags.
type: string
type: array
type:
default: ''
description: The type of the metric. Valid types are "",`count`, `gauge`,
and `rate`.
example: rate
type: string
required:
- metric
- points
type: object
ServiceAccountCreateAttributes:
description: Attributes of the created user.
properties:
Expand Down Expand Up @@ -11163,6 +11262,80 @@ paths:
x-unstable: '**Note**: This endpoint is in public beta.
If you have any feedback, contact [Datadog support](https://docs.datadoghq.com/help/).'
/api/v2/series:
post:
description: "The metrics end-point allows you to post time-series data that
can be graphed on Datadog\u2019s dashboards.\nThe maximum payload size is
500 kilobytes (512000 bytes). Compressed payloads must have a decompressed
size of less than 5 megabytes (5242880 bytes).\n\nIf you\u2019re submitting
metrics directly to the Datadog API without using DogStatsD, expect:\n\n-
64 bits for the timestamp\n- 64 bits for the value\n- 20 bytes for the metric
names\n- 50 bytes for the timeseries\n- The full payload is approximately
100 bytes."
operationId: SubmitMetrics
parameters:
- description: HTTP header used to compress the media-type.
in: header
name: Content-Encoding
required: true
schema:
$ref: '#/components/schemas/MetricContentEncoding'
requestBody:
content:
application/json:
examples:
dynamic-points:
description: "Post time-series data that can be graphed on Datadog\u2019s
dashboards."
externalValue: examples/metrics/dynamic-points.json.sh
summary: Dynamic Points
x-variables:
NOW: $(date +%s)
schema:
$ref: '#/components/schemas/MetricsPayload'
required: true
responses:
'202':
content:
application/json:
schema:
$ref: '#/components/schemas/IntakePayloadAccepted'
description: Payload accepted
'400':
content:
application/json:
schema:
$ref: '#/components/schemas/APIErrorResponse'
description: Bad Request
'403':
content:
application/json:
schema:
$ref: '#/components/schemas/APIErrorResponse'
description: Authentication error
'408':
content:
application/json:
schema:
$ref: '#/components/schemas/APIErrorResponse'
description: Request timeout
'413':
content:
application/json:
schema:
$ref: '#/components/schemas/APIErrorResponse'
description: Payload too large
'429':
$ref: '#/components/responses/TooManyRequestsResponse'
security:
- apiKeyAuth: []
summary: Submit metrics
tags:
- Metrics
x-codegen-request-body-name: body
x-menu-order: 1
x-undo:
type: safe
/api/v2/service_accounts:
post:
description: Create a service account for your organization.
Expand Down
2 changes: 1 addition & 1 deletion api/v1/datadog/api_metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,7 @@ func (r *SubmitMetricsOptionalParameters) WithContentEncoding(contentEncoding Me
* If you’re submitting metrics directly to the Datadog API without using DogStatsD, expect:
*
* - 64 bits for the timestamp
* - 32 bits for the value
* - 64 bits for the value
* - 40 bytes for the metric names
* - 50 bytes for the timeseries
* - The full payload is approximately 100 bytes. However, with the DogStatsD API,
Expand Down
6 changes: 3 additions & 3 deletions api/v1/datadog/model_series.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ type Series struct {
Points [][]*float64 `json:"points"`
// A list of tags associated with the metric.
Tags *[]string `json:"tags,omitempty"`
// The type of the metric either `count`, `gauge`, or `rate`.
// The type of the metric. Valid types are "",`count`, `gauge`, and `rate`.
Type *string `json:"type,omitempty"`
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
UnparsedObject map[string]interface{} `json:-`
Expand All @@ -40,7 +40,7 @@ func NewSeries(metric string, points [][]*float64) *Series {
this.Interval = *NewNullableInt64(nil)
this.Metric = metric
this.Points = points
var type_ string = "gauge"
var type_ string = ""
this.Type = &type_
return &this
}
Expand All @@ -51,7 +51,7 @@ func NewSeries(metric string, points [][]*float64) *Series {
func NewSeriesWithDefaults() *Series {
this := Series{}
this.Interval = *NewNullableInt64(nil)
var type_ string = "gauge"
var type_ string = ""
this.Type = &type_
return &this
}
Expand Down
Loading

0 comments on commit 44f49ce

Please sign in to comment.