{"openapi":"3.1.0","info":{"title":"NoMore404 API","summary":"Monitors, incidents and maintenance windows, for programs rather than browsers.","version":"1.1.90"},"paths":{"/api/v1/me":{"get":{"tags":["v1"],"summary":"What this token is","operationId":"whoami","security":[{"ApiToken":[]}],"parameters":[{"name":"n404_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"N404 Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MeOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/monitors":{"get":{"tags":["monitors"],"summary":"Every monitor, oldest first","description":"Ordered by the row's own key, ascending, which is what makes the cursor\nstable: a monitor created during the walk lands after the page being read\nrather than shifting it.","operationId":"listMonitors","security":[{"ApiToken":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"n404_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"N404 Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["monitors"],"summary":"Create a monitor","description":"Straight through to `create_monitor`, plan limits and all.\n\nA heartbeat's token is generated in there and is not returned: it is a\ncredential, and the API has no page that can show it once. Read it from\nthe monitor's page, or ask for it after #385 gives it a route of its own.","operationId":"createMonitor","security":[{"ApiToken":[]}],"parameters":[{"name":"n404_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"N404 Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/monitors/{monitor_id}":{"get":{"tags":["monitors"],"summary":"One monitor","operationId":"getMonitor","security":[{"ApiToken":[]}],"parameters":[{"name":"monitor_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Monitor Id"}},{"name":"n404_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"N404 Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["monitors"],"summary":"Change a monitor","description":"Only the fields that were sent. The type is not one of them.","operationId":"updateMonitor","security":[{"ApiToken":[]}],"parameters":[{"name":"monitor_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Monitor Id"}},{"name":"n404_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"N404 Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["monitors"],"summary":"Delete a monitor and its history","description":"Irreversible, and it takes the uptime history with it.\n\nIt is in the API all the same. The alternative, deleting only from the\npanel, would make the Kubernetes controller in #300 impossible to build:\na controller that can create monitors and not remove them leaves a growing\nlist of monitors for services that no longer exist, alerting on all of\nthem. The safety belongs in the caller, which is why every controller of\nthis shape has a flag for it, and why the CLI in #386 will ask.","operationId":"deleteMonitor","security":[{"ApiToken":[]}],"parameters":[{"name":"monitor_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Monitor Id"}},{"name":"n404_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"N404 Session"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/monitors/{monitor_id}/status":{"get":{"tags":["monitors"],"summary":"What this monitor is doing, and its uptime","description":"The current state, and uptime over a window.\n\nThe figure comes from `app/downtime.py`, which is what the dashboard and\nthe status pages read. Two implementations of uptime is how the API and\nthe page come to disagree by a tenth of a percent in front of a customer,\nwho is then right to believe neither.","operationId":"getMonitorStatus","security":[{"ApiToken":[]}],"parameters":[{"name":"monitor_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Monitor Id"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}},{"name":"n404_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"N404 Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/incidents":{"get":{"tags":["incidents"],"summary":"Incidents, newest first","description":"Newest first, which is the order somebody reads them in.\n\nThe cursor is the row's own key, descending, so an incident opening during\nthe walk appears on a page already read rather than shifting the next one.","operationId":"listIncidents","security":[{"ApiToken":[]}],"parameters":[{"name":"state","in":"query","required":false,"schema":{"type":"string","default":"all","title":"State"}},{"name":"monitor","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Monitor"}},{"name":"days","in":"query","required":false,"schema":{"type":"integer","default":30,"title":"Days"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"n404_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"N404 Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IncidentPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/incidents/{incident_id}":{"get":{"tags":["incidents"],"summary":"One incident","operationId":"getIncident","security":[{"ApiToken":[]}],"parameters":[{"name":"incident_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Incident Id"}},{"name":"n404_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"N404 Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IncidentOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/maintenance":{"get":{"tags":["maintenance"],"summary":"Maintenance windows, newest first","operationId":"listMaintenanceWindows","security":[{"ApiToken":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"n404_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"N404 Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaintenancePage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["maintenance"],"summary":"Schedule a maintenance window","description":"Straight through to `app.maintenance.create`, every rule included.\n\nThe point of the feature over the API is the deploy that knows it is about\nto take something down. A pipeline that can open a window before it starts\nand close it after is the difference between a planned release and a page\nof alerts; doing it by hand means remembering, at the moment somebody is\nleast likely to.\n\nTimes are the organisation's clock, as they are on the form. Somebody\nscheduling work at 22:00 means 22:00 where they are, and making the API\ntake UTC while the page takes local is how a window opens an hour late on\nthe one night it matters.","operationId":"createMaintenanceWindow","security":[{"ApiToken":[]}],"parameters":[{"name":"n404_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"N404 Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaintenanceIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaintenanceOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/maintenance/{window_id}":{"get":{"tags":["maintenance"],"summary":"One window","operationId":"getMaintenanceWindow","security":[{"ApiToken":[]}],"parameters":[{"name":"window_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Window Id"}},{"name":"n404_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"N404 Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MaintenanceOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["maintenance"],"summary":"Delete a maintenance window","description":"Deleting a window does not undo what it covered.\n\nResults recorded inside it stay marked as maintenance, so a month's uptime\ndoes not change retroactively because somebody tidied up afterwards. What\nit does is stop the window applying from now on, which is what a pipeline\nwants when a release finishes early.","operationId":"deleteMaintenanceWindow","security":[{"ApiToken":[]}],"parameters":[{"name":"window_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Window Id"}},{"name":"n404_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"N404 Session"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/groups":{"get":{"tags":["groups"],"summary":"Every group, oldest first","operationId":"listGroups","security":[{"ApiToken":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"n404_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"N404 Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupPage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["groups"],"summary":"Create a group","description":"Creating one that already exists by name returns the one that exists.\n\nThe domain does that because a double submit is a normal thing a browser\ndoes, and it is the right answer here as well: an importer run twice\nshould end with one group of that name, not two that nobody can tell\napart afterwards.","operationId":"createGroup","security":[{"ApiToken":[]}],"parameters":[{"name":"n404_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"N404 Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/groups/{group_id}":{"get":{"tags":["groups"],"summary":"One group","operationId":"getGroup","security":[{"ApiToken":[]}],"parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Group Id"}},{"name":"n404_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"N404 Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["groups"],"summary":"Rename a group","operationId":"updateGroup","security":[{"ApiToken":[]}],"parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Group Id"}},{"name":"n404_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"N404 Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupPatch"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupOut"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["groups"],"summary":"Delete a group, keeping its monitors","description":"The monitors stay, ungrouped. Nothing is watched less afterwards.","operationId":"deleteGroup","security":[{"ApiToken":[]}],"parameters":[{"name":"group_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Group Id"}},{"name":"n404_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"N404 Session"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/status-pages":{"get":{"tags":["status pages"],"summary":"Every status page, oldest first","operationId":"listStatusPages","security":[{"ApiToken":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Limit"}},{"name":"cursor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor"}},{"name":"n404_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"N404 Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusPagePage"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/status-pages/{page_id}":{"get":{"tags":["status pages"],"summary":"One page, and what is published on it","operationId":"getStatusPage","security":[{"ApiToken":[]}],"parameters":[{"name":"page_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Page Id"}},{"name":"n404_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"N404 Session"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusPageDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/status-pages/{page_id}/monitors":{"post":{"tags":["status pages"],"summary":"Put a monitor on a page, under a public name","description":"Idempotent, and a second call renames rather than duplicating. The\nmembership is keyed on (page, monitor), so there is nothing to duplicate,\nand renaming is the thing somebody wants on a second call.","operationId":"publishMonitor","security":[{"ApiToken":[]}],"parameters":[{"name":"page_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Page Id"}},{"name":"n404_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"N404 Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusPageDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/status-pages/{page_id}/monitors/{monitor_id}":{"delete":{"tags":["status pages"],"summary":"Take a monitor off a page","description":"This page only. The same monitor on another page is untouched, which\nis what a membership row per page buys and is why the model is not a\nnullable name on the monitor.","operationId":"unpublishMonitor","security":[{"ApiToken":[]}],"parameters":[{"name":"page_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Page Id"}},{"name":"monitor_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Monitor Id"}},{"name":"n404_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"N404 Session"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/status-pages/{page_id}/groups":{"post":{"tags":["status pages"],"summary":"Put a group on a page, under a public name","description":"Publishing a group publishes the monitors it holds, under their own\nnames (#478). So the response lists more than was asked for, on purpose:\nit is what the page now shows.","operationId":"publishGroup","security":[{"ApiToken":[]}],"parameters":[{"name":"page_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Page Id"}},{"name":"n404_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"N404 Session"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishIn"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusPageDetail"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/status-pages/{page_id}/groups/{group_id}":{"delete":{"tags":["status pages"],"summary":"Take a group's heading off a page","description":"The heading goes and its members stay, each still published under its\nown name. Removing them too would unpublish monitors somebody may have\nrenamed for this page, and taking a heading off is not a request to do\nthat (`set_public_name`).","operationId":"unpublishGroup","security":[{"ApiToken":[]}],"parameters":[{"name":"page_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Page Id"}},{"name":"group_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Group Id"}},{"name":"n404_session","in":"cookie","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"N404 Session"}}],"responses":{"204":{"description":"Successful Response"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"GroupIn":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","required":["name"],"title":"GroupIn"},"GroupOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"monitors":{"type":"integer","title":"Monitors"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","name","description","monitors","created_at"],"title":"GroupOut","description":"A monitor group. #393\n\n`monitors` is a count rather than the monitors themselves: a group of\nforty would otherwise make a listing of groups a listing of everything.\nA caller who wants them lists the monitors instead, where each one names\nthe group it is in."},"GroupPage":{"properties":{"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"items":{"items":{"$ref":"#/components/schemas/GroupOut"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"GroupPage"},"GroupPatch":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"type":"object","title":"GroupPatch"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"IncidentOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"monitor":{"type":"string","format":"uuid","title":"Monitor"},"monitor_name":{"type":"string","title":"Monitor Name"},"cause":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cause"},"started_at":{"type":"string","format":"date-time","title":"Started At"},"confirmed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Confirmed At"},"resolved_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Resolved At"},"open":{"type":"boolean","title":"Open"},"seen_from":{"anyOf":[{"$ref":"#/components/schemas/ProbeRef"},{"type":"null"}]},"confirmed_from":{"anyOf":[{"$ref":"#/components/schemas/ProbeRef"},{"type":"null"}]},"confirmed_continents":{"items":{"type":"string"},"type":"array","title":"Confirmed Continents","default":[]},"note":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Note"}},"type":"object","required":["id","monitor","monitor_name","cause","started_at","confirmed_at","resolved_at","open","seen_from","confirmed_from","note"],"title":"IncidentOut"},"IncidentPage":{"properties":{"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"items":{"items":{"$ref":"#/components/schemas/IncidentOut"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"IncidentPage"},"MaintenanceIn":{"properties":{"name":{"type":"string","title":"Name","default":""},"starts_at":{"type":"string","title":"Starts At","default":""},"ends_at":{"type":"string","title":"Ends At","default":""},"rrule":{"type":"string","title":"Rrule","default":""},"monitors":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Monitors","default":[]},"groups":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Groups","default":[]}},"type":"object","title":"MaintenanceIn","description":"What a caller may send to schedule one.\n\nEvery field the form has and nothing it does not, and the validation is\nthe domain's, in app/maintenance.py, so a window scheduled here and one\nscheduled on the page are refused for the same reasons.\n\nTimes are the organisation's clock, as the form's are, because that is\nwhat somebody scheduling work at 22:00 means. `rrule` is one of the values\napp/maintenance.py REPEATS offers, or any RFC 5545 rule the expander can\nread."},"MaintenanceOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"starts_at":{"type":"string","format":"date-time","title":"Starts At"},"ends_at":{"type":"string","format":"date-time","title":"Ends At"},"rrule":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Rrule"},"repeat":{"type":"string","title":"Repeat"},"monitors":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Monitors"},"groups":{"items":{"type":"string","format":"uuid"},"type":"array","title":"Groups"}},"type":"object","required":["id","name","starts_at","ends_at","rrule","repeat","monitors","groups"],"title":"MaintenanceOut","description":"A window, with the monitors and groups it covers named by UUID.\n\nThe row stores the internal ids, because it is a JSON list inside the\napplication. They are translated on the way out, so that a caller only\never handles the ids the rest of the API uses."},"MaintenancePage":{"properties":{"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"items":{"items":{"$ref":"#/components/schemas/MaintenanceOut"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"MaintenancePage"},"MeOut":{"properties":{"organisation":{"$ref":"#/components/schemas/OrganisationOut"},"role":{"type":"string","title":"Role"},"scope":{"type":"string","title":"Scope"},"token_name":{"type":"string","title":"Token Name"}},"type":"object","required":["organisation","role","scope","token_name"],"title":"MeOut","description":"What this token is, which is the first call anybody makes.\n\nIt is the answer to \"is my configuration right\", and it is the one call a\nCLI or an MCP server runs before anything else. It names the organisation\nthe token acts for, because a person with two accounts has two tokens and\nno other way to tell which one is in an environment variable."},"MonitorIn":{"properties":{"type":{"type":"string","title":"Type"},"target":{"type":"string","title":"Target","default":""},"name":{"type":"string","title":"Name","default":""},"interval_s":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval S"},"config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config"},"group":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Group"},"affects_group_status":{"type":"boolean","title":"Affects Group Status","default":true}},"type":"object","required":["type"],"title":"MonitorIn","description":"What a caller may send to create one.\n\nEvery field the form has and nothing it does not. Validation is the\ndomain's, in app/monitors.py, so that a monitor created here and one\ncreated on the page are refused for the same reasons."},"MonitorOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"type":{"type":"string","title":"Type"},"target":{"type":"string","title":"Target"},"interval_s":{"type":"integer","title":"Interval S"},"enabled":{"type":"boolean","title":"Enabled"},"config":{"additionalProperties":true,"type":"object","title":"Config"},"group":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Group"},"affects_group_status":{"type":"boolean","title":"Affects Group Status","default":true},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","name","type","target","interval_s","enabled","config","created_at"],"title":"MonitorOut","description":"One monitor as the API sees it. #383\n\n`id` is the UUID, `type` and the rest are the stored values. `config` is\npassed through as it is: it holds type-specific settings and a new monitor\ntype is a checker and a form rather than a migration, so a schema that\nenumerated its keys would need editing every time one is added.\n\nA heartbeat monitor's token is in `config` encrypted, and never here:\n`config` is filtered on the way out by the resource, which is the one\nplace that knows the difference."},"MonitorPage":{"properties":{"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"items":{"items":{"$ref":"#/components/schemas/MonitorOut"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"MonitorPage"},"MonitorPatch":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"target":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target"},"interval_s":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Interval S"},"config":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Config"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"},"group":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Group"},"ungroup":{"type":"boolean","title":"Ungroup","default":false},"affects_group_status":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Affects Group Status"}},"type":"object","title":"MonitorPatch","description":"A change to one, with only the fields that were sent.\n\nNone means \"not mentioned\", which is why every field defaults to it: a\nPATCH that omits `name` must not clear the name. The type is absent on\npurpose and cannot be changed, because a monitor edited from HTTPS into\nDNS keeps a history that is then a history of two different things."},"OrganisationOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"plan":{"type":"string","title":"Plan"}},"type":"object","required":["id","name","plan"],"title":"OrganisationOut"},"ProbeRef":{"properties":{"name":{"type":"string","title":"Name"},"continent":{"type":"string","title":"Continent"}},"type":"object","required":["name","continent"],"title":"ProbeRef","description":"Where an observation came from. #384\n\nThe name and the continent, not a sentence. The pages render \"Seen from\nAmsterdam, confirmed from New York\" and the API hands over the two parts\nso that a caller can write that sentence in their own words, their own\nlanguage, or not at all."},"PublishIn":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"public_name":{"type":"string","title":"Public Name"}},"type":"object","required":["id","public_name"],"title":"PublishIn","description":"Put a monitor or a group on a page under a name.\n\n`public_name` is required and has no default. Blank is how the product\ntakes something off a page, so a default of \"\" would make a mistyped\nfield silently unpublish rather than fail."},"PublishedOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"name":{"type":"string","title":"Name"},"public_name":{"type":"string","title":"Public Name"}},"type":"object","required":["id","name","public_name"],"title":"PublishedOut","description":"One monitor or group as it appears on a status page. #484\n\nTwo names, because they are two different things and conflating them is\nhow something private gets published. `name` is what the account calls it\ninternally and may say more than its audience should read; `public_name`\nis what the page shows, which somebody chose on purpose."},"StatusOut":{"properties":{"monitor":{"type":"string","format":"uuid","title":"Monitor"},"status":{"type":"string","title":"Status"},"since":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Since"},"last_checked_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Checked At"},"enabled":{"type":"boolean","title":"Enabled"},"uptime":{"$ref":"#/components/schemas/UptimeOut"}},"type":"object","required":["monitor","status","since","last_checked_at","enabled","uptime"],"title":"StatusOut"},"StatusPageDetail":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"slug":{"type":"string","title":"Slug"},"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"enabled":{"type":"boolean","title":"Enabled"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"monitors":{"items":{"$ref":"#/components/schemas/PublishedOut"},"type":"array","title":"Monitors"},"groups":{"items":{"$ref":"#/components/schemas/PublishedOut"},"type":"array","title":"Groups"}},"type":"object","required":["id","slug","title","description","enabled","created_at","monitors","groups"],"title":"StatusPageDetail","description":"A page and what is on it.\n\nOnly what is on it. `publishable()` inside the product returns every\nmonitor and group with a blank name for the ones that are not published,\nbecause the settings page draws both columns; an API caller asking about\na page is asking what is on the page, and would have to filter the blanks\nout itself to get there."},"StatusPageOut":{"properties":{"id":{"type":"string","format":"uuid","title":"Id"},"slug":{"type":"string","title":"Slug"},"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"enabled":{"type":"boolean","title":"Enabled"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","slug","title","description","enabled","created_at"],"title":"StatusPageOut","description":"A public status page. #484\n\n`enabled` is whether it is actually being served. A page is off until\nsomebody says otherwise, so a caller that creates content and never\nenables it has published nothing, which is the safe way round."},"StatusPagePage":{"properties":{"next_cursor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Next Cursor"},"items":{"items":{"$ref":"#/components/schemas/StatusPageOut"},"type":"array","title":"Items"}},"type":"object","required":["items"],"title":"StatusPagePage"},"UptimeOut":{"properties":{"days":{"type":"integer","title":"Days"},"percent":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Percent"},"down_seconds":{"type":"number","title":"Down Seconds"}},"type":"object","required":["days","percent","down_seconds"],"title":"UptimeOut","description":"Computed by app/downtime.py, the same module the pages read.\n\nTwo implementations of uptime is how the API and the dashboard come to\ndisagree by a tenth of a percent in front of a customer, and the customer\nis right to believe neither."},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}},"securitySchemes":{"ApiToken":{"type":"http","description":"A token from Account, API tokens. Send it as: Authorization: Bearer n404_...","scheme":"bearer"}}}}