Skip to content

Get a project's uptime report

GET
/api/v1/projects/{projectId}/sla
curl --request GET \
--url https://app.monitorly.cloud/api/v1/projects/PROJECT_ID/sla \
--header 'Authorization: Bearer <token>'

The uptime report of every check of the project, by name, and their total.

projectId
required
string format: uuid

The project’s id.

Example

PROJECT_ID
month
string

YYYY-MM: the calendar month in the workspace timezone. Without month, from and to, the current month.

from
string

RFC 3339, together with to; not with month.

to
string

RFC 3339, together with from; at most 367 days after it.

The report.

Media typeapplication/json
object
checks
required

One row per check, by name; for a check report only that check.

Array
object
acknowledged
required

Of incidents, those acknowledged by now.

integer format: int64
degradedMs
required
integer format: int64
downMs
required

Downtime: DOWN time, the only time that counts against uptime.

integer format: int64
incidents
required

Incidents opened in the range.

integer format: int64
maintenanceMs
required

Excluded from uptime.

integer format: int64
mttaMs

Mean time to acknowledge over acknowledged; null without any.

integer | null format: int64
mttrMs

Mean time to resolve over resolved; null without any.

integer | null format: int64
noDataMs
required

No decision yet, or too few nodes had data; excluded from uptime.

integer format: int64
resolved
required

Of incidents, those closed by now.

integer format: int64
unknownMs
required

Excluded from uptime.

integer format: int64
upMs
required
integer format: int64
uptimePercent

(up + degraded) / (up + degraded + down) × 100; null when nothing in the range was decided.

number | null format: double
checkId
required
string format: uuid
checkName
required
string
from
required
string
measuredTo
required

Time after this (now, when the range reaches into the future) is not measured yet.

string
projectId
required
string format: uuid
timezone
required

The workspace timezone the month was taken in.

string
to
required
string
total
required

For a check report equal to its row.

object
acknowledged
required

Of incidents, those acknowledged by now.

integer format: int64
degradedMs
required
integer format: int64
downMs
required

Downtime: DOWN time, the only time that counts against uptime.

integer format: int64
incidents
required

Incidents opened in the range.

integer format: int64
maintenanceMs
required

Excluded from uptime.

integer format: int64
mttaMs

Mean time to acknowledge over acknowledged; null without any.

integer | null format: int64
mttrMs

Mean time to resolve over resolved; null without any.

integer | null format: int64
noDataMs
required

No decision yet, or too few nodes had data; excluded from uptime.

integer format: int64
resolved
required

Of incidents, those closed by now.

integer format: int64
unknownMs
required

Excluded from uptime.

integer format: int64
upMs
required
integer format: int64
uptimePercent

(up + degraded) / (up + degraded + down) × 100; null when nothing in the range was decided.

number | null format: double

Example

{
"checks": [
{
"checkId": "CHECK_ID"
}
],
"projectId": "PROJECT_ID"
}

Bad Request.

  • request.malformed: the body or a parameter is not of the expected shape
  • auth.credentials_conflict: the request carries both a session cookie and a token
Media typeapplication/problem+json
object
detail
string | null
errors
required

Field errors, empty for errors of the whole request.

Array<object>
object
code
required
string
params
required
object
key
additional properties
pointer
required

JSON pointer into the request body.

string
status
required
integer format: int32
title
required
string
type
required

Stable code, for example check.timeout_exceeds_interval.

string

Example generated

{
"detail": "example",
"errors": [
{
"code": "example",
"params": {
"additionalProperty": "example"
},
"pointer": "example"
}
],
"status": 1,
"title": "example",
"type": "example"
}

Unauthorized.

  • auth.unauthenticated, auth.session_expired: no session, or it ended
  • token.invalid: the token is malformed, unknown, revoked or expired, or its creator left the workspace
Media typeapplication/problem+json
object
detail
string | null
errors
required

Field errors, empty for errors of the whole request.

Array<object>
object
code
required
string
params
required
object
key
additional properties
pointer
required

JSON pointer into the request body.

string
status
required
integer format: int32
title
required
string
type
required

Stable code, for example check.timeout_exceeds_interval.

string

Example generated

{
"detail": "example",
"errors": [
{
"code": "example",
"params": {
"additionalProperty": "example"
},
"pointer": "example"
}
],
"status": 1,
"title": "example",
"type": "example"
}

Forbidden.

  • auth.forbidden: your role is too low for this
  • token.scope_missing: the token lacks the scope this needs; detail names it
Media typeapplication/problem+json
object
detail
string | null
errors
required

Field errors, empty for errors of the whole request.

Array<object>
object
code
required
string
params
required
object
key
additional properties
pointer
required

JSON pointer into the request body.

string
status
required
integer format: int32
title
required
string
type
required

Stable code, for example check.timeout_exceeds_interval.

string

Example generated

{
"detail": "example",
"errors": [
{
"code": "example",
"params": {
"additionalProperty": "example"
},
"pointer": "example"
}
],
"status": 1,
"title": "example",
"type": "example"
}

Not Found.

  • request.not_found: it does not exist, or you cannot see it
Media typeapplication/problem+json
object
detail
string | null
errors
required

Field errors, empty for errors of the whole request.

Array<object>
object
code
required
string
params
required
object
key
additional properties
pointer
required

JSON pointer into the request body.

string
status
required
integer format: int32
title
required
string
type
required

Stable code, for example check.timeout_exceeds_interval.

string

Example generated

{
"detail": "example",
"errors": [
{
"code": "example",
"params": {
"additionalProperty": "example"
},
"pointer": "example"
}
],
"status": 1,
"title": "example",
"type": "example"
}

Unprocessable Entity.

  • field.invalid, field.required: a parameter breaks a rule; errors points at it
  • request.invalid_range: from is not earlier than to
Media typeapplication/problem+json
object
detail
string | null
errors
required

Field errors, empty for errors of the whole request.

Array<object>
object
code
required
string
params
required
object
key
additional properties
pointer
required

JSON pointer into the request body.

string
status
required
integer format: int32
title
required
string
type
required

Stable code, for example check.timeout_exceeds_interval.

string

Example generated

{
"detail": "example",
"errors": [
{
"code": "example",
"params": {
"additionalProperty": "example"
},
"pointer": "example"
}
],
"status": 1,
"title": "example",
"type": "example"
}

Too Many Requests.

  • token.rate_limited: more than 10 requests a second with this token
Media typeapplication/problem+json
object
detail
string | null
errors
required

Field errors, empty for errors of the whole request.

Array<object>
object
code
required
string
params
required
object
key
additional properties
pointer
required

JSON pointer into the request body.

string
status
required
integer format: int32
title
required
string
type
required

Stable code, for example check.timeout_exceeds_interval.

string

Example generated

{
"detail": "example",
"errors": [
{
"code": "example",
"params": {
"additionalProperty": "example"
},
"pointer": "example"
}
],
"status": 1,
"title": "example",
"type": "example"
}
Retry-After
integer
>= 1

Seconds to wait before trying again.