WebPixie

Uptime

Query and manage uptime monitors through the WebPixie GraphQL API.

Uptime monitors are called UptimeLink in the API, for example findUptimeLink and createUptimeLink.

Some features and limits mentioned on this page vary by plan. Visit our Pricing page to review the plans.

Fields

FieldTypeDescription
idID!Unique identifier for the uptime monitor.
nameString!The monitor's display name.
targetString!The URL being checked.
typeUptimeLinkType!The check type — currently always HTTP.
statusUptimeLinkStatusType!ACTIVE or PASSIVE (paused).
severityInt!Numeric severity for sorting and the SEVERITY filter — higher means more urgent.
locations[UptimeLocations!]Monitoring locations the check runs from.
checkIntervalInt!Seconds between checks.
timeoutInt!Request timeout in seconds.
httpUptimeLinkHttpHTTP-specific check configuration.
notificationUptimeLinkNotificationConfig!Notification settings.
tags[String!]Free-form tags attached to the monitor — see Tags & Folders.
isFavoriteBoolean!Whether the monitor is marked as a favorite.
commonNameString!The monitor's name as shown on its public status page, derived from the target if not explicitly set.
domain / rootDomainStringDerived from target.
lastRecordUptimeLinkLastRecordMost recent check result — same fields as findUptimeLinkRecord's items, minus uptimeLinkId/verifiesRecordId.
lastAccessibilityUptimeLinkLastAccessibility!Last known up/down transition timestamps.
nextCheckTimeStringISO 8601 timestamp of the next scheduled check.
createTime / updateTimeString! / StringISO 8601 timestamps for creation / last update.

UptimeLinkHttp

FieldTypeDescription
methodStringHTTP method used for the check.
followRedirectBooleanWhether HTTP redirects are followed.
headers[KeyValue!]Custom request headers sent with the check.
dataHttpBodyRequest body sent with the check.
authHttpAuthHTTP authentication used for the check.
statusCodes[Int!]Status codes counted as "up". When empty, any status code counts as up.
keywords[String!]Keywords the response body must (or must not) contain.
keywordInverseMatchBooleanWhen true, the check fails if a keyword IS found, instead of not found.

UptimeLinkLastAccessibility

FieldTypeDescription
upStringISO 8601 timestamp of the most recent transition to up.
downStringISO 8601 timestamp of the most recent transition to down.

UptimeLinkNotificationConfig

FieldTypeDescription
allBoolean!Whether notifications are on.
occurrenceThresholdInt!Number of consecutive down occurrences required before the create-notification is sent. Defaults to 1.

Queries

Paginated, filterable list of your uptime monitors.

query {
  findUptimeLink(query: "status = ACTIVE", limit: 25) {
    pagination {
      count
    }
    items {
      id
      name
      target
      status
      lastRecord {
        accessibilityStatus
        spendTime
      }
    }
  }
}

Parameters

NameTypeDescription
queryStringFilter expression — see Discovering Filterable Fields.
pageIntPage number, defaults to 1.
limitIntPage size, defaults to 10, capped at 100.
sort[Sort!]Sort order, defaults to newest first.

Response: an UptimeLinkList — pagination + items: [UptimeLink!]!. See Pagination & Sorting.

findUptimeLinkRecord

Individual check results, also paginated and filterable.

query {
  findUptimeLinkRecord(query: "uptimeLinkId = \"...\"", limit: 25) {
    items {
      location
      accessibilityStatus
      spendTime
      startTime
    }
  }
}

Parameters

NameTypeDescription
queryStringFilter expression — see Discovering Filterable Fields.
pageIntPage number, defaults to 1.
limitIntPage size, defaults to 10, capped at 100.
sort[Sort!]Sort order, defaults to newest first.

Response: an UptimeLinkRecordList — pagination + items: [UptimeLinkRecord!]!. See Pagination & Sorting.

FieldTypeDescription
idID!Unique identifier for this check result.
locationUptimeLocations!Monitoring location the check ran from.
spendTimeFloat!Seconds the check took to complete.
pageWebpageThe fetched page's response data, if the check succeeded.
uptimeLinkSnapshotUptimeLinkBaseSnapshot of the monitor's configuration at the time of this check.
errorUptimeErrorCodeSet if the check failed.
accessibilityStatusUptimeLinkAccessibilityStatusWhether the target was reachable on this check — UP, DOWN, or UNVERIFIED when the check failed but a re-check from another location succeeded.
startTime / endTimeString!ISO 8601 timestamps for when the check started/finished.
uptimeLinkIdID!ID of the uptime monitor this record belongs to.
verifiesRecordIdIDID of the failing record this check re-verified from another location, if any.

findUptimeLinkSummary

Aggregated uptime/response-time stats for a monitor over a time range, bucketed into chunks.

query {
  findUptimeLinkSummary(
    id: "..."
    startTime: "2024-01-01T00:00:00Z"
    endTime: "2024-01-31T23:59:59Z"
    chunkSize: 24
  ) {
    responseTime
    uptimePercent
  }
}

Parameters

