Chilkat Online Tools

SQL Server / Datadog API Collection / Submit metrics

Back to Collection Items

-- Important: See this note about string length limitations for strings returned by sp_OAMethod calls.
--
CREATE PROCEDURE ChilkatSample
AS
BEGIN
    DECLARE @hr int
    DECLARE @iTmp0 int
    -- Important: Do not use nvarchar(max).  See the warning about using nvarchar(max).
    DECLARE @sTmp0 nvarchar(4000)
    -- This example assumes the Chilkat API to have been previously unlocked.
    -- See Global Unlock Sample for sample code.

    DECLARE @http int
    EXEC @hr = sp_OACreate 'Chilkat_9_5_0.Http', @http OUT
    IF @hr <> 0
    BEGIN
        PRINT 'Failed to create ActiveX component'
        RETURN
    END

    DECLARE @success int

    -- Use this online tool to generate code from sample JSON: Generate Code to Create JSON

    -- The following JSON is sent in the request body.

    -- {
    --   "series": [
    --     {
    --       "metric": "<string>",
    --       "points": [
    --         {
    --           "timestamp": "<long>",
    --           "value": "<double>"
    --         },
    --         {
    --           "timestamp": "<long>",
    --           "value": "<double>"
    --         }
    --       ],
    --       "interval": "<long>",
    --       "metadata": {
    --         "origin": {
    --           "metric_type": 0,
    --           "product": 0,
    --           "service": 0
    --         }
    --       },
    --       "resources": [
    --         {
    --           "name": "<string>",
    --           "type": "<string>"
    --         },
    --         {
    --           "name": "<string>",
    --           "type": "<string>"
    --         }
    --       ],
    --       "source_type_name": "<string>",
    --       "tags": [
    --         "<string>",
    --         "<string>"
    --       ],
    --       "type": 3,
    --       "unit": "<string>"
    --     },
    --     {
    --       "metric": "<string>",
    --       "points": [
    --         {
    --           "timestamp": "<long>",
    --           "value": "<double>"
    --         },
    --         {
    --           "timestamp": "<long>",
    --           "value": "<double>"
    --         }
    --       ],
    --       "interval": "<long>",
    --       "metadata": {
    --         "origin": {
    --           "metric_type": 0,
    --           "product": 0,
    --           "service": 0
    --         }
    --       },
    --       "resources": [
    --         {
    --           "name": "<string>",
    --           "type": "<string>"
    --         },
    --         {
    --           "name": "<string>",
    --           "type": "<string>"
    --         }
    --       ],
    --       "source_type_name": "<string>",
    --       "tags": [
    --         "<string>",
    --         "<string>"
    --       ],
    --       "type": 0,
    --       "unit": "<string>"
    --     }
    --   ]
    -- }

    DECLARE @json int
    EXEC @hr = sp_OACreate 'Chilkat_9_5_0.JsonObject', @json OUT

    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'series[0].metric', '<string>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'series[0].points[0].timestamp', '<long>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'series[0].points[0].value', '<double>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'series[0].points[1].timestamp', '<long>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'series[0].points[1].value', '<double>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'series[0].interval', '<long>'
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'series[0].metadata.origin.metric_type', 0
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'series[0].metadata.origin.product', 0
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'series[0].metadata.origin.service', 0
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'series[0].resources[0].name', '<string>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'series[0].resources[0].type', '<string>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'series[0].resources[1].name', '<string>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'series[0].resources[1].type', '<string>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'series[0].source_type_name', '<string>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'series[0].tags[0]', '<string>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'series[0].tags[1]', '<string>'
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'series[0].type', 3
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'series[0].unit', '<string>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'series[1].metric', '<string>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'series[1].points[0].timestamp', '<long>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'series[1].points[0].value', '<double>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'series[1].points[1].timestamp', '<long>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'series[1].points[1].value', '<double>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'series[1].interval', '<long>'
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'series[1].metadata.origin.metric_type', 0
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'series[1].metadata.origin.product', 0
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'series[1].metadata.origin.service', 0
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'series[1].resources[0].name', '<string>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'series[1].resources[0].type', '<string>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'series[1].resources[1].name', '<string>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'series[1].resources[1].type', '<string>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'series[1].source_type_name', '<string>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'series[1].tags[0]', '<string>'
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'series[1].tags[1]', '<string>'
    EXEC sp_OAMethod @json, 'UpdateInt', @success OUT, 'series[1].type', 0
    EXEC sp_OAMethod @json, 'UpdateString', @success OUT, 'series[1].unit', '<string>'

    EXEC sp_OAMethod @http, 'SetRequestHeader', NULL, 'Content-Type', 'application/json'
    EXEC sp_OAMethod @http, 'SetRequestHeader', NULL, 'Accept', 'application/json'
    EXEC sp_OAMethod @http, 'SetRequestHeader', NULL, 'Content-Encoding', 'identity'

    DECLARE @resp int
    EXEC sp_OAMethod @http, 'PostJson3', @resp OUT, 'https://api.app.ddog-gov.com/api/v2/series', 'application/json', @json
    EXEC sp_OAGetProperty @http, 'LastMethodSuccess', @iTmp0 OUT
    IF @iTmp0 = 0
      BEGIN
        EXEC sp_OAGetProperty @http, 'LastErrorText', @sTmp0 OUT
        PRINT @sTmp0
        EXEC @hr = sp_OADestroy @http
        EXEC @hr = sp_OADestroy @json
        RETURN
      END

    DECLARE @sbResponseBody int
    EXEC @hr = sp_OACreate 'Chilkat_9_5_0.StringBuilder', @sbResponseBody OUT

    EXEC sp_OAMethod @resp, 'GetBodySb', @success OUT, @sbResponseBody

    DECLARE @jResp int
    EXEC @hr = sp_OACreate 'Chilkat_9_5_0.JsonObject', @jResp OUT

    EXEC sp_OAMethod @jResp, 'LoadSb', @success OUT, @sbResponseBody
    EXEC sp_OASetProperty @jResp, 'EmitCompact', 0


    PRINT 'Response Body:'
    EXEC sp_OAMethod @jResp, 'Emit', @sTmp0 OUT
    PRINT @sTmp0

    DECLARE @respStatusCode int
    EXEC sp_OAGetProperty @resp, 'StatusCode', @respStatusCode OUT

    PRINT 'Response Status Code = ' + @respStatusCode
    IF @respStatusCode >= 400
      BEGIN

        PRINT 'Response Header:'
        EXEC sp_OAGetProperty @resp, 'Header', @sTmp0 OUT
        PRINT @sTmp0

        PRINT 'Failed.'
        EXEC @hr = sp_OADestroy @resp

        EXEC @hr = sp_OADestroy @http
        EXEC @hr = sp_OADestroy @json
        EXEC @hr = sp_OADestroy @sbResponseBody
        EXEC @hr = sp_OADestroy @jResp
        RETURN
      END
    EXEC @hr = sp_OADestroy @resp

    -- Sample JSON response:
    -- (Sample code for parsing the JSON response is shown below)

    -- {
    --   "errors": [
    --     "<string>",
    --     "<string>"
    --   ]
    -- }

    -- Sample code for parsing the JSON response...
    -- Use this online tool to generate parsing code from sample JSON: Generate JSON Parsing Code

    DECLARE @strVal nvarchar(4000)

    DECLARE @i int
    SELECT @i = 0
    DECLARE @count_i int
    EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_i OUT, 'errors'
    WHILE @i < @count_i
      BEGIN
        EXEC sp_OASetProperty @jResp, 'I', @i
        EXEC sp_OAMethod @jResp, 'StringOf', @strVal OUT, 'errors[i]'
        SELECT @i = @i + 1
      END

    EXEC @hr = sp_OADestroy @http
    EXEC @hr = sp_OADestroy @json
    EXEC @hr = sp_OADestroy @sbResponseBody
    EXEC @hr = sp_OADestroy @jResp


