API · v1.4.0
REST API
Mindent, amit a webes felület csinál, ezen az API-n keresztül csinál, tehát amire kattintani tud, azt szkriptből is elérheti. 101 végpont, erőforrásonként csoportosítva. Az alábbi referencia az 1.4.0 verzió OpenAPI-dokumentumából készül; a végpontok leírása angol, ahogy a termékben.
A teljes OpenAPI-dokumentum (JSON). A saját példánya ugyanezt a dokumentumot itt szolgálja ki: /api/v1/openapi.json.
Alapcím
Minden lenti útvonal a saját példánya /api/v1 címéhez képest értendő, például http://localhost:3000/api/v1.
Hitelesítés
Szkriptekhez és integrációkhoz hozzon létre API-tokent a munkaterület beállításaiban (vagy a POST /workspaces/{workspace}/tokens végponttal), és küldje bearer tokenként. A token egy munkaterülethez tartozik, és csak azokat a jogosultságokat kapja meg, amelyeket Ön megad neki, például monitors:read vagy incidents:write.
A webes felület maga sütis munkamenetet használ CSRF-tokennel; a README ezt a folyamatot mutatja be az első beállítás szkripteléséhez.
Példa
curl -s \
-H "Authorization: Bearer $INTRAWATCH_TOKEN" \
-H "Accept: application/json" \
http://localhost:3000/api/v1/workspaces/acme-ops/monitors
Setup
- GET
/setup - POST
/Complete the first-run setup. Must be called as a stateful (cookie) request: send ansetup Originthat matchesAPP_URLand theX-XSRF-TOKENobtained fromGET /sanctum/csrf-cookie
Authentication
- POST
/Send a reset link to the given userauth/ forgot-password - POST
/Attempt to authenticate a new sessionauth/ login - POST
/Destroy an authenticated sessionauth/ logout - POST
/Reset the user's passwordauth/ reset-password - POST
/Attempt to authenticate a new session using the two factor authentication codeauth/ two-factor-challenge - POST
/Confirm the user's passwordauth/ user/ confirm-password - GET
/Get the password confirmation statusauth/ user/ confirmed-password-status - POST
/Enable two factor authentication for the userauth/ user/ confirmed-two-factor-authentication - POST
/Enable two factor authentication for the userauth/ user/ two-factor-authentication - DELETE
/Disable two factor authentication for the userauth/ user/ two-factor-authentication - GET
/Get the SVG element for the user's two factor authentication QR codeauth/ user/ two-factor-qr-code - GET
/Get the two factor authentication recovery codes for authenticated userauth/ user/ two-factor-recovery-codes - POST
/Generate a fresh set of two factor authentication recovery codesauth/ user/ two-factor-recovery-codes - GET
/Get the current user's two factor authentication setup / secret keyauth/ user/ two-factor-secret-key
Me
- GET
/me - PUT
/Change the passwordme/ password - GET
/List my sessionsme/ sessions - POST
/Sign out all other sessionsme/ sessions/ sign-out-others - DELETE
/Sign out one sessionme/ sessions/ {id}
Workspaces
Monitors
- GET
/workspaces/ {workspace}/ monitors - POST
/workspaces/ {workspace}/ monitors - POST
/workspaces/ {workspace}/ monitors/ bulk - GET
/workspaces/ {workspace}/ monitors/ {monitor} - PATCH
/workspaces/ {workspace}/ monitors/ {monitor} - DELETE
/workspaces/ {workspace}/ monitors/ {monitor} - GET
/List one monitor's alerts, newest first. Filters:workspaces/ {workspace}/ monitors/ {monitor}/ alerts kind,since(ISO 8601, inclusive) - POST
/workspaces/ {workspace}/ monitors/ {monitor}/ check - GET
/List the monitor's events (status changes and changes of watched values), newest first. Filter:workspaces/ {workspace}/ monitors/ {monitor}/ events kind - POST
/workspaces/ {workspace}/ monitors/ {monitor}/ pause - POST
/workspaces/ {workspace}/ monitors/ {monitor}/ push-token - GET
/List the monitor's raw check results, newest first. Raw results are kept forworkspaces/ {workspace}/ monitors/ {monitor}/ results RETENTION_RAW_HOURS. Filters:from,to(ISO 8601),status - POST
/workspaces/ {workspace}/ monitors/ {monitor}/ resume - GET
/List the monitor's rollups of one bucket size, oldest first. Day buckets start at midnight in the workspace timezone.workspaces/ {workspace}/ monitors/ {monitor}/ rollups availabilityis (up + degraded + pending) / (total - maintenance), or null when every check fell into maintenance. Filters:bucket(required),from,to(ISO 8601, applied to the bucket start)
Push
- GET
/Report a heartbeat or a successful cron runpush/ {token} - GET
/Report a failurepush/ {token}/ fail - GET
/Report that a cron run has startedpush/ {token}/ start - GET
/Report a finished cron run by its exit codepush/ {token}/ {exitCode}
Tags
Alerts
- GET
/List the workspace's alerts, newest first. Filters:workspaces/ {workspace}/ alerts monitor_id,kind,since(ISO 8601, inclusive)
Notification channels
- GET
/workspaces/ {workspace}/ notification-channels - POST
/workspaces/ {workspace}/ notification-channels - POST
/Sends a test notification through a channel described by the request body, which is not savedworkspaces/ {workspace}/ notification-channels/ test - GET
/workspaces/ {workspace}/ notification-channels/ {channel} - PATCH
/workspaces/ {workspace}/ notification-channels/ {channel} - DELETE
/workspaces/ {workspace}/ notification-channels/ {channel} - POST
/Sends a test notification through a saved channelworkspaces/ {workspace}/ notification-channels/ {channel}/ test
Incidents
- GET
/Lists the incidents of the workspace, newest start firstworkspaces/ {workspace}/ incidents - POST
/Creates an incident with its first timeline updateworkspaces/ {workspace}/ incidents - GET
/workspaces/ {workspace}/ incidents/ {incident} - PATCH
/Updates the incident's own fields and targets; omitted fields keep their stored valueworkspaces/ {workspace}/ incidents/ {incident} - DELETE
/workspaces/ {workspace}/ incidents/ {incident} - POST
/Adds a timeline entry. The incident takes the entry's status;workspaces/ {workspace}/ incidents/ {incident}/ updates resolvedstamps the resolution time and any open status after a resolution reopens the incident - PATCH
/Edits the message of a timeline entry; its status and time stay as recordedworkspaces/ {workspace}/ incidents/ {incident}/ updates/ {update} - DELETE
/Removes a timeline entry and recomputes the incident's status from the latest remaining one. The only entry cannot be removed; delete the incident insteadworkspaces/ {workspace}/ incidents/ {incident}/ updates/ {update}
Maintenances
- GET
/Lists the maintenances of the workspaceworkspaces/ {workspace}/ maintenances - POST
/workspaces/ {workspace}/ maintenances - GET
/workspaces/ {workspace}/ maintenances/ {maintenance} - PATCH
/workspaces/ {workspace}/ maintenances/ {maintenance} - DELETE
/workspaces/ {workspace}/ maintenances/ {maintenance} - POST
/Ends a one-off maintenance now. Recurring ones are switched off withworkspaces/ {workspace}/ maintenances/ {maintenance}/ end active: falseinstead
Status pages
- GET
/Lists the status pages of the workspace without their layoutworkspaces/ {workspace}/ status-pages - POST
/workspaces/ {workspace}/ status-pages - GET
/workspaces/ {workspace}/ status-pages/ {statusPage} - PATCH
/workspaces/ {workspace}/ status-pages/ {statusPage} - DELETE
/workspaces/ {workspace}/ status-pages/ {statusPage} - PUT
/Replaces all sections and items of the page. The order of the arrays is the display orderworkspaces/ {workspace}/ status-pages/ {statusPage}/ layout
Imports
- GET
/List the workspace's imports, newest firstworkspaces/ {workspace}/ imports - POST
/Upload an Uptime Kuma SQLite database or 1.23 JSON backup and queue its analysisworkspaces/ {workspace}/ imports - GET
/Show an import with its reportworkspaces/ {workspace}/ imports/ {import} - DELETE
/Delete an import and its stored fileworkspaces/ {workspace}/ imports/ {import} - POST
/Run an analysed importworkspaces/ {workspace}/ imports/ {import}/ run
Members
- GET
/workspaces/ {workspace}/ members - POST
/Invites an address into the workspace. Every address gets the same answer and the same e-mail, whether or not an account exists for it; only an address that is already a member is refused. Inviting the same address again replaces the pending invitation and its linkworkspaces/ {workspace}/ members - PATCH
/workspaces/ {workspace}/ members/ {user} - DELETE
/workspaces/ {workspace}/ members/ {user}
Invitations
- POST
/Accepts an invitation addressed to the signed-in user's e-mail. Unknown, expired, revoked, already accepted and foreign invitations, and those whose inviter can no longer grant the role, all fail with the same 422invitations/ accept - GET
/Invitations not accepted yet, expired ones included (flagged), newest firstworkspaces/ {workspace}/ invitations - DELETE
/Revokes an invitation; its link stops working at once. Only an owner revokes an owner invitationworkspaces/ {workspace}/ invitations/ {invitation}
Tokens
Audit
- GET
/List audit events of the workspace, newest first. Filters:workspaces/ {workspace}/ audit action,actor_id,actor_type,actor_user_id
Changelog
- GET
/List the releases, newest first, paginatedchangelog - GET
/The newest released versionchangelog/ latest - GET
/One release by version numberchangelog/ {version}
Manual
- GET
/The manual tree: sections in order, each with its chaptersmanual - GET
/One rendered chapter by slug (manual/ chapter section/chapter) - GET
/Full-text search; returns matching chapters with a short plain-text snippetmanual/ search
Meta
- GET
/monitor-types - GET
/notification-channel-types - GET
/The OpenAPI document describing this APIopenapi.json - GET
/ping