Skip to content

Latest commit

 

History

History
2053 lines (1443 loc) · 90.2 KB

UsageMeteringApi.md

File metadata and controls

2053 lines (1443 loc) · 90.2 KB

datadog-api-client.v1.UsageMeteringApi

All URIs are relative to https://api.datadoghq.com

Method HTTP request Description
getDailyCustomReports GET /api/v1/daily_custom_reports Get the list of available daily custom reports
getIncidentManagement GET /api/v1/usage/incident-management Get hourly usage for incident management
getIngestedSpans GET /api/v1/usage/ingested-spans Get hourly usage for ingested spans
getMonthlyCustomReports GET /api/v1/monthly_custom_reports Get the list of available monthly custom reports
getSpecifiedDailyCustomReports GET /api/v1/daily_custom_reports/{report_id} Get specified daily custom reports
getSpecifiedMonthlyCustomReports GET /api/v1/monthly_custom_reports/{report_id} Get specified monthly custom reports
getUsageAnalyzedLogs GET /api/v1/usage/analyzed_logs Get hourly usage for analyzed logs
getUsageAttribution GET /api/v1/usage/attribution Get Usage Attribution
getUsageAuditLogs GET /api/v1/usage/audit_logs Get hourly usage for audit logs
getUsageBillableSummary GET /api/v1/usage/billable-summary Get billable usage across your account
getUsageCWS GET /api/v1/usage/cws Get hourly usage for Cloud Workload Security
getUsageCloudSecurityPostureManagement GET /api/v1/usage/cspm Get hourly usage for CSPM
getUsageDBM GET /api/v1/usage/dbm Get hourly usage for Database Monitoring
getUsageFargate GET /api/v1/usage/fargate Get hourly usage for Fargate
getUsageHosts GET /api/v1/usage/hosts Get hourly usage for hosts and containers
getUsageIndexedSpans GET /api/v1/usage/indexed-spans Get hourly usage for indexed spans
getUsageInternetOfThings GET /api/v1/usage/iot Get hourly usage for IoT
getUsageLambda GET /api/v1/usage/aws_lambda Get hourly usage for Lambda
getUsageLogs GET /api/v1/usage/logs Get hourly usage for Logs
getUsageLogsByIndex GET /api/v1/usage/logs_by_index Get hourly usage for Logs by Index
getUsageLogsByRetention GET /api/v1/usage/logs-by-retention Get hourly logs usage by retention
getUsageNetworkFlows GET /api/v1/usage/network_flows Get hourly usage for Network Flows
getUsageNetworkHosts GET /api/v1/usage/network_hosts Get hourly usage for Network Hosts
getUsageProfiling GET /api/v1/usage/profiling Get hourly usage for profiled hosts
getUsageRumSessions GET /api/v1/usage/rum_sessions Get hourly usage for RUM Sessions
getUsageSNMP GET /api/v1/usage/snmp Get hourly usage for SNMP devices
getUsageSummary GET /api/v1/usage/summary Get usage across your multi-org account
getUsageSynthetics GET /api/v1/usage/synthetics Get hourly usage for Synthetics Checks
getUsageSyntheticsAPI GET /api/v1/usage/synthetics_api Get hourly usage for Synthetics API Checks
getUsageSyntheticsBrowser GET /api/v1/usage/synthetics_browser Get hourly usage for Synthetics Browser Checks
getUsageTimeseries GET /api/v1/usage/timeseries Get hourly usage for custom metrics
getUsageTopAvgMetrics GET /api/v1/usage/top_avg_metrics Get all custom metrics by hourly average

getDailyCustomReports

UsageCustomReportsResponse getDailyCustomReports()

Get daily custom reports.

Example

import { v1 } from "@datadog/datadog-api-client";
import * as fs from "fs";

const configuration = v1.createConfiguration();
const apiInstance = new v1.UsageMeteringApi(configuration);

let params: v1.UsageMeteringApiGetDailyCustomReportsRequest = {
  // number | The number of files to return in the response. `[default=60]`. (optional)
  pageSize: 1,
  // number | The identifier of the first page to return. This parameter is used for the pagination feature `[default=0]`. (optional)
  pageNumber: 1,
  // UsageSortDirection | The direction to sort by: `[desc, asc]`. (optional)
  sortDir: "desc",
  // UsageSort | The field to sort by: `[computed_on, size, start_date, end_date]`. (optional)
  sort: "start_date",
};

apiInstance
  .getDailyCustomReports(params)
  .then((data: any) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));

Parameters

Name Type Description Notes
pageSize [number] The number of files to return in the response. `[default=60]`. (optional) defaults to undefined
pageNumber [number] The identifier of the first page to return. This parameter is used for the pagination feature `[default=0]`. (optional) defaults to undefined
sortDir UsageSortDirection The direction to sort by: `[desc, asc]`. (optional) defaults to undefined
sort UsageSort The field to sort by: `[computed_on, size, start_date, end_date]`. (optional) defaults to undefined

Return type

UsageCustomReportsResponse

Authorization

apiKeyAuth, appKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json;datetime-format=rfc3339

HTTP response details

Status code Description Response headers
200 OK -
403 Forbidden - User is not authorized -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getIncidentManagement

UsageIncidentManagementResponse getIncidentManagement()

Get hourly usage for incident management.

Example

import { v1 } from "@datadog/datadog-api-client";
import * as fs from "fs";

