Uptime
GET
/project/{id}/uptime
const url = 'https://testomato.com/api/project/5e9602e7a39e5a46428b457f/uptime?start=2022-10-31T00%3A00%3A00.000%2B01%3A00&end=2022-10-31T00%3A00%3A00.000%2B01%3A00';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url 'https://testomato.com/api/project/5e9602e7a39e5a46428b457f/uptime?start=2022-10-31T00%3A00%3A00.000%2B01%3A00&end=2022-10-31T00%3A00%3A00.000%2B01%3A00' \ --header 'Authorization: Bearer <token>'Return uptimes by days
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”id
required
string
A unique project ID
Example
5e9602e7a39e5a46428b457fQuery Parameters
Section titled “Query Parameters”Responses
Section titled “Responses”Response times
Media typeapplication/json
object
from
string format: date-time
to
string format: date-time
daysCount
Number of days in the period
integer format: int32
isUptimeEnabled
Is uptime enabled for this project
boolean
uptime
Uptime for the whole period
object
up
number
down
number
timeout
number
uptimeByDays
Uptime by days (can be empty if uptime data is not available)
Array<object>
object
date
string format: date-time
up
number
down
number
timeout
integer format: int32
Example
{ "from": "2022-11-25T00:00:00+01:00", "to": "2022-12-01T14:10:08+01:00", "daysCount": 6, "isUptimeEnabled": true, "uptime": { "up": 97.856313311777, "down": 1.2870556603245, "timeout": 0.85663102789809 }, "uptimeByDays": [ { "date": "2022-11-25T00:00:00+01:00", "up": 99.853140098274, "down": 0.14685990172585, "timeout": 0 } ]}The API token is missing, malformed or expired. Request a new one from
POST /api/authenticate.
Media typeapplication/json
object
message
Error message text
string
code
Error code number
integer
ok
boolean
error
boolean
Example
{ "message": "Access denied! Please log in to access this resource.", "code": 401, "ok": false, "error": true}The token is valid but the operation is not allowed. Two distinct causes:
- the subscription plan does not include API access — every endpoint returns this, regardless of the resource
- the account lacks the required role on the project — reading needs
read, changing checks needseditTests, and so on. See Project permissions.
Media typeapplication/json
object
message
Error message text
string
code
Error code number
integer
ok
boolean
error
boolean
Example
{ "message": "Sorry! Your current plan does not support access to Testomato API.", "code": 403, "ok": false, "error": true}