END
GO

Curl Command

curl -X POST
	-H "Content-Encoding: identity"
	-H "Content-Type: application/json"
	-H "Accept: application/json"
	-d '{
  "series": [
    {
      "metric": "<string>",
      "points": [
        {
          "timestamp": "<long>",
          "value": "<double>"
        },
        {
          "timestamp": "<long>",
          "value": "<double>"
        }
      ],
      "interval": "<long>",
      "metadata": {
        "origin": {
          "metric_type": 0,
          "product": 0,
          "service": 0
        }
      },
      "resources": [
        {
          "name": "<string>",
          "type": "<string>"
        },
        {
          "name": "<string>",
          "type": "<string>"
        }
      ],
      "source_type_name": "<string>",
      "tags": [
        "<string>",
        "<string>"
      ],
      "type": 3,
      "unit": "<string>"
    },
    {
      "metric": "<string>",
      "points": [
        {
          "timestamp": "<long>",
          "value": "<double>"
        },
        {
          "timestamp": "<long>",
          "value": "<double>"
        }
      ],
      "interval": "<long>",
      "metadata": {
        "origin": {
          "metric_type": 0,
          "product": 0,
          "service": 0
        }
      },
      "resources": [
        {
          "name": "<string>",
          "type": "<string>"
        },
        {
          "name": "<string>",
          "type": "<string>"
        }
      ],
      "source_type_name": "<string>",
      "tags": [
        "<string>",
        "<string>"
      ],
      "type": 0,
      "unit": "<string>"
    }
  ]
}'
https://api.app.ddog-gov.com/api/v2/series