const configuration = v1.createConfiguration();
const apiInstance = new v1.UsageMeteringApi(configuration);

let params: v1.UsageMeteringApiGetIncidentManagementRequest = {
  // Date | Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour.
  startHr: new Date("1970-01-01T00:00:00.00Z"),
  // Date | Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending **before** this hour. (optional)
  endHr: new Date("1970-01-01T00:00:00.00Z"),
};

apiInstance
  .getIncidentManagement(params)
  .then((data: any) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));

Parameters

Name Type Description Notes
startHr [Date] Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. defaults to undefined
endHr [Date] Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending before this hour. (optional) defaults to undefined

Return type

UsageIncidentManagementResponse

Authorization

AuthZ, apiKeyAuth, appKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json;datetime-format=rfc3339

HTTP response details

Status code Description Response headers
200 OK -
400 Bad Request -
403 Forbidden - User is not authorized -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getIngestedSpans

UsageIngestedSpansResponse getIngestedSpans()

Get hourly usage for ingested spans.

Example

import { v1 } from "@datadog/datadog-api-client";
import * as fs from "fs";

const configuration = v1.createConfiguration();
const apiInstance = new v1.UsageMeteringApi(configuration);

let params: v1.UsageMeteringApiGetIngestedSpansRequest = {
  // Date | Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour.
  startHr: new Date("1970-01-01T00:00:00.00Z"),
  // Date | Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending **before** this hour. (optional)
  endHr: new Date("1970-01-01T00:00:00.00Z"),
};

apiInstance
  .getIngestedSpans(params)
  .then((data: any) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));

Parameters

Name Type Description Notes
startHr [Date] Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. defaults to undefined
endHr [Date] Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending before this hour. (optional) defaults to undefined

Return type

UsageIngestedSpansResponse

Authorization

AuthZ, apiKeyAuth, appKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json;datetime-format=rfc3339

HTTP response details

Status code Description Response headers
200 OK -
400 Bad Request -
403 Forbidden - User is not authorized -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getMonthlyCustomReports

UsageCustomReportsResponse getMonthlyCustomReports()

Get monthly custom reports.

Example

import { v1 } from "@datadog/datadog-api-client";
import * as fs from "fs";

const configuration = v1.createConfiguration();
const apiInstance = new v1.UsageMeteringApi(configuration);

let params: v1.UsageMeteringApiGetMonthlyCustomReportsRequest = {
  // number | The number of files to return in the response `[default=60].` (optional)
  pageSize: 1,
  // number | The identifier of the first page to return. This parameter is used for the pagination feature `[default=0]`. (optional)
  pageNumber: 1,
  // UsageSortDirection | The direction to sort by: `[desc, asc]`. (optional)
  sortDir: "desc",
  // UsageSort | The field to sort by: `[computed_on, size, start_date, end_date]`. (optional)
  sort: "start_date",
};

apiInstance
  .getMonthlyCustomReports(params)
  .then((data: any) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));

Parameters

Name Type Description Notes
pageSize [number] The number of files to return in the response `[default=60].` (optional) defaults to undefined
pageNumber [number] The identifier of the first page to return. This parameter is used for the pagination feature `[default=0]`. (optional) defaults to undefined
sortDir UsageSortDirection The direction to sort by: `[desc, asc]`. (optional) defaults to undefined
sort UsageSort The field to sort by: `[computed_on, size, start_date, end_date]`. (optional) defaults to undefined

Return type

UsageCustomReportsResponse

Authorization

apiKeyAuth, appKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json;datetime-format=rfc3339

HTTP response details

Status code Description Response headers
200 OK -
403 Forbidden - User is not authorized -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getSpecifiedDailyCustomReports

UsageSpecifiedCustomReportsResponse getSpecifiedDailyCustomReports()

Get specified daily custom reports.

Example

import { v1 } from "@datadog/datadog-api-client";
import * as fs from "fs";

const configuration = v1.createConfiguration();
const apiInstance = new v1.UsageMeteringApi(configuration);

let params: v1.UsageMeteringApiGetSpecifiedDailyCustomReportsRequest = {
  // string | Date of the report in the format `YYYY-MM-DD`.
  reportId: "report_id_example",
};

apiInstance
  .getSpecifiedDailyCustomReports(params)
  .then((data: any) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));

Parameters

Name Type Description Notes
reportId [string] Date of the report in the format `YYYY-MM-DD`. defaults to undefined

Return type

UsageSpecifiedCustomReportsResponse

Authorization

apiKeyAuth, appKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json;datetime-format=rfc3339

HTTP response details

Status code Description Response headers
200 OK -
403 Forbidden - User is not authorized -
404 Not Found -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getSpecifiedMonthlyCustomReports

UsageSpecifiedCustomReportsResponse getSpecifiedMonthlyCustomReports()

Get specified monthly custom reports.

Example

import { v1 } from "@datadog/datadog-api-client";
import * as fs from "fs";

const configuration = v1.createConfiguration();
const apiInstance = new v1.UsageMeteringApi(configuration);

let params: v1.UsageMeteringApiGetSpecifiedMonthlyCustomReportsRequest = {
  // string | Date of the report in the format `YYYY-MM-DD`.
  reportId: "report_id_example",
};

apiInstance
  .getSpecifiedMonthlyCustomReports(params)
  .then((data: any) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));

Parameters

Name Type Description Notes
reportId [string] Date of the report in the format `YYYY-MM-DD`. defaults to undefined

