Skip to content

Uptime

GET
/project/{id}/uptime
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

id
required
string

A unique project ID

Example
5e9602e7a39e5a46428b457f
start
required
string

Period start date in ISO8601 format

Example
2022-10-31T00:00:00.000+01:00
end
string

Period end date in ISO8601 format (default now)

Example
2022-10-31T00:00:00.000+01:00

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
default: Access denied! Please log in to access this resource.
code

Error code number

integer
default: 401
ok
boolean
error
boolean
default: true
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 needs editTests, and so on. See Project permissions.
Media typeapplication/json
object
message

Error message text

string
default: Sorry! Your current plan does not support access to Testomato API.
code

Error code number

integer
default: 403
ok
boolean
error
boolean
default: true
Example
{
"message": "Sorry! Your current plan does not support access to Testomato API.",
"code": 403,
"ok": false,
"error": true
}