NameTypeDescription
idID!The uptime monitor's ID.
startTimeString!ISO 8601 start of the time range.
endTimeString!ISO 8601 end of the time range. The range must be at least 1 hour and covers at most 90 days; a longer range is shortened to the 90 days ending at endTime.
chunkSizeInt!Number of buckets to split the time range into (clamped to 7–30). Defaults to 24.
locationUptimeLocationsLimit the summary to one monitoring location.

Response: an UptimeLinkSummary — see Types: UptimeLinkSummaryRecord for the shape of each item in records.

FieldTypeDescription
responseTimeFloat!Median response time in seconds; 0 if there were no checks.
uptime / uptimePercentFloat!Time the monitor was up, in seconds and as a percentage (0-100) of monitored time.
downtime / downtimePercentFloat!Time the monitor was down, in seconds and as a percentage (0-100) of monitored time.
unmonitored / unmonitoredPercentFloat!Time with no check data, in seconds and as a percentage (0-100) of the whole period.
records[UptimeLinkSummaryRecord!]!Stats per time bucket.
incidents[UptimeIncident!]!Incidents of this monitor that overlap the time range.

uptimeLocation

Lists the monitoring locations your workspace can use. No arguments.

Only locations enabled for your workspace are returned. Paid plans can see additional locations, and a new location can be opened on request, within 24 hours — contact Support.

Response: an UptimeLocationList — items: [UptimeLocationItem!]!:

FieldTypeDescription
nameString!Human-readable name of the monitoring location.
locationUptimeLocations!The location's identifier, used in locations args.

Mutations

Creates a new uptime monitor.

mutation {
  createUptimeLink(input: {
    target: "https://acme.io"
    checkInterval: 300
    timeout: 10
    notification: { all: true }
  }) {
    id
    name
    status
  }
}

Parameters

NameTypeDescription
inputUptimeLinkInput!The monitor's configuration — see below.

UptimeLinkInput fields

FieldTypeDefaultDescription
targetString!—The URL to check (http/https).
locations[UptimeLocations!]nullMonitoring locations to check from. Omit to let WebPixie choose.
typeUptimeLinkType!HTTPThe check type — currently always HTTP.
timeoutInt!10Request timeout in seconds, up to 15.
httpUptimeLinkHttpInputnullHTTP-specific check configuration.
statusUptimeLinkStatusType!ACTIVEWhether the monitor starts active or paused.
notificationUptimeLinkNotificationConfigInputnullNotification settings.
checkIntervalInt!3600Seconds between checks, up to 86400 (24 hours). The minimum depends on your plan and is available as uptimeLinkMinInterval in your plan's capabilities.
nameStringnullDisplay name for the monitor.
commonNameStringnullThe monitor's name as shown on its public status page, derived from the target if omitted.
tags[String!]nullFree-form tags to attach.

UptimeLinkHttpInput fields

FieldTypeDefaultDescription
methodString"GET"HTTP method to use for the check.
followRedirectBooleantrueWhether to follow HTTP redirects.
headers[KeyValueInput!]nullCustom request headers to send with the check.
dataHttpBodyInputnullRequest body to send with the check.
authHttpAuthInputnullHTTP authentication to use for the check. Stored passwords and tokens are never returned; see the link for update behavior.
statusCodes[Int!]nullStatus codes to count as "up". Omit or leave empty to accept any status code as up.
keywords[String!]nullKeywords the response body must (or must not) contain.
keywordInverseMatchBooleannullWhen true, the check fails if a keyword IS found, instead of not found.

Response: the created UptimeLink (see Fields above).

Limits: creation fails once your workspace has reached its plan's uptime monitor limit, or once you have created that many monitors in one day (UTC). Deleted monitors still count toward that day's total.

Updates an existing uptime monitor. Fields you leave out are unchanged, with one exception: http replaces the whole HTTP configuration (method, headers, body, status codes, keywords and authentication), so send the complete http object, not only the setting you want to change.

mutation {
  updateUptimeLink(id: "...", input: { checkInterval: 300 }) {
    id
    checkInterval
  }
}

Parameters

NameTypeDescription
idID!The uptime monitor's ID.
inputUptimeLinkUpdateInput!Fields to update — the same fields as UptimeLinkInput above (including target), all optional here. Omitted fields are left unchanged (except http, see above).

Response: the updated UptimeLink.

mutation {
  deleteUptimeLink(id: "...") {
    affectedRecords
  }
}
mutation {
  bulkDeleteUptimeLink(ids: ["...", "..."]) {
    affectedRecords
  }
}

Parameters

NameTypeDescription
id (single)ID!The uptime monitor's ID.
ids (bulk)[ID!]!IDs of the uptime monitors to delete. At most 100 per request.

Response: a DeleteResult — { affectedRecords: Int! }.

Toggle status between ACTIVE and PASSIVE for one or more monitors, without deleting them.

mutation {
  pauseUptimeLink(ids: ["...", "..."]) {
    affectedRecords
  }
}

Parameters

NameTypeDescription
ids[ID!]!IDs of the uptime monitors to pause/resume. At most 100 per request.

Response: an UpdateResult — { affectedRecords: Int! }.

On this page