Return type

UsageSpecifiedCustomReportsResponse

Authorization

apiKeyAuth, appKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json;datetime-format=rfc3339

HTTP response details

Status code Description Response headers
200 OK -
400 Bad Request -
403 Forbidden - User is not authorized -
404 Not Found -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getUsageAnalyzedLogs

UsageAnalyzedLogsResponse getUsageAnalyzedLogs()

Get hourly usage for analyzed logs (Security Monitoring).

Example

import { v1 } from "@datadog/datadog-api-client";
import * as fs from "fs";

const configuration = v1.createConfiguration();
const apiInstance = new v1.UsageMeteringApi(configuration);

let params: v1.UsageMeteringApiGetUsageAnalyzedLogsRequest = {
  // Date | Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour.
  startHr: new Date("1970-01-01T00:00:00.00Z"),
  // Date | Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending **before** this hour. (optional)
  endHr: new Date("1970-01-01T00:00:00.00Z"),
};

apiInstance
  .getUsageAnalyzedLogs(params)
  .then((data: any) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));

Parameters

Name Type Description Notes
startHr [Date] Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. defaults to undefined
endHr [Date] Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending before this hour. (optional) defaults to undefined

Return type

UsageAnalyzedLogsResponse

Authorization

AuthZ, apiKeyAuth, appKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json;datetime-format=rfc3339

HTTP response details

Status code Description Response headers
200 OK -
400 Bad Request -
403 Forbidden - User is not authorized -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getUsageAttribution

UsageAttributionResponse getUsageAttribution()

Get Usage Attribution.

Example

import { v1 } from "@datadog/datadog-api-client";
import * as fs from "fs";

const configuration = v1.createConfiguration();
const apiInstance = new v1.UsageMeteringApi(configuration);

let params: v1.UsageMeteringApiGetUsageAttributionRequest = {
  // Date | Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for usage beginning in this month. Maximum of 15 months ago.
  startMonth: new Date("1970-01-01T00:00:00.00Z"),
  // UsageAttributionSupportedMetrics | Comma-separated list of usage types to return, or `*` for all usage types.
  fields: "custom_timeseries_usage",
  // Date | Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for usage ending this month. (optional)
  endMonth: new Date("1970-01-01T00:00:00.00Z"),
  // UsageSortDirection | The direction to sort by: `[desc, asc]`. (optional)
  sortDirection: "desc",
  // UsageAttributionSort | The field to sort by. (optional)
  sortName: "custom_timeseries_usage",
  // boolean | Include child org usage in the response. Defaults to false. (optional)
  includeDescendants: false,
};

apiInstance
  .getUsageAttribution(params)
  .then((data: any) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));

Parameters

Name Type Description Notes
startMonth [Date] Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for usage beginning in this month. Maximum of 15 months ago. defaults to undefined
fields UsageAttributionSupportedMetrics Comma-separated list of usage types to return, or `*` for all usage types. defaults to undefined
endMonth [Date] Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for usage ending this month. (optional) defaults to undefined
sortDirection UsageSortDirection The direction to sort by: `[desc, asc]`. (optional) defaults to undefined
sortName UsageAttributionSort The field to sort by. (optional) defaults to undefined
includeDescendants [boolean] Include child org usage in the response. Defaults to false. (optional) defaults to undefined

Return type

UsageAttributionResponse

Authorization

AuthZ, apiKeyAuth, appKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json;datetime-format=rfc3339

HTTP response details

Status code Description Response headers
200 OK -
403 Forbidden - User is not authorized -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getUsageAuditLogs

UsageAuditLogsResponse getUsageAuditLogs()

Get hourly usage for audit logs.

Example

import { v1 } from "@datadog/datadog-api-client";
import * as fs from "fs";

const configuration = v1.createConfiguration();
const apiInstance = new v1.UsageMeteringApi(configuration);

let params: v1.UsageMeteringApiGetUsageAuditLogsRequest = {
  // Date | Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour.
  startHr: new Date("1970-01-01T00:00:00.00Z"),
  // Date | Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending **before** this hour. (optional)
  endHr: new Date("1970-01-01T00:00:00.00Z"),
};

apiInstance
  .getUsageAuditLogs(params)
  .then((data: any) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));

Parameters

Name Type Description Notes
startHr [Date] Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. defaults to undefined
endHr [Date] Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending before this hour. (optional) defaults to undefined

Return type

UsageAuditLogsResponse

Authorization

apiKeyAuth, appKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json;datetime-format=rfc3339

HTTP response details

Status code Description Response headers
200 OK -
400 Bad Request -
403 Forbidden - User is not authorized -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getUsageBillableSummary

UsageBillableSummaryResponse getUsageBillableSummary()

Get billable usage across your account.

Example

import { v1 } from "@datadog/datadog-api-client";
import * as fs from "fs";

const configuration = v1.createConfiguration();
const apiInstance = new v1.UsageMeteringApi(configuration);

let params: v1.UsageMeteringApiGetUsageBillableSummaryRequest = {
  // Date | Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for usage starting this month. (optional)
  month: new Date("1970-01-01T00:00:00.00Z"),
};

apiInstance
  .getUsageBillableSummary(params)
  .then((data: any) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));

Parameters

Name Type Description Notes
month [Date] Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for usage starting this month. (optional) defaults to undefined

Return type

UsageBillableSummaryResponse

Authorization

