Data API — Metrics
metrics_counts
sync(client: AuthenticatedClient | Client, type_: MetricType | Unset = UNSET, start_date: datetime.datetime | Unset = UNSET, data_points: int | Unset = UNSET, interval: MetricInterval | Unset = UNSET, location_id: UUID | Unset = UNSET, system_id: UUID | Unset = UNSET, resource_id: UUID | Unset = UNSET) -> CountMetricResponseApiModel | ProblemDetails | list[ErrorResponse] | NoneParameter | Type | Default |
|---|---|---|
client | AuthenticatedClient | Client | required |
type_ | MetricType | Unset | UNSET |
start_date | datetime.datetime | Unset | UNSET |
data_points | int | Unset | UNSET |
interval | MetricInterval | Unset | UNSET |
location_id | UUID | Unset | UNSET |
system_id | UUID | Unset | UNSET |
resource_id | UUID | Unset | UNSET |
Returns: CountMetricResponseApiModel | ProblemDetails | list[ErrorResponse] | None
Raises:
Exception | Condition |
|---|---|
If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. | |
TimeoutException | If the request takes longer than Client.timeout. |
metrics_duration
sync(client: AuthenticatedClient | Client, type_: MetricType | Unset = UNSET, start_date: datetime.datetime | Unset = UNSET, data_points: int | Unset = UNSET, interval: MetricInterval | Unset = UNSET, location_id: UUID | Unset = UNSET, system_id: UUID | Unset = UNSET, resource_id: UUID | Unset = UNSET, cart_id: UUID | Unset = UNSET) -> DurationMetricResponseApiModel | ProblemDetails | list[ErrorResponse] | NoneParameter | Type | Default |
|---|---|---|
client | AuthenticatedClient | Client | required |
type_ | MetricType | Unset | UNSET |
start_date | datetime.datetime | Unset | UNSET |
data_points | int | Unset | UNSET |
interval | MetricInterval | Unset | UNSET |
location_id | UUID | Unset | UNSET |
system_id | UUID | Unset | UNSET |
resource_id | UUID | Unset | UNSET |
cart_id | UUID | Unset | UNSET |
Returns: DurationMetricResponseApiModel | ProblemDetails | list[ErrorResponse] | None
Raises:
Exception | Condition |
|---|---|
If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. | |
TimeoutException | If the request takes longer than Client.timeout. |
metrics_list
sync(client: AuthenticatedClient | Client, type_: MetricType | Unset = UNSET, from_: datetime.datetime | Unset = UNSET, to: datetime.datetime | Unset = UNSET, interval: MetricInterval | Unset = UNSET, location_id: UUID | Unset = UNSET, system_id: UUID | Unset = UNSET, resource_id: UUID | Unset = UNSET, cart_id: UUID | Unset = UNSET) -> ProblemDetails | list[ErrorResponse] | list[MetricResponseApiModel] | NoneParameter | Type | Default |
|---|---|---|
client | AuthenticatedClient | Client | required |
type_ | MetricType | Unset | UNSET |
from_ | datetime.datetime | Unset | UNSET |
to | datetime.datetime | Unset | UNSET |
interval | MetricInterval | Unset | UNSET |
location_id | UUID | Unset | UNSET |
system_id | UUID | Unset | UNSET |
resource_id | UUID | Unset | UNSET |
cart_id | UUID | Unset | UNSET |
Returns: ProblemDetails | list[ErrorResponse] | list[MetricResponseApiModel] | None
Raises:
Exception | Condition |
|---|---|
If the server returns an undocumented status code and Client.raise_on_unexpected_status is True. | |
TimeoutException | If the request takes longer than Client.timeout. |