Skip to content

A Monitor's days

GET
/projects/{projectId}/monitors/{monitorId}/uptime/days
Code sample: Shell / cURL
curl --request GET \
--url 'https://api.uup.dev/v1/projects/prj_01J9Z3K8X4M2N6P8Q0R2S4T6V8/monitors/example/uptime/days?days=90' \
--header 'Authorization: Bearer <token>'

Its last days days, oldest first and ending today, each cut at midnight in the Project’s timezone, with the Incidents that touched it.

projectId
required

The Project’s identifier, prj_….

string

Example

prj_01J9Z3K8X4M2N6P8Q0R2S4T6V8

The Project’s identifier, prj_….

monitorId
required

The Monitor’s identifier, mon_….

string

The Monitor’s identifier, mon_….

days

How many days back, today included: 90 at most.

integer
default: 90 >= 1 <= 90

How many days back, today included: 90 at most.

The days.

Media typeapplication/json

A Monitor’s last days, oldest first.

object
monitorId
required
string
timezone
required

The Project’s timezone, which cuts the days.

string
days
required
Array<object>
object
date
required

YYYY-MM-DD, in the Project’s timezone.

string
startsAt
required

Its local midnight.

string format: date-time
endsAt
required

The next local midnight.

string format: date-time
percentage
required

From 0 to 1, unrounded: 1 − incidentSeconds / measuredSeconds. Null when nothing was measured.

number | null
coveredSeconds
required

The seconds it was checked, measured or not: measuredSeconds + notMeasuredSeconds.

number
measuredSeconds
required

The seconds it was checked and measured.

number
incidentSeconds
required

The seconds of those inside an Incident.

number
notMeasuredSeconds
required

The seconds it was checked but You Up? could not measure.

number
notMeasuredHours
required

The hours You Up? could not measure, left out of the figure. A part hour is one.

integer
notCoveredSeconds
required

The seconds it was not checked, by why.

object
not_yet_monitored
required
number
paused
required
number
suspended
required
number
deleted
required
number
incidents
required

The Incidents that touched the day, retracted ones too.

Array<object>
object
id
required

inc_…

string
openedAt
required

When it opened.

string format: date-time
resolvedAt
required

When it ended, or null.

string | null format: date-time
resolution
required
string | null
Allowed values: recovered retracted check_disabled monitor_paused suspended manually_resolved
incidentSeconds
required

Its seconds on this day.

number

Example

{
"days": [
{
"incidents": [
{
"resolution": "recovered"
}
]
}
]
}

The request was refused: invalid_request names the field at fault.

Media typeapplication/json

A refusal.

object
error
required
object
code
required

What was refused, stable across releases. New codes may be added, so handle a code you do not know as its status says.

string
Allowed values: invalid_request bad_identifier unauthenticated forbidden not_found not_entitled rate_limited interval_below_floor timeout_below_floor url_missing check_not_applicable port_blocked target_cap_reached too_few_locations location_unavailable uptime_always_on monitor_busy monitor_suspended project_suspended validation_required validation_unavailable validation_rate_limited validation_expired validation_mismatch validation_failed default_rule_is_fixed name_taken paid_needs_email paid_rule_sends_nothing webhook_url_refused address_refused event_type_not_on_monitor too_many_webhooks url_taken
message
required

What to do, in the dashboard’s words. It may change, so never branch on it.

string
field

The field at fault, on a 400 invalid_request.

string
kind

On a 402 not_entitled: what the Plan allows no more of.

string
Allowed values: project monitor heartbeat location
plan

On a 402: the Plan’s name.

string
limit

On a 402: what the Plan allows. On a 422 target_cap_reached: the cap’s figure.

integer
used

On a 402: what is in use, or for locations, how many were asked.

integer
cap

On a 422 target_cap_reached: which cap the Monitor would pass.

string
key

On a 422 target_cap_reached: the site the cap counts, by its host.

string
location

On a 422 target_cap_reached: the location the cap was reached from.

string
current

On a 422 target_cap_reached: what the cap counts now, before this Monitor.

integer
rules

On a 409 paid_needs_email: the names of the saved rules it would break.

Array<string>
eventTypes

On a 400 event_type_not_on_monitor: the events this Monitor never sends.

Array<string>

Example

{
"error": {
"code": "invalid_request",
"kind": "project"
}
}

No working API token: unauthenticated.

Media typeapplication/json

A refusal.

object
error
required
object
code
required

What was refused, stable across releases. New codes may be added, so handle a code you do not know as its status says.

string
Allowed values: invalid_request bad_identifier unauthenticated forbidden not_found not_entitled rate_limited interval_below_floor timeout_below_floor url_missing check_not_applicable port_blocked target_cap_reached too_few_locations location_unavailable uptime_always_on monitor_busy monitor_suspended project_suspended validation_required validation_unavailable validation_rate_limited validation_expired validation_mismatch validation_failed default_rule_is_fixed name_taken paid_needs_email paid_rule_sends_nothing webhook_url_refused address_refused event_type_not_on_monitor too_many_webhooks url_taken
message
required

What to do, in the dashboard’s words. It may change, so never branch on it.

string
field

The field at fault, on a 400 invalid_request.

string
kind

On a 402 not_entitled: what the Plan allows no more of.

string
Allowed values: project monitor heartbeat location
plan

On a 402: the Plan’s name.

string
limit

On a 402: what the Plan allows. On a 422 target_cap_reached: the cap’s figure.

integer
used

On a 402: what is in use, or for locations, how many were asked.

integer
cap

On a 422 target_cap_reached: which cap the Monitor would pass.

string
key

On a 422 target_cap_reached: the site the cap counts, by its host.

string
location

On a 422 target_cap_reached: the location the cap was reached from.

string
current