AuthZ, apiKeyAuth, appKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json;datetime-format=rfc3339

HTTP response details

Status code Description Response headers
200 OK -
400 Bad Request -
403 Forbidden - User is not authorized -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getUsageCWS

UsageCWSResponse getUsageCWS()

Get hourly usage for Cloud Workload Security.

Example

import { v1 } from "@datadog/datadog-api-client";
import * as fs from "fs";

const configuration = v1.createConfiguration();
const apiInstance = new v1.UsageMeteringApi(configuration);

let params: v1.UsageMeteringApiGetUsageCWSRequest = {
  // Date | Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour.
  startHr: new Date("1970-01-01T00:00:00.00Z"),
  // Date | Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending **before** this hour. (optional)
  endHr: new Date("1970-01-01T00:00:00.00Z"),
};

apiInstance
  .getUsageCWS(params)
  .then((data: any) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));

Parameters

Name Type Description Notes
startHr [Date] Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. defaults to undefined
endHr [Date] Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending before this hour. (optional) defaults to undefined

Return type

UsageCWSResponse

Authorization

AuthZ, apiKeyAuth, appKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json;datetime-format=rfc3339

HTTP response details

Status code Description Response headers
200 OK -
400 Bad Request -
403 Forbidden - User is not authorized -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getUsageCloudSecurityPostureManagement

UsageCloudSecurityPostureManagementResponse getUsageCloudSecurityPostureManagement()

Get hourly usage for Cloud Security Posture Management (CSPM).

Example

import { v1 } from "@datadog/datadog-api-client";
import * as fs from "fs";

const configuration = v1.createConfiguration();
const apiInstance = new v1.UsageMeteringApi(configuration);

let params: v1.UsageMeteringApiGetUsageCloudSecurityPostureManagementRequest = {
  // Date | Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour.
  startHr: new Date("1970-01-01T00:00:00.00Z"),
  // Date | Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending **before** this hour. (optional)
  endHr: new Date("1970-01-01T00:00:00.00Z"),
};

apiInstance
  .getUsageCloudSecurityPostureManagement(params)
  .then((data: any) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));

Parameters

Name Type Description Notes
startHr [Date] Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. defaults to undefined
endHr [Date] Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending before this hour. (optional) defaults to undefined

Return type

UsageCloudSecurityPostureManagementResponse

Authorization

apiKeyAuth, appKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json;datetime-format=rfc3339

HTTP response details

Status code Description Response headers
200 OK -
400 Bad Request -
403 Forbidden - User is not authorized -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getUsageDBM

UsageDBMResponse getUsageDBM()

Get hourly usage for Database Monitoring

Example

import { v1 } from "@datadog/datadog-api-client";
import * as fs from "fs";

const configuration = v1.createConfiguration();
const apiInstance = new v1.UsageMeteringApi(configuration);

let params: v1.UsageMeteringApiGetUsageDBMRequest = {
  // Date | Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour.
  startHr: new Date("1970-01-01T00:00:00.00Z"),
  // Date | Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending **before** this hour. (optional)
  endHr: new Date("1970-01-01T00:00:00.00Z"),
};

apiInstance
  .getUsageDBM(params)
  .then((data: any) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));

Parameters

Name Type Description Notes
startHr [Date] Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. defaults to undefined
endHr [Date] Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending before this hour. (optional) defaults to undefined

Return type

UsageDBMResponse

Authorization

apiKeyAuth, appKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json;datetime-format=rfc3339

HTTP response details

Status code Description Response headers
200 OK -
400 Bad Request -
403 Forbidden - User is not authorized -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getUsageFargate

UsageFargateResponse getUsageFargate()

Get hourly usage for Fargate.

Example

import { v1 } from "@datadog/datadog-api-client";
import * as fs from "fs";

const configuration = v1.createConfiguration();
const apiInstance = new v1.UsageMeteringApi(configuration);

let params: v1.UsageMeteringApiGetUsageFargateRequest = {
  // Date | Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour.
  startHr: new Date("1970-01-01T00:00:00.00Z"),
  // Date | Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour. (optional)
  endHr: new Date("1970-01-01T00:00:00.00Z"),
};

apiInstance
  .getUsageFargate(params)
  .then((data: any) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));

Parameters

Name Type Description Notes
startHr [Date] Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. defaults to undefined
endHr [Date] Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending before this hour. (optional) defaults to undefined

Return type

UsageFargateResponse

Authorization

AuthZ, apiKeyAuth, appKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json;datetime-format=rfc3339

HTTP response details

Status code Description Response headers
200 OK -
400 Bad Request -
403 Forbidden - User is not authorized -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getUsageHosts

UsageHostsResponse getUsageHosts()

Get hourly usage for hosts and containers.

Example

import { v1 } from "@datadog/datadog-api-client";
import * as fs from "fs";

const configuration = v1.createConfiguration();
const apiInstance = new v1.UsageMeteringApi(configuration);

let params: v1.UsageMeteringApiGetUsageHostsRequest = {
  // Date | Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour.
  startHr: new Date("1970-01-01T00:00:00.00Z"),
  // Date | Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour. (optional)
  endHr: new Date("1970-01-01T00:00:00.00Z"),
};

apiInstance
  .getUsageHosts(params)
  .then((data: any) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));

Parameters

Name Type Description Notes
startHr [Date] Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. defaults to undefined
endHr [Date] Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending before this hour. (optional) defaults to undefined

