Chilkat Online Tools

SQL Server / Datadog API Collection / Get monthly usage attribution

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

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

    EXEC sp_OAMethod @queryParams, 'UpdateString', @success OUT, 'start_month', '1991-02-02T07:22:34.204Z'
    EXEC sp_OAMethod @queryParams, 'UpdateString', @success OUT, 'end_month', '1991-02-02T07:22:34.204Z'
    EXEC sp_OAMethod @queryParams, 'UpdateString', @success OUT, 'fields', 'dbm_queries_usage'
    EXEC sp_OAMethod @queryParams, 'UpdateString', @success OUT, 'sort_direction', 'desc'
    EXEC sp_OAMethod @queryParams, 'UpdateString', @success OUT, 'sort_name', 'dbm_queries_usage'
    EXEC sp_OAMethod @queryParams, 'UpdateString', @success OUT, 'tag_breakdown_keys', 'tempor Ut sed velit'
    EXEC sp_OAMethod @queryParams, 'UpdateString', @success OUT, 'next_record_id', 'tempor Ut sed velit'
    EXEC sp_OAMethod @queryParams, 'UpdateString', @success OUT, 'include_descendants', 'true'

    EXEC sp_OAMethod @http, 'SetRequestHeader', NULL, 'Accept', 'application/json;datetime-format=rfc3339'

    DECLARE @resp int
    EXEC sp_OAMethod @http, 'QuickRequestParams', @resp OUT, 'GET', 'https://api.app.ddog-gov.com/api/v1/usage/monthly-attribution', @queryParams
    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 @queryParams
        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 @queryParams
        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)

    -- {
    --   "metadata": {
    --     "aggregates": [
    --       {
    --         "agg_type": "sum",
    --         "field": "custom_timeseries_usage",
    --         "value": -75872274.11279911
    --       },
    --       {
    --         "agg_type": "sum",
    --         "field": "custom_timeseries_usage",
    --         "value": 62426608.270860344
    --       }
    --     ],
    --     "pagination": {
    --       "next_record_id": "in velit esse"
    --     }
    --   },
    --   "usage": [
    --     {
    --       "month": "2002-08-13T15:07:13.466Z",
    --       "org_name": "elit reprehenderit",
    --       "public_id": "minim ipsum anim ",
    --       "region": "eu incididunt sint ut",
    --       "tag_config_source": "irure laboris culpa",
    --       "tags": {
    --         "dolore62": [
    --           "datadog-integrations-lab",
    --           "datadog-integrations-lab"
    --         ]
    --       },
    --       "updated_at": "2006-01-20T21:37:20.788Z",
    --       "values": {
    --         "api_percentage": -42977723.76246902,
    --         "api_usage": 95397982.7763887,
    --         "apm_fargate_percentage": 98784807.55202839,
    --         "apm_fargate_usage": -5570111.678832486,
    --         "apm_host_percentage": -56965575.051769115,
    --         "apm_host_usage": 6024527.554351345,
    --         "apm_usm_percentage": -44347230.916792005,
    --         "apm_usm_usage": -53614973.50940212,
    --         "appsec_fargate_percentage": -63949646.084028535,
    --         "appsec_fargate_usage": -13950059.836552203,
    --         "appsec_percentage": 77503688.59718463,
    --         "appsec_usage": -2749536.490563825,
    --         "browser_percentage": -57610165.63884018,
    --         "browser_usage": -61629554.27924777,
    --         "ci_visibility_itr_percentage": 9801397.272425354,
    --         "ci_visibility_itr_usage": 86901082.07052395,
    --         "container_excl_agent_percentage": -94758211.3791813,
    --         "container_excl_agent_usage": 47871386.536788315,
    --         "container_percentage": 77684191.36010852,
    --         "container_usage": 42244878.990811646,
    --         "cspm_containers_percentage": -27358203.524139896,
    --         "cspm_containers_usage": 7194834.822350323,
    --         "cspm_hosts_percentage": -58400939.80376841,
    --         "cspm_hosts_usage": -13088798.55443798,
    --         "custom_ingested_timeseries_percentage": 25418473.141955733,
    --         "custom_ingested_timeseries_usage": -6930274.896374792,
    --         "custom_timeseries_percentage": 57087072.053094536,
    --         "custom_timeseries_usage": -96533528.35676041,
    --         "cws_containers_percentage": 38802199.2161935,
    --         "cws_containers_usage": -48037945.78847249,
    --         "cws_hosts_percentage": -38139753.73665444,
    --         "cws_hosts_usage": 99175833.09167394,
    --         "dbm_hosts_percentage": -89557128.20902187,
    --         "dbm_hosts_usage": -2062788.2317033857,
    --         "dbm_queries_percentage": -81088882.42935035,
    --         "dbm_queries_usage": 1723401.8763353676,
    --         "estimated_indexed_logs_percentage": 19494055.047132045,
    --         "estimated_indexed_logs_usage": 10830691.252756879,
    --         "estimated_indexed_spans_percentage": 62593562.02511239,
    --         "estimated_indexed_spans_usage": -47185922.657971926,
    --         "estimated_ingested_logs_percentage": 87624062.51598707,
    --         "estimated_ingested_logs_usage": -35910323.49944707,
    --         "estimated_ingested_spans_percentage": -26620688.87925279,
    --         "estimated_ingested_spans_usage": -55965088.442498125,
    --         "estimated_rum_sessions_percentage": -89351036.0053822,
    --         "estimated_rum_sessions_usage": 69102190.52327245,
    --         "fargate_percentage": 31062755.564841017,
    --         "fargate_usage": 47033739.82451412,
    --         "functions_percentage": 53367355.86064315,
    --         "functions_usage": 11045136.755249456,
    --         "infra_host_percentage": -54626318.30325018,
    --         "infra_host_usage": 5481953.102816388,
    --         "invocations_percentage": 27641232.88982962,
    --         "invocations_usage": -23217061.12940158,
    --         "npm_host_percentage": -70428889.89530578,
    --         "npm_host_usage": 75035524.55544943,
    --         "obs_pipeline_bytes_percentage": 95030078.61571154,
    --         "obs_pipeline_bytes_usage": 16308063.424261168,
    --         "profiled_container_percentage": -47294745.9171313,
    --         "profiled_container_usage": 91333575.12025896,
    --         "profiled_fargate_percentage": 1159081.2940575331,
    --         "profiled_fargate_usage": 46737078.93751609,
    --         "profiled_host_percentage": -16133546.561951116,
    --         "profiled_host_usage": -55598728.99167555,
    --         "sds_scanned_bytes_percentage": 41324136.36835453,
    --         "sds_scanned_bytes_usage": 56766327.929751456,
    --         "snmp_percentage": -88823427.70029327,
    --         "snmp_usage": 32225665.615818232,
    --         "universal_service_monitoring_percentage": -79287423.3883524,
    --         "universal_service_monitoring_usage": -2355924.928932488,
    --         "vuln_management_hosts_percentage": -16935520.54186198,
    --         "vuln_management_hosts_usage": 74036018.8908129
    --       }
    --     },
    --     {
    --       "month": "1959-07-18T20:29:56.664Z",
    --       "org_name": "aliquip magna dolor",
    --       "public_id": "et iru",
    --       "region": "ut est esse ex",
    --       "tag_config_source": "sint",
    --       "tags": {
    --         "elit276": [
    --           "datadog-integrations-lab",
    --           "datadog-integrations-lab"
    --         ],
    --         "minim63": [
    --           "datadog-integrations-lab",
    --           "datadog-integrations-lab"
    --         ],
    --         "pariatur_d4": [
    --           "datadog-integrations-lab",
    --           "datadog-integrations-lab"
    --         ]
    --       },
    --       "updated_at": "1950-10-12T07:16:52.126Z",
    --       "values": {
    --         "api_percentage": -67093975.89355124,
    --         "api_usage": 22892492.134701967,
    --         "apm_fargate_percentage": 86445539.6960246,
    --         "apm_fargate_usage": 96626296.86785325,
    --         "apm_host_percentage": -17829260.52661082,
    --         "apm_host_usage": 99024863.04694226,
    --         "apm_usm_percentage": 15052506.96019815,
    --         "apm_usm_usage": -51446462.70068289,
    --         "appsec_fargate_percentage": -59920029.75633368,
    --         "appsec_fargate_usage": -12417338.286942497,
    --         "appsec_percentage": 33591696.66073081,
    --         "appsec_usage": 25137188.487309366,
    --         "browser_percentage": 97940358.7215335,
    --         "browser_usage": -52673885.905316986,
    --         "ci_visibility_itr_percentage": -88219975.69687605,
    --         "ci_visibility_itr_usage": -9447846.575050354,
    --         "container_excl_agent_percentage": -46735760.53814248,
    --         "container_excl_agent_usage": -73167643.29069096,
    --         "container_percentage": 69642254.33344507,
    --         "container_usage": 41091259.60962516,
    --         "cspm_containers_percentage": 42210153.5692417,
    --         "cspm_containers_usage": 75649568.34254551,
    --         "cspm_hosts_percentage": 32418249.39784172,
    --         "cspm_hosts_usage": 69540549.39095044,
    --         "custom_ingested_timeseries_percentage": -68775982.9429293,
    --         "custom_ingested_timeseries_usage": 76963891.89494428,
    --         "custom_timeseries_percentage": 60837059.719377786,
    --         "custom_timeseries_usage": -18989551.834226012,
    --         "cws_containers_percentage": -72647861.32948461,
    --         "cws_containers_usage": 99339681.5271622,
    --         "cws_hosts_percentage": -83440078.50328308,
    --         "cws_hosts_usage": 14084142.169001937,
    --         "dbm_hosts_percentage": 82967791.28126338,
    --         "dbm_hosts_usage": 25758868.864204437,
    --         "dbm_queries_percentage": -66889696.73566167,
    --         "dbm_queries_usage": 82584001.9588587,
    --         "estimated_indexed_logs_percentage": 18445591.7106888,
    --         "estimated_indexed_logs_usage": 95113838.43812409,
    --         "estimated_indexed_spans_percentage": -60446633.38281309,
    --         "estimated_indexed_spans_usage": -35817307.54312336,
    --         "estimated_ingested_logs_percentage": -78223744.53046979,
    --         "estimated_ingested_logs_usage": -69451886.32509902,
    --         "estimated_ingested_spans_percentage": 40809724.25659558,
    --         "estimated_ingested_spans_usage": -8599266.75406441,
    --         "estimated_rum_sessions_percentage": -50403382.65600939,
    --         "estimated_rum_sessions_usage": -56068159.05777034,
    --         "fargate_percentage": -58215167.93972128,
    --         "fargate_usage": 66587355.106164634,
    --         "functions_percentage": -47256769.918816224,
    --         "functions_usage": 1210604.9136780202,
    --         "infra_host_percentage": -15651911.45215477,
    --         "infra_host_usage": 83986438.03159028,
    --         "invocations_percentage": -72916419.47570357,
    --         "invocations_usage": -99391776.91322954,
    --         "npm_host_percentage": -26689735.74485798,
    --         "npm_host_usage": -58545960.56280492,
    --         "obs_pipeline_bytes_percentage": -18838497.449270487,
    --         "obs_pipeline_bytes_usage": -15181917.208459169,
    --         "profiled_container_percentage": -69415049.22818953,
    --         "profiled_container_usage": -22422349.354449615,
    --         "profiled_fargate_percentage": -88757833.10218939,
    --         "profiled_fargate_usage": -48134372.15719563,
    --         "profiled_host_percentage": -82357525.04911637,
    --         "profiled_host_usage": 50907558.67759526,
    --         "sds_scanned_bytes_percentage": -72420339.71282078,
    --         "sds_scanned_bytes_usage": 54343122.17874324,
    --         "snmp_percentage": -38192297.57339508,
    --         "snmp_usage": 26362518.073974475,
    --         "universal_service_monitoring_percentage": -97356790.37923175,
    --         "universal_service_monitoring_usage": -42030474.203919254,
    --         "vuln_management_hosts_percentage": -74076816.34914787,
    --         "vuln_management_hosts_usage": -25114557.39136301
    --       }
    --     }
    --   ]
    -- }

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

    DECLARE @agg_type nvarchar(4000)

    DECLARE @field nvarchar(4000)

    DECLARE @value nvarchar(4000)

    DECLARE @month nvarchar(4000)

    DECLARE @org_name nvarchar(4000)

    DECLARE @public_id nvarchar(4000)

    DECLARE @region nvarchar(4000)

    DECLARE @tag_config_source nvarchar(4000)

    DECLARE @updated_at nvarchar(4000)

    DECLARE @Api_percentage nvarchar(4000)

    DECLARE @Api_usage nvarchar(4000)

    DECLARE @Apm_fargate_percentage nvarchar(4000)

    DECLARE @Apm_fargate_usage nvarchar(4000)

    DECLARE @Apm_host_percentage nvarchar(4000)

    DECLARE @Apm_host_usage nvarchar(4000)

    DECLARE @Apm_usm_percentage nvarchar(4000)

    DECLARE @Apm_usm_usage nvarchar(4000)

    DECLARE @Appsec_fargate_percentage nvarchar(4000)

    DECLARE @Appsec_fargate_usage nvarchar(4000)

    DECLARE @Appsec_percentage nvarchar(4000)

    DECLARE @Appsec_usage nvarchar(4000)

    DECLARE @Browser_percentage nvarchar(4000)

    DECLARE @Browser_usage nvarchar(4000)

    DECLARE @Ci_visibility_itr_percentage nvarchar(4000)

    DECLARE @Ci_visibility_itr_usage nvarchar(4000)

    DECLARE @Container_excl_agent_percentage nvarchar(4000)

    DECLARE @Container_excl_agent_usage nvarchar(4000)

    DECLARE @Container_percentage nvarchar(4000)

    DECLARE @Container_usage nvarchar(4000)

    DECLARE @Cspm_containers_percentage nvarchar(4000)

    DECLARE @Cspm_containers_usage nvarchar(4000)

    DECLARE @Cspm_hosts_percentage nvarchar(4000)

    DECLARE @Cspm_hosts_usage nvarchar(4000)

    DECLARE @Custom_ingested_timeseries_percentage nvarchar(4000)

    DECLARE @Custom_ingested_timeseries_usage nvarchar(4000)

    DECLARE @Custom_timeseries_percentage nvarchar(4000)

    DECLARE @Custom_timeseries_usage nvarchar(4000)

    DECLARE @Cws_containers_percentage nvarchar(4000)

    DECLARE @Cws_containers_usage nvarchar(4000)

    DECLARE @Cws_hosts_percentage nvarchar(4000)

    DECLARE @Cws_hosts_usage nvarchar(4000)

    DECLARE @Dbm_hosts_percentage nvarchar(4000)

    DECLARE @Dbm_hosts_usage nvarchar(4000)

    DECLARE @Dbm_queries_percentage nvarchar(4000)

    DECLARE @Dbm_queries_usage nvarchar(4000)

    DECLARE @Estimated_indexed_logs_percentage nvarchar(4000)

    DECLARE @Estimated_indexed_logs_usage nvarchar(4000)

    DECLARE @Estimated_indexed_spans_percentage nvarchar(4000)

    DECLARE @Estimated_indexed_spans_usage nvarchar(4000)

    DECLARE @Estimated_ingested_logs_percentage nvarchar(4000)

    DECLARE @Estimated_ingested_logs_usage nvarchar(4000)

    DECLARE @Estimated_ingested_spans_percentage nvarchar(4000)

    DECLARE @Estimated_ingested_spans_usage nvarchar(4000)

    DECLARE @Estimated_rum_sessions_percentage nvarchar(4000)

    DECLARE @Estimated_rum_sessions_usage nvarchar(4000)

    DECLARE @Fargate_percentage nvarchar(4000)

    DECLARE @Fargate_usage nvarchar(4000)

    DECLARE @Functions_percentage nvarchar(4000)

    DECLARE @Functions_usage nvarchar(4000)

    DECLARE @Infra_host_percentage nvarchar(4000)

    DECLARE @Infra_host_usage nvarchar(4000)

    DECLARE @Invocations_percentage nvarchar(4000)

    DECLARE @Invocations_usage nvarchar(4000)

    DECLARE @Npm_host_percentage nvarchar(4000)

    DECLARE @Npm_host_usage nvarchar(4000)

    DECLARE @Obs_pipeline_bytes_percentage nvarchar(4000)

    DECLARE @Obs_pipeline_bytes_usage nvarchar(4000)

    DECLARE @Profiled_container_percentage nvarchar(4000)

    DECLARE @Profiled_container_usage nvarchar(4000)

    DECLARE @Profiled_fargate_percentage nvarchar(4000)

    DECLARE @Profiled_fargate_usage nvarchar(4000)

    DECLARE @Profiled_host_percentage nvarchar(4000)

    DECLARE @Profiled_host_usage nvarchar(4000)

    DECLARE @Sds_scanned_bytes_percentage nvarchar(4000)

    DECLARE @Sds_scanned_bytes_usage nvarchar(4000)

    DECLARE @Snmp_percentage nvarchar(4000)

    DECLARE @Snmp_usage nvarchar(4000)

    DECLARE @Universal_service_monitoring_percentage nvarchar(4000)

    DECLARE @Universal_service_monitoring_usage nvarchar(4000)

    DECLARE @Vuln_management_hosts_percentage nvarchar(4000)

    DECLARE @Vuln_management_hosts_usage nvarchar(4000)

    DECLARE @j int

    DECLARE @count_j int

    DECLARE @strVal nvarchar(4000)

    DECLARE @Next_record_id nvarchar(4000)
    EXEC sp_OAMethod @jResp, 'StringOf', @Next_record_id OUT, 'metadata.pagination.next_record_id'
    DECLARE @i int
    SELECT @i = 0
    DECLARE @count_i int
    EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_i OUT, 'metadata.aggregates'
    WHILE @i < @count_i
      BEGIN
        EXEC sp_OASetProperty @jResp, 'I', @i
        EXEC sp_OAMethod @jResp, 'StringOf', @agg_type OUT, 'metadata.aggregates[i].agg_type'
        EXEC sp_OAMethod @jResp, 'StringOf', @field OUT, 'metadata.aggregates[i].field'
        EXEC sp_OAMethod @jResp, 'StringOf', @value OUT, 'metadata.aggregates[i].value'
        SELECT @i = @i + 1
      END
    SELECT @i = 0
    EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_i OUT, 'usage'
    WHILE @i < @count_i
      BEGIN
        EXEC sp_OASetProperty @jResp, 'I', @i
        EXEC sp_OAMethod @jResp, 'StringOf', @month OUT, 'usage[i].month'
        EXEC sp_OAMethod @jResp, 'StringOf', @org_name OUT, 'usage[i].org_name'
        EXEC sp_OAMethod @jResp, 'StringOf', @public_id OUT, 'usage[i].public_id'
        EXEC sp_OAMethod @jResp, 'StringOf', @region OUT, 'usage[i].region'
        EXEC sp_OAMethod @jResp, 'StringOf', @tag_config_source OUT, 'usage[i].tag_config_source'
        EXEC sp_OAMethod @jResp, 'StringOf', @updated_at OUT, 'usage[i].updated_at'
        EXEC sp_OAMethod @jResp, 'StringOf', @Api_percentage OUT, 'usage[i].values.api_percentage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Api_usage OUT, 'usage[i].values.api_usage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Apm_fargate_percentage OUT, 'usage[i].values.apm_fargate_percentage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Apm_fargate_usage OUT, 'usage[i].values.apm_fargate_usage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Apm_host_percentage OUT, 'usage[i].values.apm_host_percentage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Apm_host_usage OUT, 'usage[i].values.apm_host_usage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Apm_usm_percentage OUT, 'usage[i].values.apm_usm_percentage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Apm_usm_usage OUT, 'usage[i].values.apm_usm_usage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Appsec_fargate_percentage OUT, 'usage[i].values.appsec_fargate_percentage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Appsec_fargate_usage OUT, 'usage[i].values.appsec_fargate_usage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Appsec_percentage OUT, 'usage[i].values.appsec_percentage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Appsec_usage OUT, 'usage[i].values.appsec_usage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Browser_percentage OUT, 'usage[i].values.browser_percentage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Browser_usage OUT, 'usage[i].values.browser_usage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Ci_visibility_itr_percentage OUT, 'usage[i].values.ci_visibility_itr_percentage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Ci_visibility_itr_usage OUT, 'usage[i].values.ci_visibility_itr_usage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Container_excl_agent_percentage OUT, 'usage[i].values.container_excl_agent_percentage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Container_excl_agent_usage OUT, 'usage[i].values.container_excl_agent_usage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Container_percentage OUT, 'usage[i].values.container_percentage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Container_usage OUT, 'usage[i].values.container_usage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Cspm_containers_percentage OUT, 'usage[i].values.cspm_containers_percentage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Cspm_containers_usage OUT, 'usage[i].values.cspm_containers_usage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Cspm_hosts_percentage OUT, 'usage[i].values.cspm_hosts_percentage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Cspm_hosts_usage OUT, 'usage[i].values.cspm_hosts_usage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Custom_ingested_timeseries_percentage OUT, 'usage[i].values.custom_ingested_timeseries_percentage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Custom_ingested_timeseries_usage OUT, 'usage[i].values.custom_ingested_timeseries_usage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Custom_timeseries_percentage OUT, 'usage[i].values.custom_timeseries_percentage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Custom_timeseries_usage OUT, 'usage[i].values.custom_timeseries_usage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Cws_containers_percentage OUT, 'usage[i].values.cws_containers_percentage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Cws_containers_usage OUT, 'usage[i].values.cws_containers_usage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Cws_hosts_percentage OUT, 'usage[i].values.cws_hosts_percentage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Cws_hosts_usage OUT, 'usage[i].values.cws_hosts_usage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Dbm_hosts_percentage OUT, 'usage[i].values.dbm_hosts_percentage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Dbm_hosts_usage OUT, 'usage[i].values.dbm_hosts_usage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Dbm_queries_percentage OUT, 'usage[i].values.dbm_queries_percentage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Dbm_queries_usage OUT, 'usage[i].values.dbm_queries_usage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Estimated_indexed_logs_percentage OUT, 'usage[i].values.estimated_indexed_logs_percentage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Estimated_indexed_logs_usage OUT, 'usage[i].values.estimated_indexed_logs_usage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Estimated_indexed_spans_percentage OUT, 'usage[i].values.estimated_indexed_spans_percentage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Estimated_indexed_spans_usage OUT, 'usage[i].values.estimated_indexed_spans_usage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Estimated_ingested_logs_percentage OUT, 'usage[i].values.estimated_ingested_logs_percentage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Estimated_ingested_logs_usage OUT, 'usage[i].values.estimated_ingested_logs_usage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Estimated_ingested_spans_percentage OUT, 'usage[i].values.estimated_ingested_spans_percentage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Estimated_ingested_spans_usage OUT, 'usage[i].values.estimated_ingested_spans_usage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Estimated_rum_sessions_percentage OUT, 'usage[i].values.estimated_rum_sessions_percentage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Estimated_rum_sessions_usage OUT, 'usage[i].values.estimated_rum_sessions_usage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Fargate_percentage OUT, 'usage[i].values.fargate_percentage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Fargate_usage OUT, 'usage[i].values.fargate_usage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Functions_percentage OUT, 'usage[i].values.functions_percentage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Functions_usage OUT, 'usage[i].values.functions_usage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Infra_host_percentage OUT, 'usage[i].values.infra_host_percentage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Infra_host_usage OUT, 'usage[i].values.infra_host_usage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Invocations_percentage OUT, 'usage[i].values.invocations_percentage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Invocations_usage OUT, 'usage[i].values.invocations_usage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Npm_host_percentage OUT, 'usage[i].values.npm_host_percentage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Npm_host_usage OUT, 'usage[i].values.npm_host_usage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Obs_pipeline_bytes_percentage OUT, 'usage[i].values.obs_pipeline_bytes_percentage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Obs_pipeline_bytes_usage OUT, 'usage[i].values.obs_pipeline_bytes_usage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Profiled_container_percentage OUT, 'usage[i].values.profiled_container_percentage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Profiled_container_usage OUT, 'usage[i].values.profiled_container_usage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Profiled_fargate_percentage OUT, 'usage[i].values.profiled_fargate_percentage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Profiled_fargate_usage OUT, 'usage[i].values.profiled_fargate_usage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Profiled_host_percentage OUT, 'usage[i].values.profiled_host_percentage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Profiled_host_usage OUT, 'usage[i].values.profiled_host_usage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Sds_scanned_bytes_percentage OUT, 'usage[i].values.sds_scanned_bytes_percentage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Sds_scanned_bytes_usage OUT, 'usage[i].values.sds_scanned_bytes_usage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Snmp_percentage OUT, 'usage[i].values.snmp_percentage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Snmp_usage OUT, 'usage[i].values.snmp_usage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Universal_service_monitoring_percentage OUT, 'usage[i].values.universal_service_monitoring_percentage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Universal_service_monitoring_usage OUT, 'usage[i].values.universal_service_monitoring_usage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Vuln_management_hosts_percentage OUT, 'usage[i].values.vuln_management_hosts_percentage'
        EXEC sp_OAMethod @jResp, 'StringOf', @Vuln_management_hosts_usage OUT, 'usage[i].values.vuln_management_hosts_usage'
        SELECT @j = 0
        EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'usage[i].tags.dolore62'
        WHILE @j < @count_j
          BEGIN
            EXEC sp_OASetProperty @jResp, 'J', @j
            EXEC sp_OAMethod @jResp, 'StringOf', @strVal OUT, 'usage[i].tags.dolore62[j]'
            SELECT @j = @j + 1
          END
        SELECT @j = 0
        EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'usage[i].tags.elit276'
        WHILE @j < @count_j
          BEGIN
            EXEC sp_OASetProperty @jResp, 'J', @j
            EXEC sp_OAMethod @jResp, 'StringOf', @strVal OUT, 'usage[i].tags.elit276[j]'
            SELECT @j = @j + 1
          END
        SELECT @j = 0
        EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'usage[i].tags.minim63'
        WHILE @j < @count_j
          BEGIN
            EXEC sp_OASetProperty @jResp, 'J', @j
            EXEC sp_OAMethod @jResp, 'StringOf', @strVal OUT, 'usage[i].tags.minim63[j]'
            SELECT @j = @j + 1
          END
        SELECT @j = 0
        EXEC sp_OAMethod @jResp, 'SizeOfArray', @count_j OUT, 'usage[i].tags.pariatur_d4'
        WHILE @j < @count_j
          BEGIN
            EXEC sp_OASetProperty @jResp, 'J', @j
            EXEC sp_OAMethod @jResp, 'StringOf', @strVal OUT, 'usage[i].tags.pariatur_d4[j]'
            SELECT @j = @j + 1
          END
        SELECT @i = @i + 1
      END

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


