---
title: "Fetch uptime for multiple tests"
method: POST
path: "/api/v1/synthetics/tests/uptimes"
tags: ["Synthetics"]
---

# Fetch uptime for multiple tests

`POST /api/v1/synthetics/tests/uptimes`

Fetch uptime for multiple Synthetic tests by ID.

## Request body

- SyntheticsFetchUptimesPayload — Object containing IDs of Synthetic tests and a timeframe.
  - `from_ts` integer, required — Timestamp in seconds (Unix epoch) for the start of uptime.
  - `public_ids` string[], required — An array of Synthetic test IDs you want uptimes for.
  - `to_ts` integer, required — Timestamp in seconds (Unix epoch) for the end of uptime.

## Response `200`

OK.

- SyntheticsTestUptime[]
  - `from_ts` integer — Timestamp in seconds for the start of uptime.
  - `overall` SyntheticsUptime — Object containing the uptime information.
    - `errors` SLOHistoryResponseErrorWithType[], nullable — An array of error objects returned while querying the history data for the service level objective.
      - `error_message` string, required — A message with more details about the error.
      - `error_type` string, required — Type of the error.
    - `group` string — The location name
    - `history` array[] — The state transition history for the monitor, represented as an array of pairs. Each pair is an array where the first element is the transition timestamp in Unix epoch format (integer) and the second element is the state (integer). For the state, an integer value of `0` indicates uptime, `1` indicates downtime, and `2` indicates no data.
      - number[] — An array of transitions
    - `span_precision` number, double — The number of decimal places to which the SLI value is accurate for the given from-to timestamps.
    - `uptime` number, double — The overall uptime.
  - `public_id` string — A Synthetic test ID.
  - `to_ts` integer — Timestamp in seconds for the end of uptime.

## Other responses

- `400` — - JSON format is wrong
- `403` — Forbidden
- `429` — Too many requests

---

[API](https://skmtc.net/datadog/apis/api-v1.md) · [All operations](https://skmtc.net/datadog/apis/api-v1/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/datadog/api-v1/revisions/ca5871004d26/schema)