Return type

UsageHostsResponse

Authorization

AuthZ, apiKeyAuth, appKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json;datetime-format=rfc3339

HTTP response details

Status code Description Response headers
200 OK -
400 Bad Request -
403 Forbidden - User is not authorized -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getUsageIndexedSpans

UsageIndexedSpansResponse getUsageIndexedSpans()

Get hourly usage for indexed spans.

Example

import { v1 } from "@datadog/datadog-api-client";
import * as fs from "fs";

const configuration = v1.createConfiguration();
const apiInstance = new v1.UsageMeteringApi(configuration);

let params: v1.UsageMeteringApiGetUsageIndexedSpansRequest = {
  // Date | Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour.
  startHr: new Date("1970-01-01T00:00:00.00Z"),
  // Date | Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending **before** this hour. (optional)
  endHr: new Date("1970-01-01T00:00:00.00Z"),
};

apiInstance
  .getUsageIndexedSpans(params)
  .then((data: any) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));

Parameters

Name Type Description Notes
startHr [Date] Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. defaults to undefined
endHr [Date] Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending before this hour. (optional) defaults to undefined

Return type

UsageIndexedSpansResponse

Authorization

AuthZ, apiKeyAuth, appKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json;datetime-format=rfc3339

HTTP response details

Status code Description Response headers
200 OK -
400 Bad Request -
403 Forbidden - User is not authorized -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getUsageInternetOfThings

UsageIoTResponse getUsageInternetOfThings()

Get hourly usage for IoT.

Example

import { v1 } from "@datadog/datadog-api-client";
import * as fs from "fs";

const configuration = v1.createConfiguration();
const apiInstance = new v1.UsageMeteringApi(configuration);

let params: v1.UsageMeteringApiGetUsageInternetOfThingsRequest = {
  // Date | Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour.
  startHr: new Date("1970-01-01T00:00:00.00Z"),
  // Date | Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending **before** this hour. (optional)
  endHr: new Date("1970-01-01T00:00:00.00Z"),
};

apiInstance
  .getUsageInternetOfThings(params)
  .then((data: any) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));

Parameters

Name Type Description Notes
startHr [Date] Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. defaults to undefined
endHr [Date] Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending before this hour. (optional) defaults to undefined

Return type

UsageIoTResponse

Authorization

AuthZ, apiKeyAuth, appKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json;datetime-format=rfc3339

HTTP response details

Status code Description Response headers
200 OK -
400 Bad Request -
403 Forbidden - User is not authorized -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getUsageLambda

UsageLambdaResponse getUsageLambda()

Get hourly usage for lambda.

Example

import { v1 } from "@datadog/datadog-api-client";
import * as fs from "fs";

const configuration = v1.createConfiguration();
const apiInstance = new v1.UsageMeteringApi(configuration);

let params: v1.UsageMeteringApiGetUsageLambdaRequest = {
  // Date | Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour.
  startHr: new Date("1970-01-01T00:00:00.00Z"),
  // Date | Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour. (optional)
  endHr: new Date("1970-01-01T00:00:00.00Z"),
};

apiInstance
  .getUsageLambda(params)
  .then((data: any) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));

Parameters

Name Type Description Notes
startHr [Date] Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. defaults to undefined
endHr [Date] Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending before this hour. (optional) defaults to undefined

Return type

UsageLambdaResponse

Authorization

AuthZ, apiKeyAuth, appKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json;datetime-format=rfc3339

HTTP response details

Status code Description Response headers
200 OK -
400 Bad Request -
403 Forbidden - User is not authorized -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getUsageLogs

UsageLogsResponse getUsageLogs()

Get hourly usage for logs.

Example

import { v1 } from "@datadog/datadog-api-client";
import * as fs from "fs";

const configuration = v1.createConfiguration();
const apiInstance = new v1.UsageMeteringApi(configuration);

let params: v1.UsageMeteringApiGetUsageLogsRequest = {
  // Date | Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour.
  startHr: new Date("1970-01-01T00:00:00.00Z"),
  // Date | Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour. (optional)
  endHr: new Date("1970-01-01T00:00:00.00Z"),
};

apiInstance
  .getUsageLogs(params)
  .then((data: any) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));

Parameters

Name Type Description Notes
startHr [Date] Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. defaults to undefined
endHr [Date] Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending before this hour. (optional) defaults to undefined

Return type

UsageLogsResponse

Authorization

AuthZ, apiKeyAuth, appKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json;datetime-format=rfc3339

HTTP response details

Status code Description Response headers
200 OK -
400 Bad Request -
403 Forbidden - User is not authorized -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getUsageLogsByIndex

UsageLogsByIndexResponse getUsageLogsByIndex()

Get hourly usage for logs by index.

Example

import { v1 } from "@datadog/datadog-api-client";
import * as fs from "fs";

const configuration = v1.createConfiguration();
const apiInstance = new v1.UsageMeteringApi(configuration);

let params: v1.UsageMeteringApiGetUsageLogsByIndexRequest = {
  // Date | Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour.
  startHr: new Date("1970-01-01T00:00:00.00Z"),
  // Date | Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour. (optional)
  endHr: new Date("1970-01-01T00:00:00.00Z"),
  // Array<string> | Comma-separated list of log index names. (optional)
  indexName: ["index_name_example"],
};

apiInstance
  .getUsageLogsByIndex(params)
  .then((data: any) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));

Parameters

