openapi: 3.0.0
info:
contact:
email: support@datadoghq.com
name: Datadog Support
url: https://www.datadoghq.com/support/
description: The Datadog API is an HTTP REST API. The API uses resource-oriented URLs to call the API, uses status codes to indicate the success or failure of requests, returns JSON from all requests, and uses standard HTTP response codes. Use the Datadog API to access the Datadog platform programmatically.
title: Datadog Account Submit API
version: '1.0'
servers:
- url: https://{subdomain}.{site}
variables:
site:
default: datadoghq.com
description: The regional site for Datadog customers.
enum:
- datadoghq.com
- us3.datadoghq.com
- us5.datadoghq.com
- ap1.datadoghq.com
- datadoghq.eu
- ddog-gov.com
subdomain:
default: api
description: The subdomain where the API is deployed.
- url: '{protocol}://{name}'
variables:
name:
default: api.datadoghq.com
description: Full site DNS name.
protocol:
default: https
description: The protocol for accessing the API.
- url: https://{subdomain}.{site}
variables:
site:
default: datadoghq.com
description: Any Datadog deployment.
subdomain:
default: api
description: The subdomain where the API is deployed.
security:
- apiKeyAuth: []
appKeyAuth: []
tags:
- name: Submit
paths:
/api/v2/series:
post:
description: 'The metrics end-point allows you to post time-series data that can be graphed on Datadog’s dashboards.
The maximum payload size is 500 kilobytes (512000 bytes). Compressed payloads must have a decompressed size of less than 5 megabytes (5242880 bytes).
If you’re submitting metrics directly to the Datadog API without using DogStatsD, expect:
- 64 bits for the timestamp
- 64 bits for the value
- 20 bytes for the metric names
- 50 bytes for the timeseries
- The full payload is approximately 100 bytes.
Host name is one of the resources in the Resources field.'
operationId: SubmitMetrics
parameters:
- description: HTTP header used to compress the media-type.
in: header
name: Content-Encoding
required: false
schema:
$ref: '#/components/schemas/MetricContentEncoding'
example: example_value
requestBody:
content:
application/json:
examples:
dynamic-points:
description: Post time-series data that can be graphed on Datadog’s dashboards.
externalValue: examples/metrics/dynamic-points.json.sh
summary: Dynamic Points
x-variables:
NOW: $(date +%s)
schema:
$ref: '#/components/schemas/MetricPayload'
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: Datadog Submit Metrics
tags:
- Submit
x-codegen-request-body-name: body
x-menu-order: 1
x-undo:
type: safe
x-api-evangelist-processing:
PascalCaseOperationSummaries: true
ChooseTags: true
x-microcks-operation:
delay: 0
dispatcher: FALLBACK
components:
schemas:
MetricPayload:
description: The metrics' payload.
properties:
series:
description: A list of timeseries to submit to Datadog.
example:
- metric: system.load.1
points:
- timestamp: 1475317847
value: 0.7
resources:
- name: dummyhost
type: host
items:
$ref: '#/components/schemas/MetricSeries'
type: array
required:
- series
type: object
APIErrorResponse:
description: API error response.
properties:
errors:
description: A list of errors.
example:
- Bad Request
items:
description: A list of items.
example: Bad Request
type: string
type: array
required:
- errors
type: object
MetricPoint:
description: A point object is of the form `{POSIX_timestamp, numeric_value}`.
example:
timestamp: 1575317847
value: 0.5
properties:
timestamp:
description: 'The timestamp should be in seconds and current.
Current is defined as not more than 10 minutes in the future or more than 1 hour in the past.'
format: int64
type: integer
example: 42
value:
description: The numeric value format should be a 64bit float gauge-type value.
format: double
type: number
example: 95.5
type: object
MetricMetadata:
description: Metadata for the metric.
properties:
origin:
$ref: '#/components/schemas/MetricOrigin'
type: object
MetricOrigin:
description: Metric origin information.
properties:
metric_type:
default: 0
description: The origin metric type code
format: int32
maximum: 1000
type: integer
example: 42
product:
default: 0
description: The origin product code
format: int32
maximum: 1000
type: integer
example: 42
service:
default: 0
description: The origin service code
format: int32
maximum: 1000
type: integer
example: 42
type: object
IntakePayloadAccepted:
description: The payload accepted for intake.
properties:
errors:
description: A list of errors.
items:
description: An empty error list.
type: string
type: array
type: object
MetricSeries:
description: 'A metric to submit to Datadog.
See [Datadog metrics](https://docs.datadoghq.com/developers/metrics/#custom-metrics-properties).'
properties:
interval:
description: If the type of the metric is rate or count, define the corresponding interval in seconds.
example: 20
format: int64
type: integer
metadata:
$ref: '#/components/schemas/MetricMetadata'
metric:
description: The name of the timeseries.
example: system.load.1
type: string
points:
description: Points relating to a metric. All points must be objects 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.
example:
- timestamp: 1575317847
value: 0.5
items:
$ref: '#/components/schemas/MetricPoint'
type: array
resources:
description: A list of resources to associate with this metric.
items:
$ref: '#/components/schemas/MetricResource'
type: array
source_type_name:
description: The source type name.
example: datadog
type: string
tags:
description: A list of tags associated with the metric.
example:
- environment:test
items:
description: Individual tags.
type: string
type: array
type:
$ref: '#/components/schemas/MetricIntakeType'
unit:
description: The unit of point value.
example: second
type: string
required:
- metric
- points
type: object
MetricIntakeType:
description: The type of metric. The available types are `0` (unspecified), `1` (count), `2` (rate), and `3` (gauge).
enum:
- 0
- 1
- 2
- 3
format: int32
type: integer
x-enum-varnames:
- UNSPECIFIED
- COUNT
- RATE
- GAUGE
MetricResource:
description: Metric resource.
example:
name: dummyhost
type: host
properties:
name:
description: The name of the resource.
type: string
example: Example Monitor
type:
description: The type of the resource.
type: string
example: metric alert
type: object
MetricContentEncoding:
default: deflate
description: HTTP header used to compress the media-type.
enum:
- deflate
- zstd1
- gzip
example: deflate
type: string
x-enum-varnames:
- DEFLATE
- ZSTD1
- GZIP
responses:
TooManyRequestsResponse:
content:
application/json:
schema:
$ref: '#/components/schemas/APIErrorResponse'
description: Too many requests
securitySchemes:
AuthZ:
description: This API uses OAuth 2 with the implicit grant flow.
flows:
authorizationCode:
authorizationUrl: /oauth2/v1/authorize
scopes:
apm_api_catalog_read: View API catalog and API definitions.
apm_api_catalog_write: Add, modify, and delete API catalog definitions.
apm_read: Read and query APM and Trace Analytics.
apm_service_catalog_read: View service catalog and service definitions.
apm_service_catalog_write: Add, modify, and delete service catalog definitions when those definitions are maintained by Datadog.
appsec_vm_read: View infrastructure, application code, and library vulnerabilities. This does not restrict API or inventory SQL access to the vulnerability data source.
cases_read: View Cases.
cases_write: Create and update cases.
ci_visibility_pipelines_write: Create CI Visibility pipeline spans using the API.
ci_visibility_read: View CI Visibility.
cloud_cost_management_read: View Cloud Cost pages and the cloud cost data source in dashboards and notebooks. For more details, see the Cloud Cost Management docs.
cloud_cost_management_write: Configure cloud cost accounts and global customizations. For more details, see the Cloud Cost Management docs.
code_analysis_read: View Code Analysis.
continuous_profiler_pgo_read: Read and query Continuous Profiler data for Profile-Guided Optimization (PGO).
create_webhooks: Create webhooks integrations.
dashboards_embed_share: Create, modify, and delete shared dashboards with share type 'embed'.
dashboards_invite_share: Create, modify, and delete shared dashboards with share type 'invite'.
dashboards_public_share: Generate public and authenticated links to share dashboards or embeddable graphs externally.
dashboards_read: View dashboards.
dashboards_write: Create and change dashboards.
data_scanner_read: View Data Scanner configurations.
data_scanner_write: Edit Data Scanner configurations.
embeddable_graphs_share: Generate public links to share embeddable graphs externally.
events_read: Read Events data.
hosts_read: List hosts and their attributes.
incident_notification_settings_write: Configure Incidents Notification settings.
incident_read: View incidents in Datadog.
incident_settings_write: Configure Incident Settings.
incident_write: Create, view, and manage incidents in Datadog.
metrics_read: View custom metrics.
monitor_config_policy_write: Edit and delete monitor configuration.
monitors_downtime: Set downtimes to suppress alerts from any monitor in an organization. Mute and unmute monitors. The ability to write monitors is not required to set downtimes.
monitors_read: View monitors.
monitors_write: Edit, delete, and resolve individual monitors.
org_management: Edit org configurations, including authentication and certain security preferences such as configuring SAML, renaming an org, configuring allowed login methods, creating child orgs, subscribing & unsubscribing from apps in the marketplace, and enabling & disabling Remote Configuration for the entire organization.
security_comments_read: Read comments of vulnerabilities.
security_monitoring_filters_read: Read Security Filters.
security_monitoring_filters_write: Create, edit, and delete Security Filters.
security_monitoring_findings_read: View a list of findings that include both misconfigurations and identity risks.
security_monitoring_notification_profiles_read: View Rule Security Notification rules.
security_monitoring_notification_profiles_write: Create, edit, and delete Security Notification rules.
security_monitoring_rules_read: Read Detection Rules.
security_monitoring_rules_write: Create and edit Detection Rules.
security_monitoring_signals_read: View Security Signals.
security_monitoring_suppressions_read: Read Rule Suppressions.
security_monitoring_suppressions_write: Write Rule Suppressions.
security_pipelines_read: View Security Pipelines.
security_pipelines_write: Create, edit, and delete CSM Security Pipelines.
slos_corrections: Apply, edit, and delete SLO status corrections. A user with this permission can make status corrections, even if they do not have permission to edit those SLOs.
slos_read: View SLOs and status corrections.
slos_write: Create, edit, and delete SLOs.
synthetics_global_variable_read: View, search, and use Synthetics global variables.
synthetics_global_variable_write: Create, edit, and delete global variables for Synthetics.
synthetics_private_location_read: View, search, and use Synthetics private locations.
synthetics_private_location_write: Create and delete private locations in addition to having access to the associated installation guidelines.
synthetics_read: List and view configured Synthetic tests and test results.
synthetics_write: Create, edit, and delete Synthetic tests.
teams_manage: Manage Teams. Create, delete, rename, and edit metadata of all Teams. To control Team membership across all Teams, use the User Access Manage permission.
teams_read: Read Teams data. A User with this permission can view Team names, metadata, and which Users are on each Team.
test_optimization_read: View Test Optimization.
timeseries_query: Query Timeseries data.
usage_read: View your organization's usage and usage attribution.
user_access_invite: Invite other users to your organization.
user_access_manage: Disable users, manage user roles, manage SAML-to-role mappings, and configure logs restriction queries.
user_access_read: View users and their roles and settings.
workflows_read: View workflows.
workflows_run: Run workflows.
workflows_write: Create, edit, and delete workflows.
tokenUrl: /oauth2/v1/token
type: oauth2
apiKeyAuth:
description: Your Datadog API Key.
in: header
name: DD-API-KEY
type: apiKey
x-env-name: DD_API_KEY
appKeyAuth:
description: Your Datadog APP Key.
in: header
name: DD-APPLICATION-KEY
type: apiKey
x-env-name: DD_APP_KEY
bearerAuth:
scheme: bearer
type: http
x-env-name: DD_BEARER_TOKEN
x-group-parameters: true
x-merge-override:
paths: false