END
GO

Curl Command

curl -G -d "start_month=1991-02-02T07%3A22%3A34.204Z"
	-d "end_month=1991-02-02T07%3A22%3A34.204Z"
	-d "fields=dbm_queries_usage"
	-d "sort_direction=desc"
	-d "sort_name=dbm_queries_usage"
	-d "tag_breakdown_keys=tempor%20Ut%20sed%20velit"
	-d "next_record_id=tempor%20Ut%20sed%20velit"
	-d "include_descendants=true"
	-H "Accept: application/json;datetime-format=rfc3339"
https://api.app.ddog-gov.com/api/v1/usage/monthly-attribution

Postman Collection Item JSON

{
  "name": "Get monthly usage attribution",
  "request": {
    "method": "GET",
    "header": [
      {
        "key": "Accept",
        "value": "application/json;datetime-format=rfc3339"
      }
    ],
    "url": {
      "raw": "{{baseUrl}}/api/v1/usage/monthly-attribution?start_month=1991-02-02T07:22:34.204Z&end_month=1991-02-02T07:22:34.204Z&fields=dbm_queries_usage&sort_direction=desc&sort_name=dbm_queries_usage&tag_breakdown_keys=tempor Ut sed velit&next_record_id=tempor Ut sed velit&include_descendants=true",
      "host": [
        "{{baseUrl}}"
      ],
      "path": [
        "api",
        "v1",
        "usage",
        "monthly-attribution"
      ],
      "query": [
        {
          "key": "start_month",
          "value": "1991-02-02T07:22:34.204Z",
          "description": "(Required) Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for usage beginning in this month.\nMaximum of 15 months ago."
        },
        {
          "key": "end_month",
          "value": "1991-02-02T07:22:34.204Z",
          "description": "Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for usage ending this month."
        },
        {
          "key": "fields",
          "value": "dbm_queries_usage",
          "description": "(Required) Comma-separated list of usage types to return, or `*` for all usage types."
        },
        {
          "key": "sort_direction",
          "value": "desc",
          "description": "The direction to sort by: `[desc, asc]`."
        },
        {
          "key": "sort_name",
          "value": "dbm_queries_usage",
          "description": "The field to sort by."
        },
        {
          "key": "tag_breakdown_keys",
          "value": "tempor Ut sed velit",
          "description": "Comma separated list of tag keys used to group usage. If no value is provided the usage will not be broken down by tags.\n\nTo see which tags are available, look for the value of `tag_config_source` in the API response."
        },
        {
          "key": "next_record_id",
          "value": "tempor Ut sed velit",
          "description": "List following results with a next_record_id provided in the previous query."
        },
        {
          "key": "include_descendants",
          "value": "true",
          "description": "Include child org usage in the response. Defaults to `true`."
        }
      ]
    },
    "description": "Get monthly usage attribution. Multi-region data is available starting March 1, 2023.\n\nThis API endpoint is paginated. To make sure you receive all records, check if the value of `next_record_id` is\nset in the response. If it is, make another request and pass `next_record_id` as a parameter.\nPseudo code example:\n\n```\nresponse := GetMonthlyUsageAttribution(start_month)\ncursor := response.metadata.pagination.next_record_id\nWHILE cursor != null BEGIN\n  sleep(5 seconds)  # Avoid running into rate limit\n  response := GetMonthlyUsageAttribution(start_month, next_record_id=cursor)\n  cursor := response.metadata.pagination.next_record_id\nEND\n```"
  },
  "response": [
    {
      "name": "OK",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json;datetime-format=rfc3339"
          },
          {
            "description": "Added as a part of security scheme: apikey",
            "key": "DD-API-KEY",
            "value": "<API Key>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/v1/usage/monthly-attribution?start_month=1991-02-02T07:22:34.204Z&end_month=1991-02-02T07:22:34.204Z&fields=dbm_queries_usage&sort_direction=desc&sort_name=dbm_queries_usage&tag_breakdown_keys=tempor Ut sed velit&next_record_id=tempor Ut sed velit&include_descendants=true",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "usage",
            "monthly-attribution"
          ],
          "query": [
            {
              "key": "start_month",
              "value": "1991-02-02T07:22:34.204Z",
              "description": "(Required) Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for usage beginning in this month.\nMaximum of 15 months ago."
            },
            {
              "key": "end_month",
              "value": "1991-02-02T07:22:34.204Z",
              "description": "Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for usage ending this month."
            },
            {
              "key": "fields",
              "value": "dbm_queries_usage",
              "description": "(Required) Comma-separated list of usage types to return, or `*` for all usage types."
            },
            {
              "key": "sort_direction",
              "value": "desc",
              "description": "The direction to sort by: `[desc, asc]`."
            },
            {
              "key": "sort_name",
              "value": "dbm_queries_usage",
              "description": "The field to sort by."
            },
            {
              "key": "tag_breakdown_keys",
              "value": "tempor Ut sed velit",
              "description": "Comma separated list of tag keys used to group usage. If no value is provided the usage will not be broken down by tags.\n\nTo see which tags are available, look for the value of `tag_config_source` in the API response."
            },
            {
              "key": "next_record_id",
              "value": "tempor Ut sed velit",
              "description": "List following results with a next_record_id provided in the previous query."
            },
            {
              "key": "include_descendants",
              "value": "true",
              "description": "Include child org usage in the response. Defaults to `true`."
            }
          ]
        }
      },
      "status": "OK",
      "code": 200,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json;datetime-format=rfc3339"
        }
      ],
      "cookie": [
      ],
      "body": "{\n  \"metadata\": {\n    \"aggregates\": [\n      {\n        \"agg_type\": \"sum\",\n        \"field\": \"custom_timeseries_usage\",\n        \"value\": -75872274.11279911\n      },\n      {\n        \"agg_type\": \"sum\",\n        \"field\": \"custom_timeseries_usage\",\n        \"value\": 62426608.270860344\n      }\n    ],\n    \"pagination\": {\n      \"next_record_id\": \"in velit esse\"\n    }\n  },\n  \"usage\": [\n    {\n      \"month\": \"2002-08-13T15:07:13.466Z\",\n      \"org_name\": \"elit reprehenderit\",\n      \"public_id\": \"minim ipsum anim \",\n      \"region\": \"eu incididunt sint ut\",\n      \"tag_config_source\": \"irure laboris culpa\",\n      \"tags\": {\n        \"dolore62\": [\n          \"datadog-integrations-lab\",\n          \"datadog-integrations-lab\"\n        ]\n      },\n      \"updated_at\": \"2006-01-20T21:37:20.788Z\",\n      \"values\": {\n        \"api_percentage\": -42977723.76246902,\n        \"api_usage\": 95397982.7763887,\n        \"apm_fargate_percentage\": 98784807.55202839,\n        \"apm_fargate_usage\": -5570111.678832486,\n        \"apm_host_percentage\": -56965575.051769115,\n        \"apm_host_usage\": 6024527.554351345,\n        \"apm_usm_percentage\": -44347230.916792005,\n        \"apm_usm_usage\": -53614973.50940212,\n        \"appsec_fargate_percentage\": -63949646.084028535,\n        \"appsec_fargate_usage\": -13950059.836552203,\n        \"appsec_percentage\": 77503688.59718463,\n        \"appsec_usage\": -2749536.490563825,\n        \"browser_percentage\": -57610165.63884018,\n        \"browser_usage\": -61629554.27924777,\n        \"ci_visibility_itr_percentage\": 9801397.272425354,\n        \"ci_visibility_itr_usage\": 86901082.07052395,\n        \"container_excl_agent_percentage\": -94758211.3791813,\n        \"container_excl_agent_usage\": 47871386.536788315,\n        \"container_percentage\": 77684191.36010852,\n        \"container_usage\": 42244878.990811646,\n        \"cspm_containers_percentage\": -27358203.524139896,\n        \"cspm_containers_usage\": 7194834.822350323,\n        \"cspm_hosts_percentage\": -58400939.80376841,\n        \"cspm_hosts_usage\": -13088798.55443798,\n        \"custom_ingested_timeseries_percentage\": 25418473.141955733,\n        \"custom_ingested_timeseries_usage\": -6930274.896374792,\n        \"custom_timeseries_percentage\": 57087072.053094536,\n        \"custom_timeseries_usage\": -96533528.35676041,\n        \"cws_containers_percentage\": 38802199.2161935,\n        \"cws_containers_usage\": -48037945.78847249,\n        \"cws_hosts_percentage\": -38139753.73665444,\n        \"cws_hosts_usage\": 99175833.09167394,\n        \"dbm_hosts_percentage\": -89557128.20902187,\n        \"dbm_hosts_usage\": -2062788.2317033857,\n        \"dbm_queries_percentage\": -81088882.42935035,\n        \"dbm_queries_usage\": 1723401.8763353676,\n        \"estimated_indexed_logs_percentage\": 19494055.047132045,\n        \"estimated_indexed_logs_usage\": 10830691.252756879,\n        \"estimated_indexed_spans_percentage\": 62593562.02511239,\n        \"estimated_indexed_spans_usage\": -47185922.657971926,\n        \"estimated_ingested_logs_percentage\": 87624062.51598707,\n        \"estimated_ingested_logs_usage\": -35910323.49944707,\n        \"estimated_ingested_spans_percentage\": -26620688.87925279,\n        \"estimated_ingested_spans_usage\": -55965088.442498125,\n        \"estimated_rum_sessions_percentage\": -89351036.0053822,\n        \"estimated_rum_sessions_usage\": 69102190.52327245,\n        \"fargate_percentage\": 31062755.564841017,\n        \"fargate_usage\": 47033739.82451412,\n        \"functions_percentage\": 53367355.86064315,\n        \"functions_usage\": 11045136.755249456,\n        \"infra_host_percentage\": -54626318.30325018,\n        \"infra_host_usage\": 5481953.102816388,\n        \"invocations_percentage\": 27641232.88982962,\n        \"invocations_usage\": -23217061.12940158,\n        \"npm_host_percentage\": -70428889.89530578,\n        \"npm_host_usage\": 75035524.55544943,\n        \"obs_pipeline_bytes_percentage\": 95030078.61571154,\n        \"obs_pipeline_bytes_usage\": 16308063.424261168,\n        \"profiled_container_percentage\": -47294745.9171313,\n        \"profiled_container_usage\": 91333575.12025896,\n        \"profiled_fargate_percentage\": 1159081.2940575331,\n        \"profiled_fargate_usage\": 46737078.93751609,\n        \"profiled_host_percentage\": -16133546.561951116,\n        \"profiled_host_usage\": -55598728.99167555,\n        \"sds_scanned_bytes_percentage\": 41324136.36835453,\n        \"sds_scanned_bytes_usage\": 56766327.929751456,\n        \"snmp_percentage\": -88823427.70029327,\n        \"snmp_usage\": 32225665.615818232,\n        \"universal_service_monitoring_percentage\": -79287423.3883524,\n        \"universal_service_monitoring_usage\": -2355924.928932488,\n        \"vuln_management_hosts_percentage\": -16935520.54186198,\n        \"vuln_management_hosts_usage\": 74036018.8908129\n      }\n    },\n    {\n      \"month\": \"1959-07-18T20:29:56.664Z\",\n      \"org_name\": \"aliquip magna dolor\",\n      \"public_id\": \"et iru\",\n      \"region\": \"ut est esse ex\",\n      \"tag_config_source\": \"sint\",\n      \"tags\": {\n        \"elit276\": [\n          \"datadog-integrations-lab\",\n          \"datadog-integrations-lab\"\n        ],\n        \"minim63\": [\n          \"datadog-integrations-lab\",\n          \"datadog-integrations-lab\"\n        ],\n        \"pariatur_d4\": [\n          \"datadog-integrations-lab\",\n          \"datadog-integrations-lab\"\n        ]\n      },\n      \"updated_at\": \"1950-10-12T07:16:52.126Z\",\n      \"values\": {\n        \"api_percentage\": -67093975.89355124,\n        \"api_usage\": 22892492.134701967,\n        \"apm_fargate_percentage\": 86445539.6960246,\n        \"apm_fargate_usage\": 96626296.86785325,\n        \"apm_host_percentage\": -17829260.52661082,\n        \"apm_host_usage\": 99024863.04694226,\n        \"apm_usm_percentage\": 15052506.96019815,\n        \"apm_usm_usage\": -51446462.70068289,\n        \"appsec_fargate_percentage\": -59920029.75633368,\n        \"appsec_fargate_usage\": -12417338.286942497,\n        \"appsec_percentage\": 33591696.66073081,\n        \"appsec_usage\": 25137188.487309366,\n        \"browser_percentage\": 97940358.7215335,\n        \"browser_usage\": -52673885.905316986,\n        \"ci_visibility_itr_percentage\": -88219975.69687605,\n        \"ci_visibility_itr_usage\": -9447846.575050354,\n        \"container_excl_agent_percentage\": -46735760.53814248,\n        \"container_excl_agent_usage\": -73167643.29069096,\n        \"container_percentage\": 69642254.33344507,\n        \"container_usage\": 41091259.60962516,\n        \"cspm_containers_percentage\": 42210153.5692417,\n        \"cspm_containers_usage\": 75649568.34254551,\n        \"cspm_hosts_percentage\": 32418249.39784172,\n        \"cspm_hosts_usage\": 69540549.39095044,\n        \"custom_ingested_timeseries_percentage\": -68775982.9429293,\n        \"custom_ingested_timeseries_usage\": 76963891.89494428,\n        \"custom_timeseries_percentage\": 60837059.719377786,\n        \"custom_timeseries_usage\": -18989551.834226012,\n        \"cws_containers_percentage\": -72647861.32948461,\n        \"cws_containers_usage\": 99339681.5271622,\n        \"cws_hosts_percentage\": -83440078.50328308,\n        \"cws_hosts_usage\": 14084142.169001937,\n        \"dbm_hosts_percentage\": 82967791.28126338,\n        \"dbm_hosts_usage\": 25758868.864204437,\n        \"dbm_queries_percentage\": -66889696.73566167,\n        \"dbm_queries_usage\": 82584001.9588587,\n        \"estimated_indexed_logs_percentage\": 18445591.7106888,\n        \"estimated_indexed_logs_usage\": 95113838.43812409,\n        \"estimated_indexed_spans_percentage\": -60446633.38281309,\n        \"estimated_indexed_spans_usage\": -35817307.54312336,\n        \"estimated_ingested_logs_percentage\": -78223744.53046979,\n        \"estimated_ingested_logs_usage\": -69451886.32509902,\n        \"estimated_ingested_spans_percentage\": 40809724.25659558,\n        \"estimated_ingested_spans_usage\": -8599266.75406441,\n        \"estimated_rum_sessions_percentage\": -50403382.65600939,\n        \"estimated_rum_sessions_usage\": -56068159.05777034,\n        \"fargate_percentage\": -58215167.93972128,\n        \"fargate_usage\": 66587355.106164634,\n        \"functions_percentage\": -47256769.918816224,\n        \"functions_usage\": 1210604.9136780202,\n        \"infra_host_percentage\": -15651911.45215477,\n        \"infra_host_usage\": 83986438.03159028,\n        \"invocations_percentage\": -72916419.47570357,\n        \"invocations_usage\": -99391776.91322954,\n        \"npm_host_percentage\": -26689735.74485798,\n        \"npm_host_usage\": -58545960.56280492,\n        \"obs_pipeline_bytes_percentage\": -18838497.449270487,\n        \"obs_pipeline_bytes_usage\": -15181917.208459169,\n        \"profiled_container_percentage\": -69415049.22818953,\n        \"profiled_container_usage\": -22422349.354449615,\n        \"profiled_fargate_percentage\": -88757833.10218939,\n        \"profiled_fargate_usage\": -48134372.15719563,\n        \"profiled_host_percentage\": -82357525.04911637,\n        \"profiled_host_usage\": 50907558.67759526,\n        \"sds_scanned_bytes_percentage\": -72420339.71282078,\n        \"sds_scanned_bytes_usage\": 54343122.17874324,\n        \"snmp_percentage\": -38192297.57339508,\n        \"snmp_usage\": 26362518.073974475,\n        \"universal_service_monitoring_percentage\": -97356790.37923175,\n        \"universal_service_monitoring_usage\": -42030474.203919254,\n        \"vuln_management_hosts_percentage\": -74076816.34914787,\n        \"vuln_management_hosts_usage\": -25114557.39136301\n      }\n    }\n  ]\n}"
    },
    {
      "name": "Forbidden - User is not authorized",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json;datetime-format=rfc3339"
          },
          {
            "description": "Added as a part of security scheme: apikey",
            "key": "DD-API-KEY",
            "value": "<API Key>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/v1/usage/monthly-attribution?start_month=1991-02-02T07:22:34.204Z&end_month=1991-02-02T07:22:34.204Z&fields=dbm_queries_usage&sort_direction=desc&sort_name=dbm_queries_usage&tag_breakdown_keys=tempor Ut sed velit&next_record_id=tempor Ut sed velit&include_descendants=true",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "usage",
            "monthly-attribution"
          ],
          "query": [
            {
              "key": "start_month",
              "value": "1991-02-02T07:22:34.204Z",
              "description": "(Required) Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for usage beginning in this month.\nMaximum of 15 months ago."
            },
            {
              "key": "end_month",
              "value": "1991-02-02T07:22:34.204Z",
              "description": "Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for usage ending this month."
            },
            {
              "key": "fields",
              "value": "dbm_queries_usage",
              "description": "(Required) Comma-separated list of usage types to return, or `*` for all usage types."
            },
            {
              "key": "sort_direction",
              "value": "desc",
              "description": "The direction to sort by: `[desc, asc]`."
            },
            {
              "key": "sort_name",
              "value": "dbm_queries_usage",
              "description": "The field to sort by."
            },
            {
              "key": "tag_breakdown_keys",
              "value": "tempor Ut sed velit",
              "description": "Comma separated list of tag keys used to group usage. If no value is provided the usage will not be broken down by tags.\n\nTo see which tags are available, look for the value of `tag_config_source` in the API response."
            },
            {
              "key": "next_record_id",
              "value": "tempor Ut sed velit",
              "description": "List following results with a next_record_id provided in the previous query."
            },
            {
              "key": "include_descendants",
              "value": "true",
              "description": "Include child org usage in the response. Defaults to `true`."
            }
          ]
        }
      },
      "status": "Forbidden",
      "code": 403,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json;datetime-format=rfc3339"
        }
      ],
      "cookie": [
      ],
      "body": "{\n  \"errors\": [\n    \"Bad Request\",\n    \"Bad Request\"\n  ]\n}"
    },
    {
      "name": "Too many requests",
      "originalRequest": {
        "method": "GET",
        "header": [
          {
            "key": "Accept",
            "value": "application/json;datetime-format=rfc3339"
          },
          {
            "description": "Added as a part of security scheme: apikey",
            "key": "DD-API-KEY",
            "value": "<API Key>"
          }
        ],
        "url": {
          "raw": "{{baseUrl}}/api/v1/usage/monthly-attribution?start_month=1991-02-02T07:22:34.204Z&end_month=1991-02-02T07:22:34.204Z&fields=dbm_queries_usage&sort_direction=desc&sort_name=dbm_queries_usage&tag_breakdown_keys=tempor Ut sed velit&next_record_id=tempor Ut sed velit&include_descendants=true",
          "host": [
            "{{baseUrl}}"
          ],
          "path": [
            "api",
            "v1",
            "usage",
            "monthly-attribution"
          ],
          "query": [
            {
              "key": "start_month",
              "value": "1991-02-02T07:22:34.204Z",
              "description": "(Required) Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for usage beginning in this month.\nMaximum of 15 months ago."
            },
            {
              "key": "end_month",
              "value": "1991-02-02T07:22:34.204Z",
              "description": "Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for usage ending this month."
            },
            {
              "key": "fields",
              "value": "dbm_queries_usage",
              "description": "(Required) Comma-separated list of usage types to return, or `*` for all usage types."
            },
            {
              "key": "sort_direction",
              "value": "desc",
              "description": "The direction to sort by: `[desc, asc]`."
            },
            {
              "key": "sort_name",
              "value": "dbm_queries_usage",
              "description": "The field to sort by."
            },
            {
              "key": "tag_breakdown_keys",
              "value": "tempor Ut sed velit",
              "description": "Comma separated list of tag keys used to group usage. If no value is provided the usage will not be broken down by tags.\n\nTo see which tags are available, look for the value of `tag_config_source` in the API response."
            },
            {
              "key": "next_record_id",
              "value": "tempor Ut sed velit",
              "description": "List following results with a next_record_id provided in the previous query."
            },
            {
              "key": "include_descendants",
              "value": "true",
              "description": "Include child org usage in the response. Defaults to `true`."
            }
          ]
        }
      },
      "status": "Too Many Requests",
      "code": 429,
      "_postman_previewlanguage": "json",
      "header": [
        {
          "key": "Content-Type",
          "value": "application/json;datetime-format=rfc3339"
        }
      ],
      "cookie": [
      ],
      "body": "{\n  \"errors\": [\n    \"Bad Request\",\n    \"Bad Request\"\n  ]\n}"
    }
  ]
}