Name Type Description Notes
startHr [Date] Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. defaults to undefined
endHr [Date] Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending before this hour. (optional) defaults to undefined
indexName Array<string> Comma-separated list of log index names. (optional) defaults to undefined

Return type

UsageLogsByIndexResponse

Authorization

AuthZ, apiKeyAuth, appKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json;datetime-format=rfc3339

HTTP response details

Status code Description Response headers
200 OK -
400 Bad Request -
403 Forbidden - User is not authorized -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getUsageLogsByRetention

UsageLogsByRetentionResponse getUsageLogsByRetention()

Get hourly usage for indexed logs by retention period.

Example

import { v1 } from "@datadog/datadog-api-client";
import * as fs from "fs";

const configuration = v1.createConfiguration();
const apiInstance = new v1.UsageMeteringApi(configuration);

let params: v1.UsageMeteringApiGetUsageLogsByRetentionRequest = {
  // Date | Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour.
  startHr: new Date("1970-01-01T00:00:00.00Z"),
  // Date | Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending **before** this hour. (optional)
  endHr: new Date("1970-01-01T00:00:00.00Z"),
};

apiInstance
  .getUsageLogsByRetention(params)
  .then((data: any) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));

Parameters

Name Type Description Notes
startHr [Date] Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. defaults to undefined
endHr [Date] Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending before this hour. (optional) defaults to undefined

Return type

UsageLogsByRetentionResponse

Authorization

apiKeyAuth, appKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json;datetime-format=rfc3339

HTTP response details

Status code Description Response headers
200 OK -
400 Bad Request -
403 Forbidden - User is not authorized -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getUsageNetworkFlows

UsageNetworkFlowsResponse getUsageNetworkFlows()

Get hourly usage for network flows.

Example

import { v1 } from "@datadog/datadog-api-client";
import * as fs from "fs";

const configuration = v1.createConfiguration();
const apiInstance = new v1.UsageMeteringApi(configuration);

let params: v1.UsageMeteringApiGetUsageNetworkFlowsRequest = {
  // Date | Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour.
  startHr: new Date("1970-01-01T00:00:00.00Z"),
  // Date | Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending **before** this hour. (optional)
  endHr: new Date("1970-01-01T00:00:00.00Z"),
};

apiInstance
  .getUsageNetworkFlows(params)
  .then((data: any) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));

Parameters

Name Type Description Notes
startHr [Date] Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. defaults to undefined
endHr [Date] Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending before this hour. (optional) defaults to undefined

Return type

UsageNetworkFlowsResponse

Authorization

AuthZ, apiKeyAuth, appKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json;datetime-format=rfc3339

HTTP response details

Status code Description Response headers
200 OK -
400 Bad Request -
403 Forbidden - User is not authorized -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getUsageNetworkHosts

UsageNetworkHostsResponse getUsageNetworkHosts()

Get hourly usage for network hosts.

Example

import { v1 } from "@datadog/datadog-api-client";
import * as fs from "fs";

const configuration = v1.createConfiguration();
const apiInstance = new v1.UsageMeteringApi(configuration);

let params: v1.UsageMeteringApiGetUsageNetworkHostsRequest = {
  // Date | Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour.
  startHr: new Date("1970-01-01T00:00:00.00Z"),
  // Date | Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour. (optional)
  endHr: new Date("1970-01-01T00:00:00.00Z"),
};

apiInstance
  .getUsageNetworkHosts(params)
  .then((data: any) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));

Parameters

Name Type Description Notes
startHr [Date] Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. defaults to undefined
endHr [Date] Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending before this hour. (optional) defaults to undefined

Return type

UsageNetworkHostsResponse

Authorization

AuthZ, apiKeyAuth, appKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json;datetime-format=rfc3339

HTTP response details

Status code Description Response headers
200 OK -
400 Bad Request -
403 Forbidden - User is not authorized -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getUsageProfiling

UsageProfilingResponse getUsageProfiling()

Get hourly usage for profiled hosts.

Example

import { v1 } from "@datadog/datadog-api-client";
import * as fs from "fs";

const configuration = v1.createConfiguration();
const apiInstance = new v1.UsageMeteringApi(configuration);

let params: v1.UsageMeteringApiGetUsageProfilingRequest = {
  // Date | Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour.
  startHr: new Date("1970-01-01T00:00:00.00Z"),
  // Date | Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending **before** this hour. (optional)
  endHr: new Date("1970-01-01T00:00:00.00Z"),
};

apiInstance
  .getUsageProfiling(params)
  .then((data: any) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));

Parameters

Name Type Description Notes
startHr [Date] Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. defaults to undefined
endHr [Date] Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending before this hour. (optional) defaults to undefined

Return type

UsageProfilingResponse

Authorization

AuthZ, apiKeyAuth, appKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json;datetime-format=rfc3339

HTTP response details

Status code Description Response headers
200 OK -
400 Bad Request -
403 Forbidden - User is not authorized -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getUsageRumSessions

UsageRumSessionsResponse getUsageRumSessions()

Get hourly usage for RUM Sessions.

Example

import { v1 } from "@datadog/datadog-api-client";
import * as fs from "fs";

const configuration = v1.createConfiguration();
const apiInstance = new v1.UsageMeteringApi(configuration);

