{"openapi":"3.1.0","info":{"title":"Orbit integration API","version":"1.0.0","description":"Read-only API that the Orbit app (orbit.codebros.cz) calls to pull site-monitoring data from care into its Work module. Server-to-server, per-user bearer key, data scoped to the key owner."},"servers":[{"url":"https://api.care.codebros.cz"}],"security":[{"bearerAuth":[]}],"paths":{"/api/orbit/ping":{"get":{"operationId":"ping","summary":"Health and identity check","responses":{"200":{"description":"Service is up","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Ping"},"example":{"ok":true,"service":"care","version":"1.0.0"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/api/orbit/summary":{"get":{"operationId":"summary","summary":"Monitoring snapshot for the authenticated user","responses":{"200":{"description":"Monitoring snapshot","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Summary"},"example":{"sites":12,"sitesDown":[{"name":"Acme web","url":"https://acme.cz","since":"2026-07-14T08:03:00Z"}],"openIncidents":[{"site":"Acme web","title":"HTTP 500 na homepage","since":"2026-07-14T08:05:00Z"}],"jobsToday":{"done":4,"pending":1},"uptime24hPct":99.8}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/api/orbit/clients/{id}/summary":{"get":{"operationId":"clientSummary","summary":"Per-client monitoring snapshot","description":"Same shape as /summary but scoped to a single client. `id` is the client's link contact id (the reference key Orbit holds). 404 when unknown or not owned by the caller.","parameters":[{"name":"id","in":"path","required":true,"description":"link contact id of the client","schema":{"type":"string"},"example":"3f2504e0-4f89-41d3-9a0c-0305e82c3301"}],"responses":{"200":{"description":"Monitoring snapshot for the client","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Summary"},"example":{"sites":2,"sitesDown":[],"openIncidents":[],"jobsToday":{"done":1,"pending":0},"uptime24hPct":100}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"description":"No client with this link contact id owned by the caller","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"not found"}}}}}}},"/api/orbit/sites":{"get":{"operationId":"sites","summary":"The owner's sites","description":"Sites in the caller's scope (admin: all; client: their client's), for Orbit's external-resource picker.","responses":{"200":{"description":"Sites for the key's owner","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Sites"},"example":{"sites":[{"id":"3f2504e0-4f89-41d3-9a0c-0305e82c3301","name":"Acme web","url":"https://acme.cz"}]}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"Personal Orbit API key. Missing/invalid/revoked → 401."}},"responses":{"Unauthorized":{"description":"Missing, invalid, or revoked API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"},"example":{"error":"unauthorized"}}}}},"schemas":{"Ping":{"type":"object","required":["ok","service","version"],"additionalProperties":false,"properties":{"ok":{"type":"boolean","const":true},"service":{"type":"string","const":"care"},"version":{"type":"string","examples":["1.0.0"]}}},"SiteDown":{"type":"object","required":["name","url","since"],"additionalProperties":false,"properties":{"name":{"type":"string"},"url":{"type":["string","null"],"format":"uri"},"since":{"type":"string","format":"date-time","description":"ISO 8601 UTC, when the site went down"}}},"Sites":{"type":"object","required":["sites"],"additionalProperties":false,"properties":{"sites":{"type":"array","items":{"type":"object","required":["id","name","url"],"additionalProperties":false,"properties":{"id":{"type":"string"},"name":{"type":"string"},"url":{"type":["string","null"],"format":"uri"}}}}}},"OpenIncident":{"type":"object","required":["site","title","since"],"additionalProperties":false,"properties":{"site":{"type":"string"},"title":{"type":["string","null"]},"since":{"type":"string","format":"date-time","description":"ISO 8601 UTC, when the incident opened"}}},"Summary":{"type":"object","required":["sites","sitesDown","openIncidents","jobsToday","uptime24hPct"],"additionalProperties":false,"properties":{"sites":{"type":"integer","minimum":0,"description":"Total monitored sites in scope"},"sitesDown":{"type":"array","items":{"$ref":"#/components/schemas/SiteDown"}},"openIncidents":{"type":"array","items":{"$ref":"#/components/schemas/OpenIncident"}},"jobsToday":{"type":"object","required":["done","pending"],"additionalProperties":false,"properties":{"done":{"type":"integer","minimum":0},"pending":{"type":"integer","minimum":0}}},"uptime24hPct":{"type":["number","null"],"minimum":0,"maximum":100,"description":"Uptime over last 24 h in percent, or null if unknown"}}},"Error":{"type":"object","required":["error"],"additionalProperties":false,"properties":{"error":{"type":"string"}}}}}}