diff --git a/.apigentools-info b/.apigentools-info index 07e4f0bcd3..f74e215c84 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.1", - "regenerated": "2022-01-27 16:02:03.387181", - "spec_repo_commit": "c738c50" + "regenerated": "2022-01-31 10:15:57.942418", + "spec_repo_commit": "28778f1" }, "v2": { "apigentools_version": "1.6.1", - "regenerated": "2022-01-27 16:02:03.911147", - "spec_repo_commit": "c738c50" + "regenerated": "2022-01-31 10:15:58.422149", + "spec_repo_commit": "28778f1" } } } \ No newline at end of file diff --git a/.generator/schemas/v1/openapi.yaml b/.generator/schemas/v1/openapi.yaml index 4cbd60c87d..d043e88131 100644 --- a/.generator/schemas/v1/openapi.yaml +++ b/.generator/schemas/v1/openapi.yaml @@ -12428,6 +12428,12 @@ components: description: The hour for the usage. format: date-time type: string + org_name: + description: The organization name. + type: string + public_id: + description: The organization public ID. + type: string type: object UsageAnalyzedLogsResponse: description: A response containing the number of analyzed logs for each hour @@ -13347,6 +13353,12 @@ components: of the given hour's month until the given hour. format: int64 type: integer + org_name: + description: The organization name. + type: string + public_id: + description: The organization public ID. + type: string type: object UsageIncidentManagementResponse: description: Response containing the incident management usage for each hour @@ -13369,6 +13381,12 @@ components: description: Contains the number of spans indexed. format: int64 type: integer + org_name: + description: The organization name. + type: string + public_id: + description: The organization public ID. + type: string type: object UsageIndexedSpansResponse: description: A response containing indexed spans usage. @@ -13392,6 +13410,12 @@ components: hour. format: int64 type: integer + org_name: + description: The organization name. + type: string + public_id: + description: The organization public ID. + type: string type: object UsageIngestedSpansResponse: description: Response containing the ingested spans usage for each hour for @@ -13414,6 +13438,12 @@ components: description: The total number of IoT devices during a given hour. format: int64 type: integer + org_name: + description: The organization name. + type: string + public_id: + description: The organization public ID. + type: string type: object UsageIoTResponse: description: Response containing the IoT usage for each hour for a given organization. @@ -13641,6 +13671,12 @@ components: description: The hour for the usage. format: date-time type: string + org_name: + description: The organization name. + type: string + public_id: + description: The organization public ID. + type: string type: object UsageProfilingResponse: description: Response containing the number of profiled hosts for each hour @@ -13782,6 +13818,12 @@ components: description: The hour for the usage. format: date-time type: string + org_name: + description: The organization name. + type: string + public_id: + description: The organization public ID. + type: string snmp_devices: description: Contains the number of SNMP devices. format: int64 diff --git a/docs/v1/UsageAnalyzedLogsHour.md b/docs/v1/UsageAnalyzedLogsHour.md index 56def26f2d..c25d832eab 100644 --- a/docs/v1/UsageAnalyzedLogsHour.md +++ b/docs/v1/UsageAnalyzedLogsHour.md @@ -8,5 +8,7 @@ The number of analyzed logs for each hour for a given organization. | ----------------- | ------------ | ------------------------------------- | ---------- | | **analyzed_logs** | **int** | Contains the number of analyzed logs. | [optional] | | **hour** | **datetime** | The hour for the usage. | [optional] | +| **org_name** | **str** | The organization name. | [optional] | +| **public_id** | **str** | The organization public ID. | [optional] | [[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) diff --git a/docs/v1/UsageIncidentManagementHour.md b/docs/v1/UsageIncidentManagementHour.md index e9782d14cf..4c3c62ac9a 100644 --- a/docs/v1/UsageIncidentManagementHour.md +++ b/docs/v1/UsageIncidentManagementHour.md @@ -8,5 +8,7 @@ Incident management usage for a given organization for a given hour. | ------------------------ | ------------ | ----------------------------------------------------------------------------------------------------------------- | ---------- | | **hour** | **datetime** | The hour for the usage. | [optional] | | **monthly_active_users** | **int** | Contains the total number monthly active users from the start of the given hour's month until the given hour. | [optional] | +| **org_name** | **str** | The organization name. | [optional] | +| **public_id** | **str** | The organization public ID. | [optional] | [[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) diff --git a/docs/v1/UsageIndexedSpansHour.md b/docs/v1/UsageIndexedSpansHour.md index d5b61ddc48..d8741a5cc9 100644 --- a/docs/v1/UsageIndexedSpansHour.md +++ b/docs/v1/UsageIndexedSpansHour.md @@ -8,5 +8,7 @@ The hours of indexed spans usage. | ------------------------ | ------------ | ------------------------------------- | ---------- | | **hour** | **datetime** | The hour for the usage. | [optional] | | **indexed_events_count** | **int** | Contains the number of spans indexed. | [optional] | +| **org_name** | **str** | The organization name. | [optional] | +| **public_id** | **str** | The organization public ID. | [optional] | [[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) diff --git a/docs/v1/UsageIngestedSpansHour.md b/docs/v1/UsageIngestedSpansHour.md index eb1c6505cc..0f286d39a8 100644 --- a/docs/v1/UsageIngestedSpansHour.md +++ b/docs/v1/UsageIngestedSpansHour.md @@ -8,5 +8,7 @@ Ingested spans usage for a given organization for a given hour. | ------------------------- | ------------ | ---------------------------------------------------------------- | ---------- | | **hour** | **datetime** | The hour for the usage. | [optional] | | **ingested_events_bytes** | **int** | Contains the total number of bytes ingested during a given hour. | [optional] | +| **org_name** | **str** | The organization name. | [optional] | +| **public_id** | **str** | The organization public ID. | [optional] | [[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) diff --git a/docs/v1/UsageIoTHour.md b/docs/v1/UsageIoTHour.md index f880a40993..bf9310a9be 100644 --- a/docs/v1/UsageIoTHour.md +++ b/docs/v1/UsageIoTHour.md @@ -8,5 +8,7 @@ IoT usage for a given organization for a given hour. | -------------------- | ------------ | ---------------------------------------------------- | ---------- | | **hour** | **datetime** | The hour for the usage. | [optional] | | **iot_device_count** | **int** | The total number of IoT devices during a given hour. | [optional] | +| **org_name** | **str** | The organization name. | [optional] | +| **public_id** | **str** | The organization public ID. | [optional] | [[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) diff --git a/docs/v1/UsageProfilingHour.md b/docs/v1/UsageProfilingHour.md index 11b0aefabe..0e4927a135 100644 --- a/docs/v1/UsageProfilingHour.md +++ b/docs/v1/UsageProfilingHour.md @@ -9,5 +9,7 @@ The number of profiled hosts for each hour for a given organization. | **avg_container_agent_count** | **int** | Get average number of container agents for that hour. | [optional] | | **host_count** | **int** | Contains the total number of profiled hosts reporting during a given hour. | [optional] | | **hour** | **datetime** | The hour for the usage. | [optional] | +| **org_name** | **str** | The organization name. | [optional] | +| **public_id** | **str** | The organization public ID. | [optional] | [[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) diff --git a/docs/v1/UsageSNMPHour.md b/docs/v1/UsageSNMPHour.md index d03059f8df..a7c6b196cb 100644 --- a/docs/v1/UsageSNMPHour.md +++ b/docs/v1/UsageSNMPHour.md @@ -7,6 +7,8 @@ The number of SNMP devices for each hour for a given organization. | Name | Type | Description | Notes | | ---------------- | ------------ | ------------------------------------ | ---------- | | **hour** | **datetime** | The hour for the usage. | [optional] | +| **org_name** | **str** | The organization name. | [optional] | +| **public_id** | **str** | The organization public ID. | [optional] | | **snmp_devices** | **int** | Contains the number of SNMP devices. | [optional] | [[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) diff --git a/examples/v1/usage-metering/GetIncidentManagement.py b/examples/v1/usage-metering/GetIncidentManagement.py new file mode 100644 index 0000000000..f43c990441 --- /dev/null +++ b/examples/v1/usage-metering/GetIncidentManagement.py @@ -0,0 +1,18 @@ +""" +Get hourly usage for incident management returns "OK" response +""" + +from datetime import datetime +from dateutil.relativedelta import relativedelta +from datadog_api_client.v1 import ApiClient, Configuration +from datadog_api_client.v1.api.usage_metering_api import UsageMeteringApi + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = UsageMeteringApi(api_client) + response = api_instance.get_incident_management( + start_hr=(datetime.now() + relativedelta(days=-5)).isoformat(timespec="seconds"), + end_hr=(datetime.now() + relativedelta(days=-3)).isoformat(timespec="seconds"), + ) + + print(response) diff --git a/examples/v1/usage-metering/GetIngestedSpans.py b/examples/v1/usage-metering/GetIngestedSpans.py new file mode 100644 index 0000000000..ba56fbf7a5 --- /dev/null +++ b/examples/v1/usage-metering/GetIngestedSpans.py @@ -0,0 +1,18 @@ +""" +Get hourly usage for ingested spans returns "OK" response +""" + +from datetime import datetime +from dateutil.relativedelta import relativedelta +from datadog_api_client.v1 import ApiClient, Configuration +from datadog_api_client.v1.api.usage_metering_api import UsageMeteringApi + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = UsageMeteringApi(api_client) + response = api_instance.get_ingested_spans( + start_hr=(datetime.now() + relativedelta(days=-5)).isoformat(timespec="seconds"), + end_hr=(datetime.now() + relativedelta(days=-3)).isoformat(timespec="seconds"), + ) + + print(response) diff --git a/examples/v1/usage-metering/GetUsageAnalyzedLogs.py b/examples/v1/usage-metering/GetUsageAnalyzedLogs.py new file mode 100644 index 0000000000..2bca40330a --- /dev/null +++ b/examples/v1/usage-metering/GetUsageAnalyzedLogs.py @@ -0,0 +1,18 @@ +""" +Get hourly usage for analyzed logs returns "OK" response +""" + +from datetime import datetime +from dateutil.relativedelta import relativedelta +from datadog_api_client.v1 import ApiClient, Configuration +from datadog_api_client.v1.api.usage_metering_api import UsageMeteringApi + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = UsageMeteringApi(api_client) + response = api_instance.get_usage_analyzed_logs( + start_hr=(datetime.now() + relativedelta(days=-5)).isoformat(timespec="seconds"), + end_hr=(datetime.now() + relativedelta(days=-3)).isoformat(timespec="seconds"), + ) + + print(response) diff --git a/examples/v1/usage-metering/GetUsageIndexedSpans.py b/examples/v1/usage-metering/GetUsageIndexedSpans.py new file mode 100644 index 0000000000..846ffb79ff --- /dev/null +++ b/examples/v1/usage-metering/GetUsageIndexedSpans.py @@ -0,0 +1,18 @@ +""" +Get hourly usage for indexed spans returns "OK" response +""" + +from datetime import datetime +from dateutil.relativedelta import relativedelta +from datadog_api_client.v1 import ApiClient, Configuration +from datadog_api_client.v1.api.usage_metering_api import UsageMeteringApi + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = UsageMeteringApi(api_client) + response = api_instance.get_usage_indexed_spans( + start_hr=(datetime.now() + relativedelta(days=-5)).isoformat(timespec="seconds"), + end_hr=(datetime.now() + relativedelta(days=-3)).isoformat(timespec="seconds"), + ) + + print(response) diff --git a/examples/v1/usage-metering/GetUsageInternetOfThings.py b/examples/v1/usage-metering/GetUsageInternetOfThings.py new file mode 100644 index 0000000000..024d7f13a4 --- /dev/null +++ b/examples/v1/usage-metering/GetUsageInternetOfThings.py @@ -0,0 +1,18 @@ +""" +Get hourly usage for IoT returns "OK" response +""" + +from datetime import datetime +from dateutil.relativedelta import relativedelta +from datadog_api_client.v1 import ApiClient, Configuration +from datadog_api_client.v1.api.usage_metering_api import UsageMeteringApi + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = UsageMeteringApi(api_client) + response = api_instance.get_usage_internet_of_things( + start_hr=(datetime.now() + relativedelta(days=-5)).isoformat(timespec="seconds"), + end_hr=(datetime.now() + relativedelta(days=-3)).isoformat(timespec="seconds"), + ) + + print(response) diff --git a/examples/v1/usage-metering/GetUsageProfiling.py b/examples/v1/usage-metering/GetUsageProfiling.py new file mode 100644 index 0000000000..591269c072 --- /dev/null +++ b/examples/v1/usage-metering/GetUsageProfiling.py @@ -0,0 +1,18 @@ +""" +Get hourly usage for profiled hosts returns "OK" response +""" + +from datetime import datetime +from dateutil.relativedelta import relativedelta +from datadog_api_client.v1 import ApiClient, Configuration +from datadog_api_client.v1.api.usage_metering_api import UsageMeteringApi + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = UsageMeteringApi(api_client) + response = api_instance.get_usage_profiling( + start_hr=(datetime.now() + relativedelta(days=-5)).isoformat(timespec="seconds"), + end_hr=(datetime.now() + relativedelta(days=-3)).isoformat(timespec="seconds"), + ) + + print(response) diff --git a/examples/v1/usage-metering/GetUsageSNMP.py b/examples/v1/usage-metering/GetUsageSNMP.py new file mode 100644 index 0000000000..53be5512f5 --- /dev/null +++ b/examples/v1/usage-metering/GetUsageSNMP.py @@ -0,0 +1,18 @@ +""" +Get hourly usage for SNMP devices returns "OK" response +""" + +from datetime import datetime +from dateutil.relativedelta import relativedelta +from datadog_api_client.v1 import ApiClient, Configuration +from datadog_api_client.v1.api.usage_metering_api import UsageMeteringApi + +configuration = Configuration() +with ApiClient(configuration) as api_client: + api_instance = UsageMeteringApi(api_client) + response = api_instance.get_usage_snmp( + start_hr=(datetime.now() + relativedelta(days=-5)).isoformat(timespec="seconds"), + end_hr=(datetime.now() + relativedelta(days=-3)).isoformat(timespec="seconds"), + ) + + print(response) diff --git a/src/datadog_api_client/v1/model/usage_analyzed_logs_hour.py b/src/datadog_api_client/v1/model/usage_analyzed_logs_hour.py index 85e9c63382..9de29a774b 100644 --- a/src/datadog_api_client/v1/model/usage_analyzed_logs_hour.py +++ b/src/datadog_api_client/v1/model/usage_analyzed_logs_hour.py @@ -24,11 +24,15 @@ def openapi_types(): return { "analyzed_logs": (int,), "hour": (datetime,), + "org_name": (str,), + "public_id": (str,), } attribute_map = { "analyzed_logs": "analyzed_logs", "hour": "hour", + "org_name": "org_name", + "public_id": "public_id", } read_only_vars = {} @@ -39,6 +43,8 @@ def __init__(self, *args, **kwargs): Keyword Args: analyzed_logs (int): [optional] Contains the number of analyzed logs. hour (datetime): [optional] The hour for the usage. + org_name (str): [optional] The organization name. + public_id (str): [optional] The organization public ID. """ super().__init__(kwargs) diff --git a/src/datadog_api_client/v1/model/usage_incident_management_hour.py b/src/datadog_api_client/v1/model/usage_incident_management_hour.py index 6a27f624ca..d6fa26a213 100644 --- a/src/datadog_api_client/v1/model/usage_incident_management_hour.py +++ b/src/datadog_api_client/v1/model/usage_incident_management_hour.py @@ -24,11 +24,15 @@ def openapi_types(): return { "hour": (datetime,), "monthly_active_users": (int,), + "org_name": (str,), + "public_id": (str,), } attribute_map = { "hour": "hour", "monthly_active_users": "monthly_active_users", + "org_name": "org_name", + "public_id": "public_id", } read_only_vars = {} @@ -39,6 +43,8 @@ def __init__(self, *args, **kwargs): Keyword Args: hour (datetime): [optional] The hour for the usage. monthly_active_users (int): [optional] Contains the total number monthly active users from the start of the given hour's month until the given hour. + org_name (str): [optional] The organization name. + public_id (str): [optional] The organization public ID. """ super().__init__(kwargs) diff --git a/src/datadog_api_client/v1/model/usage_indexed_spans_hour.py b/src/datadog_api_client/v1/model/usage_indexed_spans_hour.py index e6323ac289..f4a77841fc 100644 --- a/src/datadog_api_client/v1/model/usage_indexed_spans_hour.py +++ b/src/datadog_api_client/v1/model/usage_indexed_spans_hour.py @@ -24,11 +24,15 @@ def openapi_types(): return { "hour": (datetime,), "indexed_events_count": (int,), + "org_name": (str,), + "public_id": (str,), } attribute_map = { "hour": "hour", "indexed_events_count": "indexed_events_count", + "org_name": "org_name", + "public_id": "public_id", } read_only_vars = {} @@ -39,6 +43,8 @@ def __init__(self, *args, **kwargs): Keyword Args: hour (datetime): [optional] The hour for the usage. indexed_events_count (int): [optional] Contains the number of spans indexed. + org_name (str): [optional] The organization name. + public_id (str): [optional] The organization public ID. """ super().__init__(kwargs) diff --git a/src/datadog_api_client/v1/model/usage_ingested_spans_hour.py b/src/datadog_api_client/v1/model/usage_ingested_spans_hour.py index aa32d20a18..3bccb4b341 100644 --- a/src/datadog_api_client/v1/model/usage_ingested_spans_hour.py +++ b/src/datadog_api_client/v1/model/usage_ingested_spans_hour.py @@ -24,11 +24,15 @@ def openapi_types(): return { "hour": (datetime,), "ingested_events_bytes": (int,), + "org_name": (str,), + "public_id": (str,), } attribute_map = { "hour": "hour", "ingested_events_bytes": "ingested_events_bytes", + "org_name": "org_name", + "public_id": "public_id", } read_only_vars = {} @@ -39,6 +43,8 @@ def __init__(self, *args, **kwargs): Keyword Args: hour (datetime): [optional] The hour for the usage. ingested_events_bytes (int): [optional] Contains the total number of bytes ingested during a given hour. + org_name (str): [optional] The organization name. + public_id (str): [optional] The organization public ID. """ super().__init__(kwargs) diff --git a/src/datadog_api_client/v1/model/usage_io_t_hour.py b/src/datadog_api_client/v1/model/usage_io_t_hour.py index 262e1005b7..df063bf20d 100644 --- a/src/datadog_api_client/v1/model/usage_io_t_hour.py +++ b/src/datadog_api_client/v1/model/usage_io_t_hour.py @@ -24,11 +24,15 @@ def openapi_types(): return { "hour": (datetime,), "iot_device_count": (int,), + "org_name": (str,), + "public_id": (str,), } attribute_map = { "hour": "hour", "iot_device_count": "iot_device_count", + "org_name": "org_name", + "public_id": "public_id", } read_only_vars = {} @@ -39,6 +43,8 @@ def __init__(self, *args, **kwargs): Keyword Args: hour (datetime): [optional] The hour for the usage. iot_device_count (int): [optional] The total number of IoT devices during a given hour. + org_name (str): [optional] The organization name. + public_id (str): [optional] The organization public ID. """ super().__init__(kwargs) diff --git a/src/datadog_api_client/v1/model/usage_profiling_hour.py b/src/datadog_api_client/v1/model/usage_profiling_hour.py index 8d01153409..bfb211c296 100644 --- a/src/datadog_api_client/v1/model/usage_profiling_hour.py +++ b/src/datadog_api_client/v1/model/usage_profiling_hour.py @@ -25,12 +25,16 @@ def openapi_types(): "avg_container_agent_count": (int,), "host_count": (int,), "hour": (datetime,), + "org_name": (str,), + "public_id": (str,), } attribute_map = { "avg_container_agent_count": "avg_container_agent_count", "host_count": "host_count", "hour": "hour", + "org_name": "org_name", + "public_id": "public_id", } read_only_vars = {} @@ -42,6 +46,8 @@ def __init__(self, *args, **kwargs): avg_container_agent_count (int): [optional] Get average number of container agents for that hour. host_count (int): [optional] Contains the total number of profiled hosts reporting during a given hour. hour (datetime): [optional] The hour for the usage. + org_name (str): [optional] The organization name. + public_id (str): [optional] The organization public ID. """ super().__init__(kwargs) diff --git a/src/datadog_api_client/v1/model/usage_snmp_hour.py b/src/datadog_api_client/v1/model/usage_snmp_hour.py index 24d0a73759..5947f9b48e 100644 --- a/src/datadog_api_client/v1/model/usage_snmp_hour.py +++ b/src/datadog_api_client/v1/model/usage_snmp_hour.py @@ -23,11 +23,15 @@ class UsageSNMPHour(ModelNormal): def openapi_types(): return { "hour": (datetime,), + "org_name": (str,), + "public_id": (str,), "snmp_devices": (int,), } attribute_map = { "hour": "hour", + "org_name": "org_name", + "public_id": "public_id", "snmp_devices": "snmp_devices", } @@ -38,6 +42,8 @@ def __init__(self, *args, **kwargs): Keyword Args: hour (datetime): [optional] The hour for the usage. + org_name (str): [optional] The organization name. + public_id (str): [optional] The organization public ID. snmp_devices (int): [optional] Contains the number of SNMP devices. """ super().__init__(kwargs) diff --git a/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_analyzed_logs_returns_bad_request_response.frozen b/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_analyzed_logs_returns_bad_request_response.frozen new file mode 100644 index 0000000000..69dd8e44f5 --- /dev/null +++ b/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_analyzed_logs_returns_bad_request_response.frozen @@ -0,0 +1 @@ +2022-01-31T09:34:30.286Z \ No newline at end of file diff --git a/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_analyzed_logs_returns_bad_request_response.yaml b/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_analyzed_logs_returns_bad_request_response.yaml new file mode 100644 index 0000000000..9011f30d95 --- /dev/null +++ b/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_analyzed_logs_returns_bad_request_response.yaml @@ -0,0 +1,18 @@ +interactions: +- request: + body: null + headers: + accept: + - application/json;datetime-format=rfc3339 + method: GET + uri: https://api.datadoghq.com/api/v1/usage/analyzed_logs?start_hr=2022-01-28T09%3A34%3A30.286Z&end_hr=2022-01-26T09%3A34%3A30.286Z + response: + body: + string: '{"errors": ["start_hr [YYYY-MM-DDThh] must be before end_hr [YYYY-MM-DDThh]"]}' + headers: + content-type: + - application/json + status: + code: 400 + message: Bad Request +version: 1 diff --git a/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_analyzed_logs_returns_ok_response.frozen b/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_analyzed_logs_returns_ok_response.frozen new file mode 100644 index 0000000000..b02b2f6950 --- /dev/null +++ b/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_analyzed_logs_returns_ok_response.frozen @@ -0,0 +1 @@ +2022-01-31T09:34:30.705Z \ No newline at end of file diff --git a/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_analyzed_logs_returns_ok_response.yaml b/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_analyzed_logs_returns_ok_response.yaml new file mode 100644 index 0000000000..ae90bf81ed --- /dev/null +++ b/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_analyzed_logs_returns_ok_response.yaml @@ -0,0 +1,18 @@ +interactions: +- request: + body: null + headers: + accept: + - application/json;datetime-format=rfc3339 + method: GET + uri: https://api.datadoghq.com/api/v1/usage/analyzed_logs?start_hr=2022-01-26T09%3A34%3A30.705Z&end_hr=2022-01-28T09%3A34%3A30.705Z + response: + body: + string: '{"usage":[{"hour":"2022-01-26T09:00:00+00:00","analyzed_logs":200},{"hour":"2022-01-26T10:00:00+00:00","analyzed_logs":0},{"hour":"2022-01-26T11:00:00+00:00","analyzed_logs":412},{"hour":"2022-01-26T12:00:00+00:00","analyzed_logs":0},{"hour":"2022-01-26T13:00:00+00:00","analyzed_logs":200},{"hour":"2022-01-26T14:00:00+00:00","analyzed_logs":1014},{"hour":"2022-01-26T15:00:00+00:00","analyzed_logs":200},{"hour":"2022-01-26T16:00:00+00:00","analyzed_logs":0},{"hour":"2022-01-26T17:00:00+00:00","analyzed_logs":200},{"hour":"2022-01-26T18:00:00+00:00","analyzed_logs":0},{"hour":"2022-01-26T19:00:00+00:00","analyzed_logs":200},{"hour":"2022-01-26T20:00:00+00:00","analyzed_logs":0},{"hour":"2022-01-26T21:00:00+00:00","analyzed_logs":200},{"hour":"2022-01-26T22:00:00+00:00","analyzed_logs":403786},{"hour":"2022-01-26T23:00:00+00:00","analyzed_logs":1500564},{"hour":"2022-01-27T00:00:00+00:00","analyzed_logs":2420},{"hour":"2022-01-27T01:00:00+00:00","analyzed_logs":1217},{"hour":"2022-01-27T02:00:00+00:00","analyzed_logs":978},{"hour":"2022-01-27T03:00:00+00:00","analyzed_logs":1178},{"hour":"2022-01-27T04:00:00+00:00","analyzed_logs":1014},{"hour":"2022-01-27T05:00:00+00:00","analyzed_logs":200},{"hour":"2022-01-27T06:00:00+00:00","analyzed_logs":0},{"hour":"2022-01-27T07:00:00+00:00","analyzed_logs":200},{"hour":"2022-01-27T08:00:00+00:00","analyzed_logs":0},{"hour":"2022-01-27T09:00:00+00:00","analyzed_logs":200},{"hour":"2022-01-27T10:00:00+00:00","analyzed_logs":0},{"hour":"2022-01-27T11:00:00+00:00","analyzed_logs":412},{"hour":"2022-01-27T12:00:00+00:00","analyzed_logs":194874},{"hour":"2022-01-27T13:00:00+00:00","analyzed_logs":1742486},{"hour":"2022-01-27T14:00:00+00:00","analyzed_logs":992448},{"hour":"2022-01-27T15:00:00+00:00","analyzed_logs":8200},{"hour":"2022-01-27T16:00:00+00:00","analyzed_logs":576000},{"hour":"2022-01-27T17:00:00+00:00","analyzed_logs":576200},{"hour":"2022-01-27T18:00:00+00:00","analyzed_logs":571200},{"hour":"2022-01-27T19:00:00+00:00","analyzed_logs":576200},{"hour":"2022-01-27T20:00:00+00:00","analyzed_logs":41600},{"hour":"2022-01-27T21:00:00+00:00","analyzed_logs":200},{"hour":"2022-01-27T22:00:00+00:00","analyzed_logs":0},{"hour":"2022-01-27T23:00:00+00:00","analyzed_logs":200},{"hour":"2022-01-28T00:00:00+00:00","analyzed_logs":2420},{"hour":"2022-01-28T01:00:00+00:00","analyzed_logs":1217},{"hour":"2022-01-28T02:00:00+00:00","analyzed_logs":978},{"hour":"2022-01-28T03:00:00+00:00","analyzed_logs":1178},{"hour":"2022-01-28T04:00:00+00:00","analyzed_logs":1014},{"hour":"2022-01-28T05:00:00+00:00","analyzed_logs":200},{"hour":"2022-01-28T06:00:00+00:00","analyzed_logs":0},{"hour":"2022-01-28T07:00:00+00:00","analyzed_logs":200},{"hour":"2022-01-28T08:00:00+00:00","analyzed_logs":0}]}' + headers: + content-type: + - application/json + status: + code: 200 + message: OK +version: 1 diff --git a/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_incident_management_returns_bad_request_response.frozen b/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_incident_management_returns_bad_request_response.frozen new file mode 100644 index 0000000000..4fe9e3998f --- /dev/null +++ b/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_incident_management_returns_bad_request_response.frozen @@ -0,0 +1 @@ +2022-01-31T09:34:31.364Z \ No newline at end of file diff --git a/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_incident_management_returns_bad_request_response.yaml b/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_incident_management_returns_bad_request_response.yaml new file mode 100644 index 0000000000..01fdd0985a --- /dev/null +++ b/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_incident_management_returns_bad_request_response.yaml @@ -0,0 +1,18 @@ +interactions: +- request: + body: null + headers: + accept: + - application/json;datetime-format=rfc3339 + method: GET + uri: https://api.datadoghq.com/api/v1/usage/incident-management?start_hr=2022-01-28T09%3A34%3A31.364Z&end_hr=2022-01-26T09%3A34%3A31.364Z + response: + body: + string: '{"errors": ["start_hr [YYYY-MM-DDThh] must be before end_hr [YYYY-MM-DDThh]"]}' + headers: + content-type: + - application/json + status: + code: 400 + message: Bad Request +version: 1 diff --git a/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_incident_management_returns_ok_response.frozen b/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_incident_management_returns_ok_response.frozen new file mode 100644 index 0000000000..9427c84bfb --- /dev/null +++ b/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_incident_management_returns_ok_response.frozen @@ -0,0 +1 @@ +2022-01-31T09:34:31.797Z \ No newline at end of file diff --git a/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_incident_management_returns_ok_response.yaml b/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_incident_management_returns_ok_response.yaml new file mode 100644 index 0000000000..7ca0da9458 --- /dev/null +++ b/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_incident_management_returns_ok_response.yaml @@ -0,0 +1,65 @@ +interactions: +- request: + body: null + headers: + accept: + - application/json;datetime-format=rfc3339 + method: GET + uri: https://api.datadoghq.com/api/v1/usage/incident-management?start_hr=2022-01-26T09%3A34%3A31.797Z&end_hr=2022-01-28T09%3A34%3A31.797Z + response: + body: + string: '{"usage":[{"org_name":"DD Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-26T09:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-26T10:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-26T11:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-26T12:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-26T13:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-26T14:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-26T15:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-26T16:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-26T17:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-26T18:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-26T19:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-26T20:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-26T21:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-26T22:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-26T23:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-27T00:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-27T01:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-27T02:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-27T03:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-27T04:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-27T05:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-27T06:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-27T07:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-27T08:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-27T09:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-27T10:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-27T11:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-27T12:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-27T13:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-27T14:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-27T15:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-27T16:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-27T17:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-27T18:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-27T19:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-27T20:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-27T21:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-27T22:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-27T23:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-28T00:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-28T01:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-28T02:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-28T03:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-28T04:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-28T05:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-28T06:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-28T07:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","monthly_active_users":1,"hour":"2022-01-28T08:00:00+00:00"}]}' + headers: + content-type: + - application/json + status: + code: 200 + message: OK +version: 1 diff --git a/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_indexed_spans_returns_bad_request_response.frozen b/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_indexed_spans_returns_bad_request_response.frozen new file mode 100644 index 0000000000..df946f7753 --- /dev/null +++ b/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_indexed_spans_returns_bad_request_response.frozen @@ -0,0 +1 @@ +2022-01-31T09:34:32.316Z \ No newline at end of file diff --git a/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_indexed_spans_returns_bad_request_response.yaml b/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_indexed_spans_returns_bad_request_response.yaml new file mode 100644 index 0000000000..b80bf4844d --- /dev/null +++ b/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_indexed_spans_returns_bad_request_response.yaml @@ -0,0 +1,18 @@ +interactions: +- request: + body: null + headers: + accept: + - application/json;datetime-format=rfc3339 + method: GET + uri: https://api.datadoghq.com/api/v1/usage/indexed-spans?start_hr=2022-01-28T09%3A34%3A32.316Z&end_hr=2022-01-26T09%3A34%3A32.316Z + response: + body: + string: '{"errors": ["start_hr [YYYY-MM-DDThh] must be before end_hr [YYYY-MM-DDThh]"]}' + headers: + content-type: + - application/json + status: + code: 400 + message: Bad Request +version: 1 diff --git a/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_indexed_spans_returns_ok_response.frozen b/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_indexed_spans_returns_ok_response.frozen new file mode 100644 index 0000000000..9fb62f6e09 --- /dev/null +++ b/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_indexed_spans_returns_ok_response.frozen @@ -0,0 +1 @@ +2022-01-31T09:34:32.749Z \ No newline at end of file diff --git a/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_indexed_spans_returns_ok_response.yaml b/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_indexed_spans_returns_ok_response.yaml new file mode 100644 index 0000000000..e3fcef8782 --- /dev/null +++ b/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_indexed_spans_returns_ok_response.yaml @@ -0,0 +1,65 @@ +interactions: +- request: + body: null + headers: + accept: + - application/json;datetime-format=rfc3339 + method: GET + uri: https://api.datadoghq.com/api/v1/usage/indexed-spans?start_hr=2022-01-26T09%3A34%3A32.749Z&end_hr=2022-01-28T09%3A34%3A32.749Z + response: + body: + string: '{"usage":[{"org_name":"DD Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-26T09:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-26T10:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-26T11:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-26T12:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-26T13:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-26T14:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-26T15:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-26T16:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-26T17:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-26T18:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-26T19:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-26T20:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-26T21:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-26T22:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-26T23:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-27T00:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-27T01:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-27T02:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-27T03:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-27T04:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-27T05:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-27T06:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-27T07:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-27T08:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-27T09:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-27T10:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-27T11:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-27T12:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-27T13:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-27T14:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-27T15:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-27T16:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-27T17:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-27T18:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-27T19:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-27T20:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-27T21:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-27T22:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-27T23:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-28T00:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-28T01:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-28T02:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-28T03:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-28T04:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-28T05:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-28T06:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-28T07:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","indexed_events_count":0,"hour":"2022-01-28T08:00:00+00:00"}]}' + headers: + content-type: + - application/json + status: + code: 200 + message: OK +version: 1 diff --git a/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_ingested_spans_returns_bad_request_response.frozen b/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_ingested_spans_returns_bad_request_response.frozen new file mode 100644 index 0000000000..df831d1797 --- /dev/null +++ b/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_ingested_spans_returns_bad_request_response.frozen @@ -0,0 +1 @@ +2022-01-31T09:34:33.304Z \ No newline at end of file diff --git a/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_ingested_spans_returns_bad_request_response.yaml b/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_ingested_spans_returns_bad_request_response.yaml new file mode 100644 index 0000000000..74f6f8cfc8 --- /dev/null +++ b/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_ingested_spans_returns_bad_request_response.yaml @@ -0,0 +1,18 @@ +interactions: +- request: + body: null + headers: + accept: + - application/json;datetime-format=rfc3339 + method: GET + uri: https://api.datadoghq.com/api/v1/usage/ingested-spans?start_hr=2022-01-28T09%3A34%3A33.304Z&end_hr=2022-01-26T09%3A34%3A33.304Z + response: + body: + string: '{"errors": ["start_hr [YYYY-MM-DDThh] must be before end_hr [YYYY-MM-DDThh]"]}' + headers: + content-type: + - application/json + status: + code: 400 + message: Bad Request +version: 1 diff --git a/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_ingested_spans_returns_ok_response.frozen b/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_ingested_spans_returns_ok_response.frozen new file mode 100644 index 0000000000..64f72f27aa --- /dev/null +++ b/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_ingested_spans_returns_ok_response.frozen @@ -0,0 +1 @@ +2022-01-31T09:34:33.739Z \ No newline at end of file diff --git a/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_ingested_spans_returns_ok_response.yaml b/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_ingested_spans_returns_ok_response.yaml new file mode 100644 index 0000000000..aa3d15472f --- /dev/null +++ b/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_ingested_spans_returns_ok_response.yaml @@ -0,0 +1,65 @@ +interactions: +- request: + body: null + headers: + accept: + - application/json;datetime-format=rfc3339 + method: GET + uri: https://api.datadoghq.com/api/v1/usage/ingested-spans?start_hr=2022-01-26T09%3A34%3A33.739Z&end_hr=2022-01-28T09%3A34%3A33.739Z + response: + body: + string: '{"usage":[{"org_name":"DD Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T09:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T10:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T11:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T12:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T13:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T14:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T15:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T16:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T17:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T18:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T19:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T20:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T21:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":569960,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T22:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":2118720,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T23:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T00:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T01:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T02:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T03:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T04:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T05:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T06:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T07:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T08:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T09:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T10:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T11:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":275263,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T12:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":2450015,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T13:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":1381529,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T14:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":10595,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T15:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":748763,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T16:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":748738,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T17:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":741902,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T18:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":748746,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T19:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":54279,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T20:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T21:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T22:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T23:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-28T00:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-28T01:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-28T02:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-28T03:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-28T04:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-28T05:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-28T06:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-28T07:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","ingested_events_bytes":0,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-28T08:00:00+00:00"}]}' + headers: + content-type: + - application/json + status: + code: 200 + message: OK +version: 1 diff --git a/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_iot_returns_bad_request_response.frozen b/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_iot_returns_bad_request_response.frozen new file mode 100644 index 0000000000..fb2b5acca8 --- /dev/null +++ b/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_iot_returns_bad_request_response.frozen @@ -0,0 +1 @@ +2022-01-31T09:34:27.865Z \ No newline at end of file diff --git a/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_iot_returns_bad_request_response.yaml b/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_iot_returns_bad_request_response.yaml new file mode 100644 index 0000000000..d8803b0d8d --- /dev/null +++ b/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_iot_returns_bad_request_response.yaml @@ -0,0 +1,18 @@ +interactions: +- request: + body: null + headers: + accept: + - application/json;datetime-format=rfc3339 + method: GET + uri: https://api.datadoghq.com/api/v1/usage/iot?start_hr=2022-01-28T09%3A34%3A27.865Z&end_hr=2022-01-26T09%3A34%3A27.865Z + response: + body: + string: '{"errors": ["start_hr [YYYY-MM-DDThh] must be before end_hr [YYYY-MM-DDThh]"]}' + headers: + content-type: + - application/json + status: + code: 400 + message: Bad Request +version: 1 diff --git a/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_iot_returns_ok_response.frozen b/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_iot_returns_ok_response.frozen new file mode 100644 index 0000000000..9ee4e32375 --- /dev/null +++ b/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_iot_returns_ok_response.frozen @@ -0,0 +1 @@ +2022-01-31T09:34:28.357Z \ No newline at end of file diff --git a/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_iot_returns_ok_response.yaml b/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_iot_returns_ok_response.yaml new file mode 100644 index 0000000000..0304a3e4f8 --- /dev/null +++ b/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_iot_returns_ok_response.yaml @@ -0,0 +1,65 @@ +interactions: +- request: + body: null + headers: + accept: + - application/json;datetime-format=rfc3339 + method: GET + uri: https://api.datadoghq.com/api/v1/usage/iot?start_hr=2022-01-26T09%3A34%3A28.357Z&end_hr=2022-01-28T09%3A34%3A28.357Z + response: + body: + string: '{"usage":[{"org_name":"DD Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T09:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T10:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T11:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T12:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T13:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T14:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T15:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T16:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T17:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T18:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T19:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T20:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T21:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T22:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T23:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T00:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T01:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T02:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T03:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T04:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T05:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T06:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T07:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T08:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T09:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T10:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T11:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T12:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T13:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T14:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T15:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T16:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T17:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T18:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T19:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T20:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T21:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T22:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T23:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-28T00:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-28T01:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-28T02:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-28T03:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-28T04:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-28T05:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-28T06:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-28T07:00:00+00:00"},{"org_name":"DD + Integration Tests (321813)","iot_device_count":0,"iot_device_tag":null,"public_id":"fasjyydbcgwwc2uc","hour":"2022-01-28T08:00:00+00:00"}]}' + headers: + content-type: + - application/json + status: + code: 200 + message: OK +version: 1 diff --git a/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_profiled_hosts_returns_bad_request_response.frozen b/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_profiled_hosts_returns_bad_request_response.frozen new file mode 100644 index 0000000000..7a1e60b4a5 --- /dev/null +++ b/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_profiled_hosts_returns_bad_request_response.frozen @@ -0,0 +1 @@ +2022-01-31T09:34:34.396Z \ No newline at end of file diff --git a/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_profiled_hosts_returns_bad_request_response.yaml b/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_profiled_hosts_returns_bad_request_response.yaml new file mode 100644 index 0000000000..76dcca53f8 --- /dev/null +++ b/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_profiled_hosts_returns_bad_request_response.yaml @@ -0,0 +1,18 @@ +interactions: +- request: + body: null + headers: + accept: + - application/json;datetime-format=rfc3339 + method: GET + uri: https://api.datadoghq.com/api/v1/usage/profiling?start_hr=2022-01-28T09%3A34%3A34.396Z&end_hr=2022-01-26T09%3A34%3A34.396Z + response: + body: + string: '{"errors": ["start_hr [YYYY-MM-DDThh] must be before end_hr [YYYY-MM-DDThh]"]}' + headers: + content-type: + - application/json + status: + code: 400 + message: Bad Request +version: 1 diff --git a/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_profiled_hosts_returns_ok_response.frozen b/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_profiled_hosts_returns_ok_response.frozen new file mode 100644 index 0000000000..4650b4a191 --- /dev/null +++ b/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_profiled_hosts_returns_ok_response.frozen @@ -0,0 +1 @@ +2022-01-31T09:34:34.802Z \ No newline at end of file diff --git a/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_profiled_hosts_returns_ok_response.yaml b/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_profiled_hosts_returns_ok_response.yaml new file mode 100644 index 0000000000..584f35690b --- /dev/null +++ b/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_profiled_hosts_returns_ok_response.yaml @@ -0,0 +1,65 @@ +interactions: +- request: + body: null + headers: + accept: + - application/json;datetime-format=rfc3339 + method: GET + uri: https://api.datadoghq.com/api/v1/usage/profiling?start_hr=2022-01-26T09%3A34%3A34.802Z&end_hr=2022-01-28T09%3A34%3A34.802Z + response: + body: + string: '{"usage":[{"host_count":null,"org_name":"DD Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T09:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T10:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T11:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T12:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T13:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T14:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T15:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T16:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T17:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T18:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T19:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T20:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T21:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T22:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-26T23:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T00:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T01:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T02:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T03:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T04:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T05:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T06:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T07:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T08:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T09:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T10:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T11:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T12:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T13:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T14:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T15:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T16:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T17:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T18:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T19:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T20:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T21:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T22:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-27T23:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-28T00:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-28T01:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-28T02:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-28T03:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-28T04:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-28T05:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-28T06:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-28T07:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null},{"host_count":null,"org_name":"DD + Integration Tests (321813)","public_id":"fasjyydbcgwwc2uc","hour":"2022-01-28T08:00:00+00:00","avg_container_agent_count":null,"avg_container_agentless_count":null}]}' + headers: + content-type: + - application/json + status: + code: 200 + message: OK +version: 1 diff --git a/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_snmp_devices_returns_bad_request_response.frozen b/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_snmp_devices_returns_bad_request_response.frozen new file mode 100644 index 0000000000..86865f1042 --- /dev/null +++ b/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_snmp_devices_returns_bad_request_response.frozen @@ -0,0 +1 @@ +2022-01-31T09:34:29.203Z \ No newline at end of file diff --git a/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_snmp_devices_returns_bad_request_response.yaml b/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_snmp_devices_returns_bad_request_response.yaml new file mode 100644 index 0000000000..4ec3652258 --- /dev/null +++ b/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_snmp_devices_returns_bad_request_response.yaml @@ -0,0 +1,18 @@ +interactions: +- request: + body: null + headers: + accept: + - application/json;datetime-format=rfc3339 + method: GET + uri: https://api.datadoghq.com/api/v1/usage/snmp?start_hr=2022-01-28T09%3A34%3A29.203Z&end_hr=2022-01-26T09%3A34%3A29.203Z + response: + body: + string: '{"errors": ["start_hr [YYYY-MM-DDThh] must be before end_hr [YYYY-MM-DDThh]"]}' + headers: + content-type: + - application/json + status: + code: 400 + message: Bad Request +version: 1 diff --git a/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_snmp_devices_returns_ok_response.frozen b/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_snmp_devices_returns_ok_response.frozen new file mode 100644 index 0000000000..f6b84beca0 --- /dev/null +++ b/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_snmp_devices_returns_ok_response.frozen @@ -0,0 +1 @@ +2022-01-31T09:34:29.627Z \ No newline at end of file diff --git a/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_snmp_devices_returns_ok_response.yaml b/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_snmp_devices_returns_ok_response.yaml new file mode 100644 index 0000000000..629a152af2 --- /dev/null +++ b/tests/v1/cassettes/test_scenarios/test_get_hourly_usage_for_snmp_devices_returns_ok_response.yaml @@ -0,0 +1,18 @@ +interactions: +- request: + body: null + headers: + accept: + - application/json;datetime-format=rfc3339 + method: GET + uri: https://api.datadoghq.com/api/v1/usage/snmp?start_hr=2022-01-26T09%3A34%3A29.627Z&end_hr=2022-01-28T09%3A34%3A29.627Z + response: + body: + string: '{"usage":[{"snmp_devices":0,"hour":"2022-01-26T09:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-26T10:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-26T11:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-26T12:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-26T13:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-26T14:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-26T15:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-26T16:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-26T17:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-26T18:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-26T19:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-26T20:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-26T21:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-26T22:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-26T23:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-27T00:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-27T01:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-27T02:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-27T03:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-27T04:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-27T05:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-27T06:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-27T07:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-27T08:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-27T09:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-27T10:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-27T11:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-27T12:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-27T13:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-27T14:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-27T15:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-27T16:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-27T17:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-27T18:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-27T19:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-27T20:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-27T21:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-27T22:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-27T23:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-28T00:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-28T01:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-28T02:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-28T03:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-28T04:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-28T05:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-28T06:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-28T07:00:00+00:00"},{"snmp_devices":0,"hour":"2022-01-28T08:00:00+00:00"}]}' + headers: + content-type: + - application/json + status: + code: 200 + message: OK +version: 1 diff --git a/tests/v1/features/usage_metering.feature b/tests/v1/features/usage_metering.feature index b3c229d6bd..56b2b9d6ba 100644 --- a/tests/v1/features/usage_metering.feature +++ b/tests/v1/features/usage_metering.feature @@ -146,15 +146,19 @@ Feature: Usage Metering When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/red-zone-revenue-query + @team:DataDog/red-zone-revenue-query Scenario: Get hourly usage for IoT returns "Bad Request" response Given new "GetUsageInternetOfThings" request + And request contains "start_hr" parameter with value "{{ timeISO('now - 3d') }}" + And request contains "end_hr" parameter with value "{{ timeISO('now - 5d') }}" When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/red-zone-revenue-query + @team:DataDog/red-zone-revenue-query Scenario: Get hourly usage for IoT returns "OK" response Given new "GetUsageInternetOfThings" request + And request contains "start_hr" parameter with value "{{ timeISO('now - 5d') }}" + And request contains "end_hr" parameter with value "{{ timeISO('now - 3d') }}" When the request is sent Then the response status is 200 OK @@ -242,15 +246,19 @@ Feature: Usage Metering When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/red-zone-revenue-query + @team:DataDog/red-zone-revenue-query Scenario: Get hourly usage for SNMP devices returns "Bad Request" response Given new "GetUsageSNMP" request + And request contains "start_hr" parameter with value "{{ timeISO('now - 3d') }}" + And request contains "end_hr" parameter with value "{{ timeISO('now - 5d') }}" When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/red-zone-revenue-query + @team:DataDog/red-zone-revenue-query Scenario: Get hourly usage for SNMP devices returns "OK" response Given new "GetUsageSNMP" request + And request contains "start_hr" parameter with value "{{ timeISO('now - 5d') }}" + And request contains "end_hr" parameter with value "{{ timeISO('now - 3d') }}" When the request is sent Then the response status is 200 OK @@ -302,15 +310,19 @@ Feature: Usage Metering When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/red-zone-revenue-query + @team:DataDog/red-zone-revenue-query Scenario: Get hourly usage for analyzed logs returns "Bad Request" response Given new "GetUsageAnalyzedLogs" request + And request contains "start_hr" parameter with value "{{ timeISO('now - 3d') }}" + And request contains "end_hr" parameter with value "{{ timeISO('now - 5d') }}" When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/red-zone-revenue-query + @team:DataDog/red-zone-revenue-query Scenario: Get hourly usage for analyzed logs returns "OK" response Given new "GetUsageAnalyzedLogs" request + And request contains "start_hr" parameter with value "{{ timeISO('now - 5d') }}" + And request contains "end_hr" parameter with value "{{ timeISO('now - 3d') }}" When the request is sent Then the response status is 200 OK @@ -350,51 +362,67 @@ Feature: Usage Metering When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/red-zone-revenue-query + @team:DataDog/red-zone-revenue-query Scenario: Get hourly usage for incident management returns "Bad Request" response Given new "GetIncidentManagement" request + And request contains "start_hr" parameter with value "{{ timeISO('now - 3d') }}" + And request contains "end_hr" parameter with value "{{ timeISO('now - 5d') }}" When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/red-zone-revenue-query + @team:DataDog/red-zone-revenue-query Scenario: Get hourly usage for incident management returns "OK" response Given new "GetIncidentManagement" request + And request contains "start_hr" parameter with value "{{ timeISO('now - 5d') }}" + And request contains "end_hr" parameter with value "{{ timeISO('now - 3d') }}" When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/red-zone-revenue-query + @team:DataDog/red-zone-revenue-query Scenario: Get hourly usage for indexed spans returns "Bad Request" response Given new "GetUsageIndexedSpans" request + And request contains "start_hr" parameter with value "{{ timeISO('now - 3d') }}" + And request contains "end_hr" parameter with value "{{ timeISO('now - 5d') }}" When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/red-zone-revenue-query + @team:DataDog/red-zone-revenue-query Scenario: Get hourly usage for indexed spans returns "OK" response Given new "GetUsageIndexedSpans" request + And request contains "start_hr" parameter with value "{{ timeISO('now - 5d') }}" + And request contains "end_hr" parameter with value "{{ timeISO('now - 3d') }}" When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/red-zone-revenue-query + @team:DataDog/red-zone-revenue-query Scenario: Get hourly usage for ingested spans returns "Bad Request" response Given new "GetIngestedSpans" request + And request contains "start_hr" parameter with value "{{ timeISO('now - 3d') }}" + And request contains "end_hr" parameter with value "{{ timeISO('now - 5d') }}" When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/red-zone-revenue-query + @team:DataDog/red-zone-revenue-query Scenario: Get hourly usage for ingested spans returns "OK" response Given new "GetIngestedSpans" request + And request contains "start_hr" parameter with value "{{ timeISO('now - 5d') }}" + And request contains "end_hr" parameter with value "{{ timeISO('now - 3d') }}" When the request is sent Then the response status is 200 OK - @generated @skip @team:DataDog/red-zone-revenue-query + @team:DataDog/red-zone-revenue-query Scenario: Get hourly usage for profiled hosts returns "Bad Request" response Given new "GetUsageProfiling" request + And request contains "start_hr" parameter with value "{{ timeISO('now - 3d') }}" + And request contains "end_hr" parameter with value "{{ timeISO('now - 5d') }}" When the request is sent Then the response status is 400 Bad Request - @generated @skip @team:DataDog/red-zone-revenue-query + @team:DataDog/red-zone-revenue-query Scenario: Get hourly usage for profiled hosts returns "OK" response Given new "GetUsageProfiling" request + And request contains "start_hr" parameter with value "{{ timeISO('now - 5d') }}" + And request contains "end_hr" parameter with value "{{ timeISO('now - 3d') }}" When the request is sent Then the response status is 200 OK