On a 422 target_cap_reached: what the cap counts now, before this Monitor.

integer
rules

On a 409 paid_needs_email: the names of the saved rules it would break.

Array<string>
eventTypes

On a 400 event_type_not_on_monitor: the events this Monitor never sends.

Array<string>

Example

{
"error": {
"code": "invalid_request",
"kind": "project"
}
}

This token may not do this: forbidden.

Media typeapplication/json

A refusal.

object
error
required
object
code
required

What was refused, stable across releases. New codes may be added, so handle a code you do not know as its status says.

string
Allowed values: invalid_request bad_identifier unauthenticated forbidden not_found not_entitled rate_limited interval_below_floor timeout_below_floor url_missing check_not_applicable port_blocked target_cap_reached too_few_locations location_unavailable uptime_always_on monitor_busy monitor_suspended project_suspended validation_required validation_unavailable validation_rate_limited validation_expired validation_mismatch validation_failed default_rule_is_fixed name_taken paid_needs_email paid_rule_sends_nothing webhook_url_refused address_refused event_type_not_on_monitor too_many_webhooks url_taken
message
required

What to do, in the dashboard’s words. It may change, so never branch on it.

string
field

The field at fault, on a 400 invalid_request.

string
kind

On a 402 not_entitled: what the Plan allows no more of.

string
Allowed values: project monitor heartbeat location
plan

On a 402: the Plan’s name.

string
limit

On a 402: what the Plan allows. On a 422 target_cap_reached: the cap’s figure.

integer
used

On a 402: what is in use, or for locations, how many were asked.

integer
cap

On a 422 target_cap_reached: which cap the Monitor would pass.

string
key

On a 422 target_cap_reached: the site the cap counts, by its host.

string
location

On a 422 target_cap_reached: the location the cap was reached from.

string
current

On a 422 target_cap_reached: what the cap counts now, before this Monitor.

integer
rules

On a 409 paid_needs_email: the names of the saved rules it would break.

Array<string>
eventTypes

On a 400 event_type_not_on_monitor: the events this Monitor never sends.

Array<string>

Example

{
"error": {
"code": "invalid_request",
"kind": "project"
}
}

No such thing, or not one this token reaches: not_found.

Media typeapplication/json

A refusal.

object
error
required
object
code
required

What was refused, stable across releases. New codes may be added, so handle a code you do not know as its status says.

string
Allowed values: invalid_request bad_identifier unauthenticated forbidden not_found not_entitled rate_limited interval_below_floor timeout_below_floor url_missing check_not_applicable port_blocked target_cap_reached too_few_locations location_unavailable uptime_always_on monitor_busy monitor_suspended project_suspended validation_required validation_unavailable validation_rate_limited validation_expired validation_mismatch validation_failed default_rule_is_fixed name_taken paid_needs_email paid_rule_sends_nothing webhook_url_refused address_refused event_type_not_on_monitor too_many_webhooks url_taken
message
required

What to do, in the dashboard’s words. It may change, so never branch on it.

string
field

The field at fault, on a 400 invalid_request.

string
kind

On a 402 not_entitled: what the Plan allows no more of.

string
Allowed values: project monitor heartbeat location
plan

On a 402: the Plan’s name.

string
limit

On a 402: what the Plan allows. On a 422 target_cap_reached: the cap’s figure.

integer
used

On a 402: what is in use, or for locations, how many were asked.

integer
cap

On a 422 target_cap_reached: which cap the Monitor would pass.

string
key

On a 422 target_cap_reached: the site the cap counts, by its host.

string
location

On a 422 target_cap_reached: the location the cap was reached from.

string
current

On a 422 target_cap_reached: what the cap counts now, before this Monitor.

integer
rules

On a 409 paid_needs_email: the names of the saved rules it would break.

Array<string>
eventTypes

On a 400 event_type_not_on_monitor: the events this Monitor never sends.

Array<string>

Example

{
"error": {
"code": "invalid_request",
"kind": "project"
}
}

Too many requests: rate_limited. Retry-After says when to try again.

Media typeapplication/json

A refusal.

object
error
required
object
code
required

What was refused, stable across releases. New codes may be added, so handle a code you do not know as its status says.

string
Allowed values: invalid_request bad_identifier unauthenticated forbidden not_found not_entitled rate_limited interval_below_floor timeout_below_floor url_missing check_not_applicable port_blocked target_cap_reached too_few_locations location_unavailable uptime_always_on monitor_busy monitor_suspended project_suspended validation_required validation_unavailable validation_rate_limited validation_expired validation_mismatch validation_failed default_rule_is_fixed name_taken paid_needs_email paid_rule_sends_nothing webhook_url_refused address_refused event_type_not_on_monitor too_many_webhooks url_taken
message
required

What to do, in the dashboard’s words. It may change, so never branch on it.

string
field

The field at fault, on a 400 invalid_request.

string
kind

On a 402 not_entitled: what the Plan allows no more of.

string
Allowed values: project monitor heartbeat location
plan

On a 402: the Plan’s name.

string
limit

On a 402: what the Plan allows. On a 422 target_cap_reached: the cap’s figure.

integer
used

On a 402: what is in use, or for locations, how many were asked.

integer
cap

On a 422 target_cap_reached: which cap the Monitor would pass.

string
key

On a 422 target_cap_reached: the site the cap counts, by its host.

string
location

On a 422 target_cap_reached: the location the cap was reached from.

string
current

On a 422 target_cap_reached: what the cap counts now, before this Monitor.

integer
rules

On a 409 paid_needs_email: the names of the saved rules it would break.

Array<string>
eventTypes

On a 400 event_type_not_on_monitor: the events this Monitor never sends.

Array<string>

Example

{
"error": {
"code": "invalid_request",
"kind": "project"
}
}