let params: v1.UsageMeteringApiGetUsageRumSessionsRequest = {
  // Date | Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour.
  startHr: new Date("1970-01-01T00:00:00.00Z"),
  // Date | Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour. (optional)
  endHr: new Date("1970-01-01T00:00:00.00Z"),
  // string | RUM type: `[browser, mobile]`. Defaults to `browser`. (optional)
  type: "type_example",
};

apiInstance
  .getUsageRumSessions(params)
  .then((data: any) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));

Parameters

Name Type Description Notes
startHr [Date] Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. defaults to undefined
endHr [Date] Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending before this hour. (optional) defaults to undefined
type [string] RUM type: `[browser, mobile]`. Defaults to `browser`. (optional) defaults to undefined

Return type

UsageRumSessionsResponse

Authorization

AuthZ, apiKeyAuth, appKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json;datetime-format=rfc3339

HTTP response details

Status code Description Response headers
200 OK -
400 Bad Request -
403 Forbidden - User is not authorized -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getUsageSNMP

UsageSNMPResponse getUsageSNMP()

Get hourly usage for SNMP devices.

Example

import { v1 } from "@datadog/datadog-api-client";
import * as fs from "fs";

const configuration = v1.createConfiguration();
const apiInstance = new v1.UsageMeteringApi(configuration);

let params: v1.UsageMeteringApiGetUsageSNMPRequest = {
  // Date | Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour.
  startHr: new Date("1970-01-01T00:00:00.00Z"),
  // Date | Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending **before** this hour. (optional)
  endHr: new Date("1970-01-01T00:00:00.00Z"),
};

apiInstance
  .getUsageSNMP(params)
  .then((data: any) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));

Parameters

Name Type Description Notes
startHr [Date] Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage beginning at this hour. defaults to undefined
endHr [Date] Datetime in ISO-8601 format, UTC, precise to hour: `[YYYY-MM-DDThh]` for usage ending before this hour. (optional) defaults to undefined

Return type

UsageSNMPResponse

Authorization

AuthZ, apiKeyAuth, appKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json;datetime-format=rfc3339

HTTP response details

Status code Description Response headers
200 OK -
400 Bad Request -
403 Forbidden - User is not authorized -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getUsageSummary

UsageSummaryResponse getUsageSummary()

Get usage across your multi-org account. You must have the multi-org feature enabled.

Example

import { v1 } from "@datadog/datadog-api-client";
import * as fs from "fs";

const configuration = v1.createConfiguration();
const apiInstance = new v1.UsageMeteringApi(configuration);

let params: v1.UsageMeteringApiGetUsageSummaryRequest = {
  // Date | Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for usage beginning in this month. Maximum of 15 months ago.
  startMonth: new Date("1970-01-01T00:00:00.00Z"),
  // Date | Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for usage ending this month. (optional)
  endMonth: new Date("1970-01-01T00:00:00.00Z"),
  // boolean | Include usage summaries for each sub-org. (optional)
  includeOrgDetails: true,
};

apiInstance
  .getUsageSummary(params)
  .then((data: any) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));

Parameters

Name Type Description Notes
startMonth [Date] Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for usage beginning in this month. Maximum of 15 months ago. defaults to undefined
endMonth [Date] Datetime in ISO-8601 format, UTC, precise to month: `[YYYY-MM]` for usage ending this month. (optional) defaults to undefined
includeOrgDetails [boolean] Include usage summaries for each sub-org. (optional) defaults to undefined

Return type

UsageSummaryResponse

Authorization

AuthZ, apiKeyAuth, appKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json;datetime-format=rfc3339

HTTP response details

Status code Description Response headers
200 OK -
400 Bad Request -
403 Forbidden - User is not authorized -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getUsageSynthetics

UsageSyntheticsResponse getUsageSynthetics()

Get hourly usage for Synthetics checks.

Example

import { v1 } from "@datadog/datadog-api-client";
import * as fs from "fs";

const configuration = v1.createConfiguration();
const apiInstance = new v1.UsageMeteringApi(configuration);

let params: v1.UsageMeteringApiGetUsageSyntheticsRequest = {
  // Date | Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour.
  startHr: new Date("1970-01-01T00:00:00.00Z"),
  // Date | Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour. (optional)
  endHr: new Date("1970-01-01T00:00:00.00Z"),
};

apiInstance
  .getUsageSynthetics(params)
  .then((data: any) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));

Parameters

Name Type Description Notes
startHr [Date] Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. defaults to undefined
endHr [Date] Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending before this hour. (optional) defaults to undefined

Return type

UsageSyntheticsResponse

Authorization

AuthZ, apiKeyAuth, appKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json;datetime-format=rfc3339

HTTP response details

Status code Description Response headers
200 OK -
400 Bad Request -
403 Forbidden - User is not authorized -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getUsageSyntheticsAPI

UsageSyntheticsAPIResponse getUsageSyntheticsAPI()

Get hourly usage for synthetics API checks.

Example

import { v1 } from "@datadog/datadog-api-client";
import * as fs from "fs";

const configuration = v1.createConfiguration();
const apiInstance = new v1.UsageMeteringApi(configuration);

let params: v1.UsageMeteringApiGetUsageSyntheticsAPIRequest = {
  // Date | Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour.
  startHr: new Date("1970-01-01T00:00:00.00Z"),
  // Date | Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour. (optional)
  endHr: new Date("1970-01-01T00:00:00.00Z"),
};

apiInstance
  .getUsageSyntheticsAPI(params)
  .then((data: any) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));

Parameters

