Get monthly usage attribution

GET {{baseUrl}}/api/v1/usage/monthly-attribution?start_month=2007-08-06T13:18:56.043Z&end_month=2007-08-06T13:18:56.043Z&fields=ndm_netflow_percentage&sort_direction=desc&sort_name=ndm_netflow_percentage&tag_breakdown_keys=c&next_record_id=c&include_descendants=true

Get monthly usage attribution. Multi-region data is available starting March 1, 2023.

This API endpoint is paginated. To make sure you receive all records, check if the value of next_record_id is set in the response. If it is, make another request and pass next_record_id as a parameter. Pseudo code example:

response := GetMonthlyUsageAttribution(start_month)
cursor := response.metadata.pagination.next_record_id
WHILE cursor != null BEGIN
  sleep(5 seconds)  # Avoid running into rate limit
  response := GetMonthlyUsageAttribution(start_month, next_record_id=cursor)
  cursor := response.metadata.pagination.next_record_id
END

Request Params

KeyDatatypeRequiredDescription
start_monthstring(Required) Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for usage beginning in this month.
Maximum of 15 months ago.
end_monthstringDatetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for usage ending this month.
fieldsstring(Required) Comma-separated list of usage types to return, or * for all usage types.
sort_directionstringThe direction to sort by: [desc, asc].
sort_namestringThe field to sort by.
tag_breakdown_keysstringComma separated list of tag keys used to group usage. If no value is provided the usage will not be broken down by tags.

To see which tags are available, look for the value of tag_config_source in the API response. | | next_record_id | string | | List following results with a next_record_id provided in the previous query. | | include_descendants | boolean | | Include child org usage in the response. Defaults to true. |

HEADERS

KeyDatatypeRequiredDescription
Acceptstring

RESPONSES

status: OK