Postman Collection Item JSON

{
  "name": "Submit metrics",
  "request": {
    "method": "POST",
    "header": [
      {
        "description": "HTTP header used to compress the media-type.",
        "key": "Content-Encoding",
        "value": "identity"
      },
      {
        "key": "Content-Type",
        "value": "application/json"
      },
      {
        "key": "Accept",
        "value": "application/json"
      }
    ],
    "body": {
      "mode": "raw",
      "raw": "{\n  \"series\": [\n    {\n      \"metric\": \"<string>\",\n      \"points\": [\n        {\n          \"timestamp\": \"<long>\",\n          \"value\": \"<double>\"\n        },\n        {\n          \"timestamp\": \"<long>\",\n          \"value\": \"<double>\"\n        }\n      ],\n      \"interval\": \"<long>\",\n      \"metadata\": {\n        \"origin\": {\n          \"metric_type\": 0,\n          \"product\": 0,\n          \"service\": 0\n        }\n      },\n      \"resources\": [\n        {\n          \"name\": \"<string>\",\n          \"type\": \"<string>\"\n        },\n        {\n          \"name\": \"<string>\",\n          \"type\": \"<string>\"\n        }\n      ],\n      \"source_type_name\": \"<string>\",\n      \"tags\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"type\": 3,\n      \"unit\": \"<string>\"\n    },\n    {\n      \"metric\": \"<string>\",\n      \"points\": [\n        {\n          \"timestamp\": \"<long>\",\n          \"value\": \"<double>\"\n        },\n        {\n          \"timestamp\": \"<long>\",\n          \"value\": \"<double>\"\n        }\n      ],\n      \"interval\": \"<long>\",\n      \"metadata\": {\n        \"origin\": {\n          \"metric_type\": 0,\n          \"product\": 0,\n          \"service\": 0\n        }\n      },\n      \"resources\": [\n        {\n          \"name\": \"<string>\",\n          \"type\": \"<string>\"\n        },\n        {\n          \"name\": \"<string>\",\n          \"type\": \"<string>\"\n        }\n      ],\n      \"source_type_name\": \"<string>\",\n      \"tags\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"type\": 0,\n      \"unit\": \"<string>\"\n    }\n  ]\n}",
      "options": {
        "raw": {
          "headerFamily": "json",
          "language": "json"
        }
      }
    },
    "url": {
      "raw": "{{baseUrl}}/api/v2/series",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "api",
        "v2",
        "series"
      ]
    },
    "description": "The metrics end-point allows you to post time-series data that can be graphed on Datadog’s 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’re 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.\n\nHost name is one of the resources in the Resources field."
  },
  "response": [
    {
      "name": "Payload accepted",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "description": "HTTP header used to compress the media-type.",
            "key": "Content-Encoding",
            "value": "deflate"
          },
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "key": "Accept",
            "value": "application/json"
          },
          {
            "description": "Added as a part of security scheme: apikey",
            "key": "DD-API-KEY",
            "value": "<API Key>"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"series\": [\n    {\n      \"metric\": \"<string>\",\n      \"points\": [\n        {\n          \"timestamp\": \"<long>\",\n          \"value\": \"<double>\"\n        },\n        {\n          \"timestamp\": \"<long>\",\n          \"value\": \"<double>\"\n        }\n      ],\n      \"interval\": \"<long>\",\n      \"metadata\": {\n        \"origin\": {\n          \"metric_type\": 0,\n          \"product\": 0,\n          \"service\": 0\n        }\n      },\n      \"resources\": [\n        {\n          \"name\": \"<string>\",\n          \"type\": \"<string>\"\n        },\n        {\n          \"name\": \"<string>\",\n          \"type\": \"<string>\"\n        }\n      ],\n      \"source_type_name\": \"<string>\",\n      \"tags\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"type\": 3,\n      \"unit\": \"<string>\"\n    },\n    {\n      \"metric\": \"<string>\",\n      \"points\": [\n        {\n          \"timestamp\": \"<long>\",\n          \"value\": \"<double>\"\n        },\n        {\n          \"timestamp\": \"<long>\",\n          \"value\": \"<double>\"\n        }\n      ],\n      \"interval\": \"<long>\",\n      \"metadata\": {\n        \"origin\": {\n          \"metric_type\": 0,\n          \"product\": 0,\n          \"service\": 0\n        }\n      },\n      \"resources\": [\n        {\n          \"name\": \"<string>\",\n          \"type\": \"<string>\"\n        },\n        {\n          \"name\": \"<string>\",\n          \"type\": \"<string>\"\n        }\n      ],\n      \"source_type_name\": \"<string>\",\n      \"tags\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"type\": 0,\n      \"unit\": \"<string>\"\n    }\n  ]\n}",
          "options": {
            "raw": {
              "headerFamily": "json",
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{baseUrl}}/api/v2/series",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v2",
            "series"
          ]
        }
      },
      "status": "Accepted",
      "code": 202,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n  \"errors\": [\n    \"<string>\",\n    \"<string>\"\n  ]\n}"
    },
    {
      "name": "Bad Request",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "description": "HTTP header used to compress the media-type.",
            "key": "Content-Encoding",
            "value": "deflate"
          },
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "key": "Accept",
            "value": "application/json"
          },
          {
            "description": "Added as a part of security scheme: apikey",
            "key": "DD-API-KEY",
            "value": "<API Key>"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"series\": [\n    {\n      \"metric\": \"<string>\",\n      \"points\": [\n        {\n          \"timestamp\": \"<long>\",\n          \"value\": \"<double>\"\n        },\n        {\n          \"timestamp\": \"<long>\",\n          \"value\": \"<double>\"\n        }\n      ],\n      \"interval\": \"<long>\",\n      \"metadata\": {\n        \"origin\": {\n          \"metric_type\": 0,\n          \"product\": 0,\n          \"service\": 0\n        }\n      },\n      \"resources\": [\n        {\n          \"name\": \"<string>\",\n          \"type\": \"<string>\"\n        },\n        {\n          \"name\": \"<string>\",\n          \"type\": \"<string>\"\n        }\n      ],\n      \"source_type_name\": \"<string>\",\n      \"tags\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"type\": 3,\n      \"unit\": \"<string>\"\n    },\n    {\n      \"metric\": \"<string>\",\n      \"points\": [\n        {\n          \"timestamp\": \"<long>\",\n          \"value\": \"<double>\"\n        },\n        {\n          \"timestamp\": \"<long>\",\n          \"value\": \"<double>\"\n        }\n      ],\n      \"interval\": \"<long>\",\n      \"metadata\": {\n        \"origin\": {\n          \"metric_type\": 0,\n          \"product\": 0,\n          \"service\": 0\n        }\n      },\n      \"resources\": [\n        {\n          \"name\": \"<string>\",\n          \"type\": \"<string>\"\n        },\n        {\n          \"name\": \"<string>\",\n          \"type\": \"<string>\"\n        }\n      ],\n      \"source_type_name\": \"<string>\",\n      \"tags\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"type\": 0,\n      \"unit\": \"<string>\"\n    }\n  ]\n}",
          "options": {
            "raw": {
              "headerFamily": "json",
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{baseUrl}}/api/v2/series",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v2",
            "series"
          ]
        }
      },
      "status": "Bad Request",
      "code": 400,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n  \"errors\": [\n    \"<string>\",\n    \"<string>\"\n  ]\n}"
    },
    {
      "name": "Authentication error",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "description": "HTTP header used to compress the media-type.",
            "key": "Content-Encoding",
            "value": "deflate"
          },
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "key": "Accept",
            "value": "application/json"
          },
          {
            "description": "Added as a part of security scheme: apikey",
            "key": "DD-API-KEY",
            "value": "<API Key>"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"series\": [\n    {\n      \"metric\": \"<string>\",\n      \"points\": [\n        {\n          \"timestamp\": \"<long>\",\n          \"value\": \"<double>\"\n        },\n        {\n          \"timestamp\": \"<long>\",\n          \"value\": \"<double>\"\n        }\n      ],\n      \"interval\": \"<long>\",\n      \"metadata\": {\n        \"origin\": {\n          \"metric_type\": 0,\n          \"product\": 0,\n          \"service\": 0\n        }\n      },\n      \"resources\": [\n        {\n          \"name\": \"<string>\",\n          \"type\": \"<string>\"\n        },\n        {\n          \"name\": \"<string>\",\n          \"type\": \"<string>\"\n        }\n      ],\n      \"source_type_name\": \"<string>\",\n      \"tags\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"type\": 3,\n      \"unit\": \"<string>\"\n    },\n    {\n      \"metric\": \"<string>\",\n      \"points\": [\n        {\n          \"timestamp\": \"<long>\",\n          \"value\": \"<double>\"\n        },\n        {\n          \"timestamp\": \"<long>\",\n          \"value\": \"<double>\"\n        }\n      ],\n      \"interval\": \"<long>\",\n      \"metadata\": {\n        \"origin\": {\n          \"metric_type\": 0,\n          \"product\": 0,\n          \"service\": 0\n        }\n      },\n      \"resources\": [\n        {\n          \"name\": \"<string>\",\n          \"type\": \"<string>\"\n        },\n        {\n          \"name\": \"<string>\",\n          \"type\": \"<string>\"\n        }\n      ],\n      \"source_type_name\": \"<string>\",\n      \"tags\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"type\": 0,\n      \"unit\": \"<string>\"\n    }\n  ]\n}",
          "options": {
            "raw": {
              "headerFamily": "json",
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{baseUrl}}/api/v2/series",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v2",
            "series"
          ]
        }
      },
      "status": "Forbidden",
      "code": 403,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n  \"errors\": [\n    \"<string>\",\n    \"<string>\"\n  ]\n}"
    },
    {
      "name": "Request timeout",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "description": "HTTP header used to compress the media-type.",
            "key": "Content-Encoding",
            "value": "deflate"
          },
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "key": "Accept",
            "value": "application/json"
          },
          {
            "description": "Added as a part of security scheme: apikey",
            "key": "DD-API-KEY",
            "value": "<API Key>"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"series\": [\n    {\n      \"metric\": \"<string>\",\n      \"points\": [\n        {\n          \"timestamp\": \"<long>\",\n          \"value\": \"<double>\"\n        },\n        {\n          \"timestamp\": \"<long>\",\n          \"value\": \"<double>\"\n        }\n      ],\n      \"interval\": \"<long>\",\n      \"metadata\": {\n        \"origin\": {\n          \"metric_type\": 0,\n          \"product\": 0,\n          \"service\": 0\n        }\n      },\n      \"resources\": [\n        {\n          \"name\": \"<string>\",\n          \"type\": \"<string>\"\n        },\n        {\n          \"name\": \"<string>\",\n          \"type\": \"<string>\"\n        }\n      ],\n      \"source_type_name\": \"<string>\",\n      \"tags\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"type\": 3,\n      \"unit\": \"<string>\"\n    },\n    {\n      \"metric\": \"<string>\",\n      \"points\": [\n        {\n          \"timestamp\": \"<long>\",\n          \"value\": \"<double>\"\n        },\n        {\n          \"timestamp\": \"<long>\",\n          \"value\": \"<double>\"\n        }\n      ],\n      \"interval\": \"<long>\",\n      \"metadata\": {\n        \"origin\": {\n          \"metric_type\": 0,\n          \"product\": 0,\n          \"service\": 0\n        }\n      },\n      \"resources\": [\n        {\n          \"name\": \"<string>\",\n          \"type\": \"<string>\"\n        },\n        {\n          \"name\": \"<string>\",\n          \"type\": \"<string>\"\n        }\n      ],\n      \"source_type_name\": \"<string>\",\n      \"tags\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"type\": 0,\n      \"unit\": \"<string>\"\n    }\n  ]\n}",
          "options": {
            "raw": {
              "headerFamily": "json",
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{baseUrl}}/api/v2/series",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v2",
            "series"
          ]
        }
      },
      "status": "Request Timeout",
      "code": 408,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n  \"errors\": [\n    \"<string>\",\n    \"<string>\"\n  ]\n}"
    },
    {
      "name": "Payload too large",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "description": "HTTP header used to compress the media-type.",
            "key": "Content-Encoding",
            "value": "deflate"
          },
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "key": "Accept",
            "value": "application/json"
          },
          {
            "description": "Added as a part of security scheme: apikey",
            "key": "DD-API-KEY",
            "value": "<API Key>"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"series\": [\n    {\n      \"metric\": \"<string>\",\n      \"points\": [\n        {\n          \"timestamp\": \"<long>\",\n          \"value\": \"<double>\"\n        },\n        {\n          \"timestamp\": \"<long>\",\n          \"value\": \"<double>\"\n        }\n      ],\n      \"interval\": \"<long>\",\n      \"metadata\": {\n        \"origin\": {\n          \"metric_type\": 0,\n          \"product\": 0,\n          \"service\": 0\n        }\n      },\n      \"resources\": [\n        {\n          \"name\": \"<string>\",\n          \"type\": \"<string>\"\n        },\n        {\n          \"name\": \"<string>\",\n          \"type\": \"<string>\"\n        }\n      ],\n      \"source_type_name\": \"<string>\",\n      \"tags\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"type\": 3,\n      \"unit\": \"<string>\"\n    },\n    {\n      \"metric\": \"<string>\",\n      \"points\": [\n        {\n          \"timestamp\": \"<long>\",\n          \"value\": \"<double>\"\n        },\n        {\n          \"timestamp\": \"<long>\",\n          \"value\": \"<double>\"\n        }\n      ],\n      \"interval\": \"<long>\",\n      \"metadata\": {\n        \"origin\": {\n          \"metric_type\": 0,\n          \"product\": 0,\n          \"service\": 0\n        }\n      },\n      \"resources\": [\n        {\n          \"name\": \"<string>\",\n          \"type\": \"<string>\"\n        },\n        {\n          \"name\": \"<string>\",\n          \"type\": \"<string>\"\n        }\n      ],\n      \"source_type_name\": \"<string>\",\n      \"tags\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"type\": 0,\n      \"unit\": \"<string>\"\n    }\n  ]\n}",
          "options": {
            "raw": {
              "headerFamily": "json",
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{baseUrl}}/api/v2/series",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v2",
            "series"
          ]
        }
      },
      "status": "Request Entity Too Large",
      "code": 413,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n  \"errors\": [\n    \"<string>\",\n    \"<string>\"\n  ]\n}"
    },
    {
      "name": "Too many requests",
      "originalRequest": {
        "method": "POST",
        "header": [
          {
            "description": "HTTP header used to compress the media-type.",
            "key": "Content-Encoding",
            "value": "deflate"
          },
          {
            "key": "Content-Type",
            "value": "application/json"
          },
          {
            "key": "Accept",
            "value": "application/json"
          },
          {
            "description": "Added as a part of security scheme: apikey",
            "key": "DD-API-KEY",
            "value": "<API Key>"
          }
        ],
        "body": {
          "mode": "raw",
          "raw": "{\n  \"series\": [\n    {\n      \"metric\": \"<string>\",\n      \"points\": [\n        {\n          \"timestamp\": \"<long>\",\n          \"value\": \"<double>\"\n        },\n        {\n          \"timestamp\": \"<long>\",\n          \"value\": \"<double>\"\n        }\n      ],\n      \"interval\": \"<long>\",\n      \"metadata\": {\n        \"origin\": {\n          \"metric_type\": 0,\n          \"product\": 0,\n          \"service\": 0\n        }\n      },\n      \"resources\": [\n        {\n          \"name\": \"<string>\",\n          \"type\": \"<string>\"\n        },\n        {\n          \"name\": \"<string>\",\n          \"type\": \"<string>\"\n        }\n      ],\n      \"source_type_name\": \"<string>\",\n      \"tags\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"type\": 3,\n      \"unit\": \"<string>\"\n    },\n    {\n      \"metric\": \"<string>\",\n      \"points\": [\n        {\n          \"timestamp\": \"<long>\",\n          \"value\": \"<double>\"\n        },\n        {\n          \"timestamp\": \"<long>\",\n          \"value\": \"<double>\"\n        }\n      ],\n      \"interval\": \"<long>\",\n      \"metadata\": {\n        \"origin\": {\n          \"metric_type\": 0,\n          \"product\": 0,\n          \"service\": 0\n        }\n      },\n      \"resources\": [\n        {\n          \"name\": \"<string>\",\n          \"type\": \"<string>\"\n        },\n        {\n          \"name\": \"<string>\",\n          \"type\": \"<string>\"\n        }\n      ],\n      \"source_type_name\": \"<string>\",\n      \"tags\": [\n        \"<string>\",\n        \"<string>\"\n      ],\n      \"type\": 0,\n      \"unit\": \"<string>\"\n    }\n  ]\n}",
          "options": {
            "raw": {
              "headerFamily": "json",
              "language": "json"
            }
          }
        },
        "url": {
          "raw": "{{baseUrl}}/api/v2/series",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v2",
            "series"
          ]
        }
      },
      "status": "Too Many Requests",
      "code": 429,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json"
        }
      ],
      "cookie": [
      ],
      "body": "{\n  \"errors\": [\n    \"<string>\",\n    \"<string>\"\n  ]\n}"
    }
  ]
}