Name Type Description Notes
startHr [Date] Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. defaults to undefined
endHr [Date] Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending before this hour. (optional) defaults to undefined

Return type

UsageSyntheticsAPIResponse

Authorization

AuthZ, apiKeyAuth, appKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json;datetime-format=rfc3339

HTTP response details

Status code Description Response headers
200 OK -
400 Bad Request -
403 Forbidden - User is not authorized -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getUsageSyntheticsBrowser

UsageSyntheticsBrowserResponse getUsageSyntheticsBrowser()

Get hourly usage for synthetics browser checks.

Example

import { v1 } from "@datadog/datadog-api-client";
import * as fs from "fs";

const configuration = v1.createConfiguration();
const apiInstance = new v1.UsageMeteringApi(configuration);

let params: v1.UsageMeteringApiGetUsageSyntheticsBrowserRequest = {
  // Date | Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour.
  startHr: new Date("1970-01-01T00:00:00.00Z"),
  // Date | Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour. (optional)
  endHr: new Date("1970-01-01T00:00:00.00Z"),
};

apiInstance
  .getUsageSyntheticsBrowser(params)
  .then((data: any) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));

Parameters

Name Type Description Notes
startHr [Date] Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. defaults to undefined
endHr [Date] Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending before this hour. (optional) defaults to undefined

Return type

UsageSyntheticsBrowserResponse

Authorization

AuthZ, apiKeyAuth, appKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json;datetime-format=rfc3339

HTTP response details

Status code Description Response headers
200 OK -
400 Bad Request -
403 Forbidden - User is not authorized -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getUsageTimeseries

UsageTimeseriesResponse getUsageTimeseries()

Get hourly usage for custom metrics.

Example

import { v1 } from "@datadog/datadog-api-client";
import * as fs from "fs";

const configuration = v1.createConfiguration();
const apiInstance = new v1.UsageMeteringApi(configuration);

let params: v1.UsageMeteringApiGetUsageTimeseriesRequest = {
  // Date | Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour.
  startHr: new Date("1970-01-01T00:00:00.00Z"),
  // Date | Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending **before** this hour. (optional)
  endHr: new Date("1970-01-01T00:00:00.00Z"),
};

apiInstance
  .getUsageTimeseries(params)
  .then((data: any) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));

Parameters

Name Type Description Notes
startHr [Date] Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage beginning at this hour. defaults to undefined
endHr [Date] Datetime in ISO-8601 format, UTC, precise to hour: [YYYY-MM-DDThh] for usage ending before this hour. (optional) defaults to undefined

Return type

UsageTimeseriesResponse

Authorization

AuthZ, apiKeyAuth, appKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json;datetime-format=rfc3339

HTTP response details

Status code Description Response headers
200 OK -
400 Bad Request -
403 Forbidden - User is not authorized -

[Back to top] [Back to API list] [Back to Model list] [Back to README]

getUsageTopAvgMetrics

UsageTopAvgMetricsResponse getUsageTopAvgMetrics()

Get all custom metrics by hourly average. Use the month parameter to get a month-to-date data resolution or use the day parameter to get a daily resolution. One of the two is required, and only one of the two is allowed.

Example

import { v1 } from "@datadog/datadog-api-client";
import * as fs from "fs";

const configuration = v1.createConfiguration();
const apiInstance = new v1.UsageMeteringApi(configuration);

let params: v1.UsageMeteringApiGetUsageTopAvgMetricsRequest = {
  // Date | Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for usage beginning at this hour. (Either month or day should be specified, but not both) (optional)
  month: new Date("1970-01-01T00:00:00.00Z"),
  // Date | Datetime in ISO-8601 format, UTC, precise to day: [YYYY-MM-DD] for usage beginning at this hour. (Either month or day should be specified, but not both) (optional)
  day: new Date("1970-01-01T00:00:00.00Z"),
  // Array<string> | Comma-separated list of metric names. (optional)
  names: ["names_example"],
  // number | Maximum number of results to return (between 1 and 5000) - defaults to 500 results if limit not specified. (optional)
  limit: 500,
  // string | List following results with a next_record_id provided in the previous query. (optional)
  nextRecordId: "next_record_id_example",
};

apiInstance
  .getUsageTopAvgMetrics(params)
  .then((data: any) => {
    console.log(
      "API called successfully. Returned data: " + JSON.stringify(data)
    );
  })
  .catch((error: any) => console.error(error));

Parameters

Name Type Description Notes
month [Date] Datetime in ISO-8601 format, UTC, precise to month: [YYYY-MM] for usage beginning at this hour. (Either month or day should be specified, but not both) (optional) defaults to undefined
day [Date] Datetime in ISO-8601 format, UTC, precise to day: [YYYY-MM-DD] for usage beginning at this hour. (Either month or day should be specified, but not both) (optional) defaults to undefined
names Array<string> Comma-separated list of metric names. (optional) defaults to undefined
limit [number] Maximum number of results to return (between 1 and 5000) - defaults to 500 results if limit not specified. (optional) defaults to 500
nextRecordId [string] List following results with a next_record_id provided in the previous query. (optional) defaults to undefined

Return type

UsageTopAvgMetricsResponse

Authorization

AuthZ, apiKeyAuth, appKeyAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json;datetime-format=rfc3339

HTTP response details

Status code Description Response headers
200 OK -
400 Bad Request -
403 Forbidden - User is not authorized -

[Back to top] [Back to API list] [Back to Model list] [Back to README]