{"metadata":{"aggregates":[{"agg_type":"sum","field":"custom_timeseries_usage","value":71242529.81468987},{"agg_type":"sum","field":"custom_timeseries_usage","value":51755193.90723142}],"pagination":{"next_record_id":"tempor sed proident q"}},"usage":[{"month":"1976-10-20T22:30:51.496Z","org_name":"fugiat minim","public_id":"veniam qui aute Lorem in","region":"nostrud","tag_config_source":"est velit","tags":{"aliquac":["datadog-integrations-lab","datadog-integrations-lab"]},"updated_at":"1981-06-09T19:09:02.308Z","values":{"api_percentage":11957823.580336496,"api_usage":-84592979.15350397,"apm_fargate_percentage":81793396.1624068,"apm_fargate_usage":36026177.02638587,"apm_host_percentage":55944117.66331601,"apm_host_usage":-4975586.390013024,"apm_usm_percentage":35304885.470526546,"apm_usm_usage":11053832.574089691,"appsec_fargate_percentage":-91499037.96552023,"appsec_fargate_usage":63124902.09187639,"appsec_percentage":78741196.1901114,"appsec_usage":47005509.72099444,"browser_percentage":-2052835.7916999757,"browser_usage":-47210787.98694518,"ci_pipeline_indexed_spans_percentage":18617427.725141987,"ci_pipeline_indexed_spans_usage":26144512.02006522,"ci_test_indexed_spans_percentage":-36634000.28501265,"ci_test_indexed_spans_usage":-47108991.290454224,"ci_visibility_itr_percentage":-9546303.601837456,"ci_visibility_itr_usage":46729920.924844235,"cloud_siem_percentage":-96148017.20001261,"cloud_siem_usage":2393966.1743296087,"container_excl_agent_percentage":-60947298.32764459,"container_excl_agent_usage":-82546544.33610713,"container_percentage":51802130.473573446,"container_usage":-88306132.61929359,"cspm_containers_percentage":71030146.22771671,"cspm_containers_usage":-74021032.3426512,"cspm_hosts_percentage":18792772.83231038,"cspm_hosts_usage":-18322940.3059804,"custom_event_percentage":13990028.623559207,"custom_event_usage":66968416.687262446,"custom_ingested_timeseries_percentage":-36587609.9000253,"custom_ingested_timeseries_usage":41033155.897054374,"custom_timeseries_percentage":2729403.5657642484,"custom_timeseries_usage":20783813.686182246,"cws_containers_percentage":10431489.169643983,"cws_containers_usage":8191676.42115964,"cws_hosts_percentage":-60851267.76967127,"cws_hosts_usage":65706576.52973804,"dbm_hosts_percentage":36922407.54358408,"dbm_hosts_usage":87436363.694516,"dbm_queries_percentage":92878534.89083102,"dbm_queries_usage":14048812.64238505,"estimated_indexed_logs_percentage":50362423.95632887,"estimated_indexed_logs_usage":-35258645.40048982,"estimated_indexed_spans_percentage":-99651571.6780873,"estimated_indexed_spans_usage":59850237.483508825,"estimated_ingested_logs_percentage":-10381705.874586314,"estimated_ingested_logs_usage":-93033365.50366189,"estimated_ingested_spans_percentage":98658742.18761626,"estimated_ingested_spans_usage":-80672675.70587316,"estimated_rum_sessions_percentage":-77753502.27316715,"estimated_rum_sessions_usage":-38900443.595920645,"fargate_percentage":-1755873.6031816602,"fargate_usage":72667485.85920683,"functions_percentage":-31235815.18954958,"functions_usage":-89817176.4333823,"indexed_spans_percentage":-68867257.50090133,"indexed_spans_usage":95562981.64399034,"infra_host_percentage":60278404.567303,"infra_host_usage":-13973601.088861406,"ingested_logs_bytes_percentage":-14356514.118797928,"ingested_logs_bytes_usage":76786178.56975597,"ingested_spans_bytes_percentage":70028213.43697909,"ingested_spans_bytes_usage":21202342.76294197,"invocations_percentage":58132567.20407426,"invocations_usage":-42866408.78300907,"lambda_traced_invocations_percentage":96516116.52486771,"lambda_traced_invocations_usage":17375017.19805436,"logs_indexed_15day_percentage":-32938607.938607365,"logs_indexed_15day_usage":48319949.822898775,"logs_indexed_180day_percentage":-88813547.70560317,"logs_indexed_180day_usage":14124616.703813285,"logs_indexed_30day_percentage":-72062642.17438853,"logs_indexed_30day_usage":1259992.224593982,"logs_indexed_360day_percentage":14849824.806455597,"logs_indexed_360day_usage":17575750.73520656,"logs_indexed_3day_percentage":3385271.6827453375,"logs_indexed_3day_usage":-4214610.795177758,"logs_indexed_45day_percentage":6485270.348234236,"logs_indexed_45day_usage":47743588.74333337,"logs_indexed_60day_percentage":-90687145.57755904,"logs_indexed_60day_usage":-69355113.25985937,"logs_indexed_7day_percentage":-66956460.34632472,"logs_indexed_7day_usage":-40769756.59350444,"logs_indexed_90day_percentage":34882242.21127042,"logs_indexed_90day_usage":87118658.29942057,"logs_indexed_custom_retention_percentage":7585369.753952205,"logs_indexed_custom_retention_usage":-22515320.350083947,"mobile_app_testing_percentage":96199997.58295399,"mobile_app_testing_usage":-82621525.12825099,"ndm_netflow_percentage":97051679.13197494,"ndm_netflow_usage":-85824756.32840519,"npm_host_percentage":1372595.5762258172,"npm_host_usage":63744969.515297145,"obs_pipeline_bytes_percentage":-57882781.4786008,"obs_pipeline_bytes_usage":66997849.89758566,"profiled_container_percentage":-89404355.15715697,"profiled_container_usage":28864911.210166782,"profiled_fargate_percentage":83073804.13198522,"profiled_fargate_usage":60457736.61995262,"profiled_host_percentage":5669025.15993762,"profiled_host_usage":-42287357.583954096,"rum_browser_mobile_sessions_percentage":84258514.96632805,"rum_browser_mobile_sessions_usage":5815942.854423687,"rum_replay_sessions_percentage":21467818.113047436,"rum_replay_sessions_usage":75443385.65231362,"sds_scanned_bytes_percentage":42224614.92352861,"sds_scanned_bytes_usage":5077720.177868888,"serverless_apps_percentage":57863070.144592434,"serverless_apps_usage":-96450854.37811267,"siem_ingested_bytes_percentage":-74581952.41866826,"siem_ingested_bytes_usage":6057212.376611963,"snmp_percentage":49481780.31388965,"snmp_usage":-44086461.318243854,"universal_service_monitoring_percentage":44751973.799381435,"universal_service_monitoring_usage":88520108.2450788,"vuln_management_hosts_percentage":-6290626.825492084,"vuln_management_hosts_usage":50172152.780846566}},{"month":"1988-08-04T13:25:27.417Z","org_name":"et ut sed fugiat","public_id":"commodo culpa occaecat","region":"pariatur","tag_config_source":"incididunt","tags":{"deserunt_17":["datadog-integrations-lab","datadog-integrations-lab"]},"updated_at":"2011-08-02T09:11:18.054Z","values":{"api_percentage":-49802395.100360155,"api_usage":21057419.701575458,"apm_fargate_percentage":-40806835.002183385,"apm_fargate_usage":49098430.84822813,"apm_host_percentage":71824131.39510247,"apm_host_usage":-75769916.29219636,"apm_usm_percentage":61497984.42323896,"apm_usm_usage":-54485236.40888463,"appsec_fargate_percentage":-79496460.88615686,"appsec_fargate_usage":94887092.17307892,"appsec_percentage":-92636489.6686859,"appsec_usage":52261889.30206308,"browser_percentage":5328363.059110418,"browser_usage":43612771.87691721,"ci_pipeline_indexed_spans_percentage":-55177454.65728479,"ci_pipeline_indexed_spans_usage":-26776554.297194183,"ci_test_indexed_spans_percentage":10512544.264027342,"ci_test_indexed_spans_usage":-55618942.596862376,"ci_visibility_itr_percentage":-6892599.119654894,"ci_visibility_itr_usage":-26155203.462474436,"cloud_siem_percentage":77841531.79256892,"cloud_siem_usage":-31698679.344021752,"container_excl_agent_percentage":-32803892.257910132,"container_excl_agent_usage":92758084.74166226,"container_percentage":67216975.61253569,"container_usage":-92030464.01208068,"cspm_containers_percentage":-33520767.44484753,"cspm_containers_usage":65686437.38606918,"cspm_hosts_percentage":-1349491.5499271601,"cspm_hosts_usage":-38206460.07380168,"custom_event_percentage":83696132.9742997,"custom_event_usage":53210794.81787434,"custom_ingested_timeseries_percentage":65932229.98112035,"custom_ingested_timeseries_usage":69657359.38306281,"custom_timeseries_percentage":24620567.644042343,"custom_timeseries_usage":60643235.755209744,"cws_containers_percentage":59681038.08288908,"cws_containers_usage":5957358.161586419,"cws_hosts_percentage":-22893411.606188923,"cws_hosts_usage":-3364258.5195703357,"dbm_hosts_percentage":-91442389.01319368,"dbm_hosts_usage":-92218439.2880753,"dbm_queries_percentage":57874140.365196794,"dbm_queries_usage":82498778.59562632,"estimated_indexed_logs_percentage":-50526386.59564517,"estimated_indexed_logs_usage":1122933.1830856353,"estimated_indexed_spans_percentage":-30452288.99189137,"estimated_indexed_spans_usage":-76116554.63513047,"estimated_ingested_logs_percentage":68193007.3163144,"estimated_ingested_logs_usage":-636296.9122363031,"estimated_ingested_spans_percentage":-73690040.14220399,"estimated_ingested_spans_usage":-12177087.403171733,"estimated_rum_sessions_percentage":-18115916.91144137,"estimated_rum_sessions_usage":67035268.60193637,"fargate_percentage":96188360.32900092,"fargate_usage":52487963.4677324,"functions_percentage":-55194028.10768765,"functions_usage":67463761.4828566,"indexed_spans_percentage":83757370.76426885,"indexed_spans_usage":75034765.6058293,"infra_host_percentage":-78856457.2494419,"infra_host_usage":80574847.79142743,"ingested_logs_bytes_percentage":-14908360.14659807,"ingested_logs_bytes_usage":-559703.3441776335,"ingested_spans_bytes_percentage":-98258183.44290087,"ingested_spans_bytes_usage":-56032038.37838171,"invocations_percentage":-55619437.06584218,"invocations_usage":80767031.23749849,"lambda_traced_invocations_percentage":8104282.123271078,"lambda_traced_invocations_usage":87390138.93749797,"logs_indexed_15day_percentage":-12316901.117474407,"logs_indexed_15day_usage":-97465707.84381859,"logs_indexed_180day_percentage":19943859.95289445,"logs_indexed_180day_usage":77374577.24414557,"logs_indexed_30day_percentage":-82677440.896278,"logs_indexed_30day_usage":-63710485.06372943,"logs_indexed_360day_percentage":8231765.149754316,"logs_indexed_360day_usage":-33510176.32008744,"logs_indexed_3day_percentage":29236142.603718698,"logs_indexed_3day_usage":99822000.84076199,"logs_indexed_45day_percentage":-19648733.747100115,"logs_indexed_45day_usage":21066937.548989803,"logs_indexed_60day_percentage":26995220.05347003,"logs_indexed_60day_usage":6081352.159342051,"logs_indexed_7day_percentage":53115363.88040054,"logs_indexed_7day_usage":-60439109.47225264,"logs_indexed_90day_percentage":55060152.35144934,"logs_indexed_90day_usage":-29997717.95909743,"logs_indexed_custom_retention_percentage":-86288677.20501843,"logs_indexed_custom_retention_usage":98623770.51334232,"mobile_app_testing_percentage":29860944.376838103,"mobile_app_testing_usage":6251431.953074962,"ndm_netflow_percentage":-46248225.362575114,"ndm_netflow_usage":38449356.11000246,"npm_host_percentage":-47872698.420875624,"npm_host_usage":-66536713.689918384,"obs_pipeline_bytes_percentage":-32590385.505782664,"obs_pipeline_bytes_usage":27892248.274230048,"profiled_container_percentage":33071029.369900316,"profiled_container_usage":53473207.48379502,"profiled_fargate_percentage":20806362.296868965,"profiled_fargate_usage":-50250985.943639435,"profiled_host_percentage":52985566.96278882,"profiled_host_usage":51642693.68656242,"rum_browser_mobile_sessions_percentage":-58097966.392984815,"rum_browser_mobile_sessions_usage":77623213.81607702,"rum_replay_sessions_percentage":11712168.741727829,"rum_replay_sessions_usage":-49452755.635374546,"sds_scanned_bytes_percentage":42945087.82886228,"sds_scanned_bytes_usage":-97718363.82689911,"serverless_apps_percentage":-4985014.658355966,"serverless_apps_usage":-16681724.881611392,"siem_ingested_bytes_percentage":50589669.42279753,"siem_ingested_bytes_usage":15917980.738450587,"snmp_percentage":56680939.04065904,"snmp_usage":-11685169.0370332,"universal_service_monitoring_percentage":42017194.795036614,"universal_service_monitoring_usage":39446883.76248172,"vuln_management_hosts_percentage":59960700.84341997,"vuln_management_hosts_usage":54165748.8067106}}]}