{"openapi":"3.1.0","info":{"title":"Camly API","version":"2026-11-04","description":"Camly turns a camera picture into an answer: is the loading bay clear, how many pallets\nare on the rack, did the van leave. You describe what to look for in an **agent\nconfiguration**, send a picture, and get a structured result.\n\n**Authentication.** Every call carries a key from the console, `Authorization: Bearer cmly_sk_...`.\nTest keys (`cmly_sk_test_...`) are free and answer deterministically without calling the model:\nsame picture, same answer. Live keys are charged to your organisation's prepaid balance.\n\n**Four types.** `event` (a yes/no question), `detect` (find and count classes of objects),\n`measure` (read a value, optionally against a condition) and `tracker` (follow one object or\nvehicle between a reference picture and a new one). Trackers follow objects, never people.\n\n**Errors** share one shape: `{\"error\": {\"type\", \"code\", \"message\", \"request_id\"}}`. A failed\nanalysis (502) is never charged.\n\n**Acceptable use.** Configurations are screened when saved and when sent inline. Identifying\npeople, inferring emotions or sensitive traits, and profiling individuals are refused with\n`422 policy_refusal`.\n\nEvery response carries `Camly-Request-Id` and `Camly-Version`; charged runs carry `Camly-Cost-Eur`.","contact":{"name":"Camly","email":"support@camly.ai","url":"https://platform.camly.ai"}},"paths":{"/v1/runs":{"post":{"tags":["Runs"],"summary":"Run a check","operationId":"createRun","description":"Analyse one picture (or a burst) with an inline configuration or a saved agent. Send `Idempotency-Key` to retry safely: the same key returns the first answer and charges once.","parameters":[{"name":"Idempotency-Key","in":"header","required":false,"schema":{"type":"string","maxLength":200}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunRequest"},"examples":{"event":{"summary":"Event","value":{"config":{"type":"event","question":"Is the marked fire exit blocked?"},"image":"<base64>"}},"detect":{"summary":"Detect","value":{"config":{"type":"detect","classes":["pallet","forklift"],"zone":[[0.1,0.5],[0.9,0.5],[0.9,1],[0.1,1]]},"image":"<base64>"}},"measure":{"summary":"Measure","value":{"config":{"type":"measure","question":"How full is the silo?","measure":{"variable":"level","unit":"%","condition":{"op":"lt","value":20}}},"image":"<base64>"}},"tracker":{"summary":"Tracker","value":{"config":{"type":"tracker","subject":"the white van"},"reference_image":"<base64>","image":"<base64>"}},"agent":{"summary":"A saved agent","value":{"agent":"agt_...","image":"<base64>"}}}},"multipart/form-data":{"schema":{"type":"object","properties":{"config":{"type":"string","description":"The agent configuration as JSON text."},"agent":{"type":"string"},"version":{"type":"integer"},"image":{"type":"string","format":"binary","description":"Repeat the field for a burst."},"reference_image":{"type":"string","format":"binary"}}}}}},"responses":{"200":{"description":"The result.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Run"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"insufficient_balance, or budget_exceeded when a hard budget would be passed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid request or configuration, or policy_refusal.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit; wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"The analysis gave no usable answer; not charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"summary":"List past checks","operationId":"listRuns","parameters":[{"name":"monitor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Monitor"},"description":"Only this monitor."},{"name":"camera","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Camera"},"description":"Only this camera."},{"name":"agent","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Agent"}},{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"From"}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"To"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"},"description":"How many, 1 to 200."},{"name":"before","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Before"}}],"responses":{"200":{"description":"A list.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/RunRecord"}},"has_more":{"type":"boolean"}}}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Runs"],"description":"Newest first. Filter with ?monitor=, ?camera= (its monitors' checks), ?agent=, ?from= and ?to=. Page with ?before=run_... Needs a Full access key. Runs are kept 90 days."}},"/v1/chat":{"post":{"tags":["Chat"],"summary":"Send a chat message","operationId":"createChat","description":"A set price per message (EUR 0.02 on lite), whatever the history; it counts as 2 checks against the rate limit. With stream true (the default) the answer comes as Server-Sent Events: {\"type\":\"delta\",\"text\"} pieces, then {\"type\":\"done\",...} with the whole answer and the cost, or {\"type\":\"error\",\"error\"}, which is not charged. Every user message is screened against the acceptable-use policy. Test keys answer a fixed text, free.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["messages"],"description":"Send image, incidents, or both. Nothing of the conversation is stored: send the history each time.","properties":{"messages":{"type":"array","maxItems":40,"description":"The conversation so far, ending with the user. A user message has at most 1000 characters.","items":{"type":"object","required":["role","content"],"properties":{"role":{"type":"string","enum":["user","assistant"]},"content":{"type":"string"}}}},"image":{"type":"string","contentEncoding":"base64","description":"The picture to talk about."},"incidents":{"type":"object","description":"Talk about what your monitors found. Needs the monitors:read scope.","properties":{"camera":{"type":"string"},"monitor":{"type":"string"},"hours":{"type":"integer","minimum":1,"maximum":168,"default":24}}},"language":{"type":"string","enum":["en","fr"],"default":"en"},"model_tier":{"type":"string","enum":["lite","pro"],"default":"lite"},"stream":{"type":"boolean","default":true}}}}}},"responses":{"200":{"description":"The answer.","content":{"text/event-stream":{"schema":{"type":"string"}},"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"chat"},"mode":{"type":"string","enum":["live","test"]},"text":{"type":"string"},"usage":{"type":"object","properties":{"checks":{"type":"integer"},"cost_eur":{"type":"string"}}},"created":{"type":"string","format":"date-time"}}}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"insufficient_balance, or budget_exceeded when a hard budget would be passed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid request or configuration, or policy_refusal.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Rate limit; wait for Retry-After seconds.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"The analysis gave no usable answer; not charged.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/balance":{"get":{"tags":["Balance"],"summary":"Get the balance","operationId":"getBalance","responses":{"200":{"description":"What is left to spend.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Balance"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/agents":{"post":{"summary":"Create an agent","operationId":"createAgent","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewAgent"}}}},"responses":{"201":{"description":"Created, as version 1.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agent"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid request or configuration, or policy_refusal.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Agents"]},"get":{"summary":"List agents","operationId":"listAgents","parameters":[{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Archived"},"description":"Also list archived agents."}],"responses":{"200":{"description":"The project's agents.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Agent"}}}}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Agents"]}},"/v1/agents/{agent_id}":{"get":{"summary":"Get an agent","operationId":"getAgent","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"responses":{"200":{"description":"The agent at its latest version.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agent"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Agents"]}},"/v1/agents/{agent_id}/versions":{"post":{"summary":"Add a version","operationId":"addAgentVersion","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewVersion"}}}},"responses":{"201":{"description":"The agent with its new version.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Agent"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid request or configuration, or policy_refusal.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Agents"]}},"/v1/agents/{agent_id}/versions/{version}":{"get":{"summary":"Get one version","operationId":"getAgentVersion","parameters":[{"name":"agent_id","in":"path","required":true,"schema":{"type":"string","title":"Agent Id"}},{"name":"version","in":"path","required":true,"schema":{"type":"integer","title":"Version"}}],"responses":{"200":{"description":"That version of the agent.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AgentVersion"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Agents"]}},"/v1/runs/{run_id}":{"get":{"summary":"Get a past check","operationId":"getRun","parameters":[{"name":"run_id","in":"path","required":true,"schema":{"type":"string","title":"Run Id"}}],"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RunRecord"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Runs"]}},"/v1/cameras":{"get":{"summary":"List cameras","operationId":"listCameras","responses":{"200":{"description":"A list.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Camera"}},"has_more":{"type":"boolean"}}}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Cameras"]},"post":{"summary":"Create a camera","operationId":"createCamera","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewCamera"}}},"required":true},"responses":{"201":{"description":"Done.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Camera"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid request or configuration, or policy_refusal.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Cameras"],"description":"source push: your code sends pictures. source bridge: give bridge and url. source simulated (test keys): it makes its own pictures."}},"/v1/cameras/{camera_id}":{"get":{"summary":"Get a camera","operationId":"getCamera","parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","title":"Camera Id"}}],"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Camera"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Cameras"]},"patch":{"summary":"Update a camera","operationId":"updateCamera","parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","title":"Camera Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CameraPatch"}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Camera"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid request or configuration, or policy_refusal.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Cameras"]},"delete":{"summary":"Delete a camera","operationId":"deleteCamera","parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","title":"Camera Id"}}],"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Cameras"],"description":"Its monitors go with it. Incidents and their evidence stay until they expire."}},"/v1/cameras/{camera_id}/frames":{"post":{"tags":["Cameras"],"summary":"Send a picture","operationId":"pushFrame","description":"Every monitor of the camera that is due runs a check, charged like a run. The answer says, per monitor, what was checked or why it was skipped. Bridges use this same endpoint. Keys need the frames:write scope.","parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["image"],"properties":{"image":{"type":"string","contentEncoding":"base64"},"trigger":{"type":"string","enum":["schedule","motion"],"default":"schedule"}}}},"multipart/form-data":{"schema":{"type":"object","required":["image"],"properties":{"image":{"type":"string","format":"binary"},"trigger":{"type":"string","enum":["schedule","motion"]}}}}}},"responses":{"200":{"description":"What each monitor did.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FrameResult"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid request or configuration, or policy_refusal.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/cameras/{camera_id}/upload-url":{"post":{"summary":"Create an upload URL","operationId":"createUploadUrl","parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","title":"Camera Id"}}],"responses":{"201":{"description":"Done.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadUrl"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid request or configuration, or policy_refusal.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Cameras"],"description":"Push cameras. The camera itself then sends pictures to this URL with its built-in HTTP event rules (Axis, Hikvision, Dahua, Hanwha...), with no API key. The URL is returned once; a new one replaces the old one at once."},"delete":{"summary":"Delete the upload URL","operationId":"deleteUploadUrl","parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","title":"Camera Id"}}],"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Cameras"],"description":"The camera can no longer send pictures to it."}},"/v1/cameras/{camera_id}/simulate":{"post":{"summary":"Tick a simulated camera","operationId":"simulateCamera","parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","title":"Camera Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Simulate"}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid request or configuration, or policy_refusal.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Cameras"],"description":"Test keys. The cycle is 2 clear, 4 flagged, 2 clear ticks: with the default rules an incident opens on tick 4 and closes on tick 8."}},"/v1/cameras/{camera_id}/lookback":{"post":{"summary":"Search the archive","operationId":"createLookback","parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","title":"Camera Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewLookback"}}}},"responses":{"202":{"description":"Done.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Lookback"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid request or configuration, or policy_refusal.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Look-back"],"description":"Find a picture of the past in the bridge archive: the bridge sends only the pictures of the window, up to 6 hours, and the first match ends the search. Each picture checked is charged as a check. Takes about a minute; a simulated camera answers at once."}},"/v1/lookbacks":{"get":{"summary":"List look-backs","operationId":"listLookbacks","parameters":[{"name":"camera","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Camera"},"description":"Only this camera."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"},"description":"How many, 1 to 200."}],"responses":{"200":{"description":"A list.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Lookback"}},"has_more":{"type":"boolean"}}}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Look-back"]}},"/v1/lookbacks/{lookback_id}":{"get":{"summary":"Get a look-back","operationId":"getLookback","parameters":[{"name":"lookback_id","in":"path","required":true,"schema":{"type":"string","title":"Lookback Id"}}],"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Lookback"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Look-back"]}},"/v1/lookbacks/{lookback_id}/picture":{"get":{"tags":["Look-back"],"summary":"Get the picture found","operationId":"getLookbackPicture","parameters":[{"name":"lookback_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The picture.","content":{"image/jpeg":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Delete the picture","operationId":"deleteLookbackPicture","parameters":[{"name":"lookback_id","in":"path","required":true,"schema":{"type":"string","title":"Lookback Id"}}],"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Look-back"]}},"/v1/lookbacks/{lookback_id}/clip":{"get":{"tags":["Look-back"],"summary":"Get the clip","operationId":"getLookbackClip","description":"The 10 seconds of video around the match (5 before, 5 after), when the camera's archive is video. Kept like the picture.","parameters":[{"name":"lookback_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The clip.","content":{"video/mp4":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Delete the clip","operationId":"deleteLookbackClip","parameters":[{"name":"lookback_id","in":"path","required":true,"schema":{"type":"string","title":"Lookback Id"}}],"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Look-back"]}},"/v1/lookbacks/{lookback_id}/matches/{match_id}/picture":{"get":{"tags":["Look-back"],"summary":"Get a match picture","operationId":"getLookbackMatchPicture","parameters":[{"name":"lookback_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"match_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The picture.","content":{"image/jpeg":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Delete a match picture","operationId":"deleteLookbackMatchPicture","parameters":[{"name":"lookback_id","in":"path","required":true,"schema":{"type":"string","title":"Lookback Id"}},{"name":"match_id","in":"path","required":true,"schema":{"type":"string","title":"Match Id"}}],"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Look-back"]}},"/v1/monitors":{"post":{"summary":"Create a monitor","operationId":"createMonitor","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewMonitor"}}}},"responses":{"201":{"description":"Done.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Monitor"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid request or configuration, or policy_refusal.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Monitors"],"description":"The agent is pinned to its latest version unless agent_version is given. Trackers and calibrated measures need a reference picture and are not available on monitors yet."},"get":{"summary":"List monitors","operationId":"listMonitors","parameters":[{"name":"camera","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Camera"},"description":"Only this camera."}],"responses":{"200":{"description":"A list.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Monitor"}},"has_more":{"type":"boolean"}}}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Monitors"]}},"/v1/monitors/{monitor_id}":{"get":{"summary":"Get a monitor","operationId":"getMonitor","parameters":[{"name":"monitor_id","in":"path","required":true,"schema":{"type":"string","title":"Monitor Id"}}],"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Monitor"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Monitors"]},"patch":{"summary":"Update a monitor","operationId":"updateMonitor","parameters":[{"name":"monitor_id","in":"path","required":true,"schema":{"type":"string","title":"Monitor Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MonitorPatch"}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Monitor"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid request or configuration, or policy_refusal.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Monitors"],"description":"Move it to another agent version, or change its schedule and rules. An open incident carries on."},"delete":{"summary":"Delete a monitor","operationId":"deleteMonitor","parameters":[{"name":"monitor_id","in":"path","required":true,"schema":{"type":"string","title":"Monitor Id"}}],"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Monitors"],"description":"An open incident closes."}},"/v1/monitors/{monitor_id}/pause":{"post":{"summary":"Pause a monitor","operationId":"pauseMonitor","parameters":[{"name":"monitor_id","in":"path","required":true,"schema":{"type":"string","title":"Monitor Id"}}],"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Monitor"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid request or configuration, or policy_refusal.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Monitors"]}},"/v1/monitors/{monitor_id}/resume":{"post":{"summary":"Resume a monitor","operationId":"resumeMonitor","parameters":[{"name":"monitor_id","in":"path","required":true,"schema":{"type":"string","title":"Monitor Id"}}],"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Monitor"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid request or configuration, or policy_refusal.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Monitors"]}},"/v1/incidents":{"get":{"summary":"List incidents","operationId":"listIncidents","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"enum":["open","closed"],"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"monitor","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Monitor"},"description":"Only this monitor."},{"name":"camera","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Camera"},"description":"Only this camera."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"},"description":"How many, 1 to 200."},{"name":"before","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Before"}}],"responses":{"200":{"description":"A list.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Incident"}},"has_more":{"type":"boolean"}}}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Incidents"],"description":"Newest first. Page with ?before=inc_..."}},"/v1/incidents/{incident_id}":{"get":{"summary":"Get an incident","operationId":"getIncident","parameters":[{"name":"incident_id","in":"path","required":true,"schema":{"type":"string","title":"Incident Id"}}],"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Incident"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Incidents"]}},"/v1/incidents/{incident_id}/evidence":{"get":{"tags":["Incidents"],"summary":"Get the evidence picture","operationId":"getEvidence","parameters":[{"name":"incident_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The picture.","content":{"image/jpeg":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Delete the evidence picture","operationId":"deleteEvidence","parameters":[{"name":"incident_id","in":"path","required":true,"schema":{"type":"string","title":"Incident Id"}}],"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Incidents"]}},"/v1/events":{"get":{"summary":"List events","operationId":"listEvents","parameters":[{"name":"after","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"After"}},{"name":"before","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Before"}},{"name":"type","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Type"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"},"description":"How many, 1 to 200."}],"responses":{"200":{"description":"A list.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Event"}},"has_more":{"type":"boolean"}}}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Events"],"description":"Newest first, paged with ?before=evt_... With ?after=evt_..., oldest first from that event, to catch up after downtime."}},"/v1/events/{event_id}":{"get":{"summary":"Get an event","operationId":"getEvent","parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}}],"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Event"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Events"],"description":"With its delivery attempts."}},"/v1/events/{event_id}/redeliver":{"post":{"summary":"Redeliver an event","operationId":"redeliverEvent","parameters":[{"name":"event_id","in":"path","required":true,"schema":{"type":"string","title":"Event Id"}}],"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid request or configuration, or policy_refusal.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Events"]}},"/v1/webhook-endpoints":{"get":{"summary":"List webhook endpoints","operationId":"listWebhookEndpoints","responses":{"200":{"description":"A list.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/WebhookEndpoint"}},"has_more":{"type":"boolean"}}}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Webhooks"]},"post":{"summary":"Create a webhook endpoint","operationId":"createWebhookEndpoint","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewEndpoint"}}},"required":true},"responses":{"201":{"description":"Done.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WebhookEndpoint"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid request or configuration, or policy_refusal.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Webhooks"],"description":"A public https address. The signing secret is returned once."}},"/v1/webhook-endpoints/{endpoint_id}":{"delete":{"summary":"Delete a webhook endpoint","operationId":"deleteWebhookEndpoint","parameters":[{"name":"endpoint_id","in":"path","required":true,"schema":{"type":"string","title":"Endpoint Id"}}],"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Webhooks"]}},"/v1/bridges/enrollment-tokens":{"get":{"summary":"List enrolment tokens","operationId":"listEnrollmentTokens","responses":{"200":{"description":"A list.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/EnrollmentToken"}},"has_more":{"type":"boolean"}}}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Bridges"]},"post":{"summary":"Create an enrolment token","operationId":"createEnrollmentToken","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewEnrollmentToken"}}},"required":true},"responses":{"201":{"description":"Done.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EnrollmentToken"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid request or configuration, or policy_refusal.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Bridges"],"description":"single: one bridge, 24 hours at most. fleet: up to max_uses bridges, 30 days by default, for pre-imaged boxes. Install with camly-bridge enroll --token."}},"/v1/bridges/enrollment-tokens/{token_id}":{"delete":{"summary":"Revoke an enrolment token","operationId":"revokeEnrollmentToken","parameters":[{"name":"token_id","in":"path","required":true,"schema":{"type":"string","title":"Token Id"}}],"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Bridges"]}},"/v1/bridges":{"get":{"summary":"List bridges","operationId":"listBridges","parameters":[{"name":"tag","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tag"}}],"responses":{"200":{"description":"A list.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Bridge"}},"has_more":{"type":"boolean"}}}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Bridges"],"description":"Filter with ?tag=."}},"/v1/bridges/{bridge_id}":{"get":{"summary":"Get a bridge","operationId":"getBridge","parameters":[{"name":"bridge_id","in":"path","required":true,"schema":{"type":"string","title":"Bridge Id"}}],"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Bridge"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Bridges"]},"patch":{"summary":"Update a bridge","operationId":"updateBridge","parameters":[{"name":"bridge_id","in":"path","required":true,"schema":{"type":"string","title":"Bridge Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BridgePatch"}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Bridge"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid request or configuration, or policy_refusal.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Bridges"],"description":"Its name and its tag. Send tag null to remove it."},"delete":{"summary":"Revoke a bridge","operationId":"revokeBridge","parameters":[{"name":"bridge_id","in":"path","required":true,"schema":{"type":"string","title":"Bridge Id"}}],"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Bridges"],"description":"Its credential stops working at once."}},"/v1/bridges/{bridge_id}/discover":{"post":{"summary":"Look for cameras","operationId":"discoverCameras","parameters":[{"name":"bridge_id","in":"path","required":true,"schema":{"type":"string","title":"Bridge Id"}}],"responses":{"202":{"description":"Done.","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid request or configuration, or policy_refusal.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Bridges"],"description":"The bridge scans its network and reports what it finds in discovered, for you to adopt with POST /v1/cameras."}},"/v1/recorders":{"get":{"summary":"List recorders","operationId":"listRecorders","responses":{"200":{"description":"A list.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Recorder"}},"has_more":{"type":"boolean"}}}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Recorders"]},"post":{"summary":"Create a recorder","operationId":"createRecorder","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewRecorder"}}},"required":true},"responses":{"201":{"description":"Done.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Recorder"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid request or configuration, or policy_refusal.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Recorders"],"description":"Gives the FTP host, user name and password to type in the recorder (DVR or NVR). The password is returned once. Then add a camera per channel with POST /v1/cameras (recorder and channel)."}},"/v1/recorders/{recorder_id}":{"get":{"summary":"Get a recorder","operationId":"getRecorder","parameters":[{"name":"recorder_id","in":"path","required":true,"schema":{"type":"string","title":"Recorder Id"}}],"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Recorder"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Recorders"],"description":"With the channels that sent a picture so far."},"patch":{"summary":"Rename a recorder","operationId":"updateRecorder","parameters":[{"name":"recorder_id","in":"path","required":true,"schema":{"type":"string","title":"Recorder Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecorderPatch"}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Recorder"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid request or configuration, or policy_refusal.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Recorders"]},"delete":{"summary":"Revoke a recorder","operationId":"revokeRecorder","parameters":[{"name":"recorder_id","in":"path","required":true,"schema":{"type":"string","title":"Recorder Id"}}],"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Recorders"],"description":"Its FTP login stops working at once. Its cameras stay, without pictures."}},"/v1/recorders/{recorder_id}/password":{"post":{"summary":"Make a new FTP password","operationId":"newRecorderPassword","parameters":[{"name":"recorder_id","in":"path","required":true,"schema":{"type":"string","title":"Recorder Id"}}],"responses":{"201":{"description":"Done.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Recorder"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid request or configuration, or policy_refusal.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Recorders"],"description":"Returned once. The old password stops working at once; the user name stays."}},"/v1/cameras/{camera_id}/pictures":{"post":{"summary":"Get the pictures of a window","operationId":"createPictures","parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","title":"Camera Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewPictures"}}}},"responses":{"202":{"description":"Done.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Pictures"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid request or configuration, or policy_refusal.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Pictures"],"description":"The bridge sends small versions (480 px) of the archived pictures of a window of up to 6 hours: 1 to 60, default 30, spread over the window, a motion burst counting as one place. No model looks at them. EUR 0.01 per request (test keys free), refunded when nothing comes back. Ready in a few seconds: wait for pictures.ready or read it again. A simulated camera answers at once."}},"/v1/pictures":{"get":{"summary":"List picture requests","operationId":"listPictures","parameters":[{"name":"camera","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Camera"},"description":"Only this camera."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"},"description":"How many, 1 to 200."}],"responses":{"200":{"description":"A list.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Pictures"}},"has_more":{"type":"boolean"}}}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Pictures"],"description":"Newest first, without their pictures. Filter with ?camera=."}},"/v1/pictures/{request_id}":{"get":{"summary":"Get the pictures","operationId":"getPictures","parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}}],"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Pictures"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Pictures"]}},"/v1/pictures/{request_id}/{item_id}/small":{"get":{"tags":["Pictures"],"summary":"Get a small picture","operationId":"getSmallPicture","description":"The small picture, kept 24 hours.","parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"item_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The picture.","content":{"image/jpeg":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"A state conflict, such as not_kept_yet, archive_off or camera_has_no_archive.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/pictures/{request_id}/{item_id}/keep":{"post":{"summary":"Keep a picture","operationId":"keepPicture","parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}},{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}}],"responses":{"202":{"description":"Done.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Picture"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid request or configuration, or policy_refusal.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Pictures"],"description":"The bridge sends the full picture (up to 1920 px wide from Bridge 2.9.0), kept as evidence for the project retention. picture.kept tells when it is there, or that it failed (the bridge pruned it meanwhile). No charge."}},"/v1/pictures/{request_id}/{item_id}":{"get":{"tags":["Pictures"],"summary":"Get a kept picture","operationId":"getPicture","description":"The full picture, once kept; 409 not_kept_yet while the bridge sends it.","parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string"}},{"name":"item_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The picture.","content":{"image/jpeg":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"A state conflict, such as not_kept_yet, archive_off or camera_has_no_archive.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Delete a kept picture","operationId":"deletePicture","parameters":[{"name":"request_id","in":"path","required":true,"schema":{"type":"string","title":"Request Id"}},{"name":"item_id","in":"path","required":true,"schema":{"type":"string","title":"Item Id"}}],"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Pictures"]}},"/v1/cameras/{camera_id}/picker":{"post":{"summary":"Create a picker link","operationId":"createPicker","parameters":[{"name":"camera_id","in":"path","required":true,"schema":{"type":"string","title":"Camera Id"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewPicker"}}}},"responses":{"201":{"description":"Done.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Picker"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid request or configuration, or policy_refusal.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Pictures"],"description":"A link for the person who knows what happened, with no account: the page shows the pictures of the window (as a pictures request, EUR 0.01, refunded if nothing comes back), they tap one, may circle what proves it, and confirm. picker.chosen then brings the full picture. The link is shown once, valid 24 hours, one choice."}},"/v1/pickers":{"get":{"summary":"List picker links","operationId":"listPickers","parameters":[{"name":"camera","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Camera"},"description":"Only this camera."},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"},"description":"How many, 1 to 200."}],"responses":{"200":{"description":"A list.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Picker"}},"has_more":{"type":"boolean"}}}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Pictures"],"description":"Newest first. Filter with ?camera=."}},"/v1/pickers/{picker_id}":{"get":{"summary":"Get a picker link","operationId":"getPicker","parameters":[{"name":"picker_id","in":"path","required":true,"schema":{"type":"string","title":"Picker Id"}}],"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Picker"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Pictures"]}},"/v1/items":{"get":{"summary":"List items","operationId":"listItems","responses":{"200":{"description":"A list.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/Item"}},"has_more":{"type":"boolean"}}}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Items"]},"post":{"summary":"Create an item","operationId":"createItem","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewItem"}}},"required":true},"responses":{"201":{"description":"Done.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Item"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid request or configuration, or policy_refusal.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Items"],"description":"An item a Find can name by its key. At most 100 per project."}},"/v1/items/{key}":{"get":{"summary":"Get an item","operationId":"getItem","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Item"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Items"]},"patch":{"summary":"Update an item","operationId":"updateItem","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemPatch"}}}},"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Item"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid request or configuration, or policy_refusal.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Items"]},"delete":{"summary":"Delete an item","operationId":"deleteItem","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Items"],"description":"Its references are deleted with it."}},"/v1/items/{key}/references":{"post":{"summary":"Add a reference","operationId":"addItemReference","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewReference"}}}},"responses":{"201":{"description":"Done.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ItemReference"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid request or configuration, or policy_refusal.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Items"],"description":"Cut a box out of a picture of a pictures request of that camera (the full picture once kept, else the small one). A Find naming the item on that camera gets up to 3 of its most recent references. 10 are kept per camera, the oldest go first. A picker whose Find names one item also saves the circles drawn on the chosen picture."},"get":{"summary":"List references","operationId":"listItemReferences","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"camera","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Camera"},"description":"Only this camera."}],"responses":{"200":{"description":"A list.","content":{"application/json":{"schema":{"type":"object","properties":{"object":{"const":"list"},"data":{"type":"array","items":{"$ref":"#/components/schemas/ItemReference"}},"has_more":{"type":"boolean"}}}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Items"],"description":"Newest first. Filter with ?camera=."}},"/v1/items/{key}/references/{ref_id}/picture":{"get":{"tags":["Items"],"summary":"Get a reference picture","operationId":"getItemReferencePicture","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string"}},{"name":"ref_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The picture.","content":{"image/jpeg":{"schema":{"type":"string","format":"binary"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/items/{key}/references/{ref_id}":{"delete":{"summary":"Delete a reference","operationId":"deleteItemReference","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","title":"Key"}},{"name":"ref_id","in":"path","required":true,"schema":{"type":"string","title":"Ref Id"}}],"responses":{"200":{"description":"Done.","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found in this key's project.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"tags":["Items"]}},"/v1/upload/{token}":{"post":{"tags":["Cameras"],"summary":"Send a picture from the camera","operationId":"uploadFrame","security":[],"description":"For the camera itself: the token in the address is the only credential. Takes a raw JPEG body or a multipart form with the picture under any field name, as cameras send them. PUT works too. Same checks and prices as Send a picture.","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string"}},{"name":"trigger","in":"query","required":false,"schema":{"type":"string","enum":["schedule","motion"],"default":"schedule"}}],"requestBody":{"required":true,"content":{"image/jpeg":{"schema":{"type":"string","format":"binary"}},"multipart/form-data":{"schema":{"type":"object","description":"Any field name: the first picture part is used."}}}},"responses":{"200":{"description":"What each monitor did. A message with no picture (a camera heartbeat) answers ignored: no_picture.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FrameResult"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid request or configuration, or policy_refusal.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/upload":{"post":{"tags":["Cameras"],"summary":"Send a picture from the camera (password)","operationId":"uploadFrameBasic","security":[{"uploadBasic":[]}],"description":"The same, for cameras that take a user name and password: any user name, the upload token as the password (HTTP Basic).","parameters":[{"name":"trigger","in":"query","required":false,"schema":{"type":"string","enum":["schedule","motion"],"default":"schedule"}}],"requestBody":{"required":true,"content":{"image/jpeg":{"schema":{"type":"string","format":"binary"}},"multipart/form-data":{"schema":{"type":"object","description":"Any field name: the first picture part is used."}}}},"responses":{"200":{"description":"What each monitor did. A message with no picture (a camera heartbeat) answers ignored: no_picture.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FrameResult"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid request or configuration, or policy_refusal.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/recorder-upload":{"post":{"tags":["Recorders"],"summary":"Send a picture as a recorder","operationId":"recorderUpload","security":[{"recorderBasic":[]}],"description":"What Camly's FTP gateway calls for each snapshot a recorder uploads; you may call it yourself with the recorder's FTP login. path is where the recorder wrote the file: the channel and the trigger are read from it. The picture goes to the camera added for that channel. A channel with no camera answers ignored: channel_not_added, and nothing is charged.","parameters":[{"name":"path","in":"query","required":false,"schema":{"type":"string","maxLength":1000},"description":"The path of the file on the FTP side, such as /NVR/2026-11-21/003/jpg/10/15/30[M][0@0][0].jpg."}],"requestBody":{"required":true,"content":{"image/jpeg":{"schema":{"type":"string","format":"binary"}}}},"responses":{"200":{"description":"What each monitor did, or why the picture was ignored.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FrameResult"}}}},"401":{"description":"Missing, unknown or revoked key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The key lacks the scope (a Run only key cannot manage agents).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Invalid request or configuration, or policy_refusal.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"components":{"schemas":{"AgentConfig":{"properties":{"type":{"type":"string","enum":["event","detect","measure","tracker","read","find"],"description":"event: a yes/no question. detect: find classes of objects. measure: read a value. tracker: follow one object or vehicle. read: read printed or displayed text. find: count given items, for pictures of the past (look-backs, pictures requests); not on monitors."},"question":{"type":"string","maxLength":1000,"default":"","description":"event, measure and read: what to look at, in plain words. find: an optional condition on the rest of the scene."},"classes":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"string","const":"auto"},{"type":"null"}],"description":"detect: up to 20 names of things to find, or \"auto\"."},"measure":{"anyOf":[{"$ref":"#/components/schemas/Measure"},{"type":"null"}],"description":"measure: the variable to read and an optional condition."},"subject":{"type":"string","maxLength":200,"default":"","description":"tracker: the object or vehicle to follow (never a person)."},"expect":{"anyOf":[{"type":"string","maxLength":100},{"type":"null"}],"description":"read: the text you are looking for. It is not shown to the model, which reads blind; the API compares afterwards, so a match is not suggested by the question."},"items":{"anyOf":[{"items":{"$ref":"#/components/schemas/FindItem"},"type":"array","maxItems":5,"minItems":1},{"type":"null"}],"description":"find: 1 to 5 things to count, each a library item (item: its key) and/or a description, with count, the least wanted (default 1)."},"together":{"type":"boolean","default":true,"description":"find: true (default) when every item must be in the same picture; false when one is enough."},"zone":{"anyOf":[{"items":{"prefixItems":[{"type":"number"},{"type":"number"}],"type":"array","maxItems":2,"minItems":2},"type":"array","maxItems":32,"minItems":3},{"type":"null"}],"description":"Only look inside this polygon (3 to 32 points)."},"line":{"anyOf":[{"$ref":"#/components/schemas/Line"},{"type":"null"}],"description":"tracker: a line to watch, with the crossing direction."},"threshold":{"type":"number","maximum":1.0,"minimum":0.0,"default":0.7,"description":"Confidence needed to flag, 0-1 (default 0.7)."},"model_tier":{"type":"string","enum":["lite","pro"],"default":"lite","description":"lite (default) or pro. Pro is priced higher and may not be available on every plan."},"language":{"type":"string","enum":["en","fr"],"default":"en","description":"Language of the description: en or fr."}},"additionalProperties":false,"type":"object","required":["type"],"description":"What the agent looks for. Points are [x, y] in 0-1 picture units, from the top-left corner."},"Archive":{"properties":{"interval_seconds":{"type":"integer","maximum":3600.0,"minimum":1.0,"default":30,"description":"A slow timer, the safety net: one picture every this many seconds."},"burst_per_second":{"type":"integer","maximum":5.0,"minimum":0.0,"default":2,"description":"While something moves in the motion_zone, this many pictures per second. 0: timer only."},"days":{"type":"integer","maximum":90.0,"minimum":1.0,"default":14,"description":"Older pictures are deleted, 90 days at most."},"max_gb":{"type":"integer","maximum":500.0,"minimum":1.0,"default":40,"description":"The oldest pictures go first past this size."},"hours":{"anyOf":[{"$ref":"#/components/schemas/Hours"},{"type":"null"}],"description":"Keep pictures only during these hours."},"mode":{"type":"string","enum":["pictures","video"],"default":"pictures","description":"pictures (default) or video: the bridge also records the stream in 10-second pieces (Bridge 2.9.4); searches look between the pictures and a look-back match gets a 10-second clip."},"video_url":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"description":"video: the sub-stream of the camera, on the same camera host, without a login (the one of the camera is used). Empty: the main stream."}},"additionalProperties":false,"type":"object","description":"A rolling archive of pictures kept by the bridge on the site, never sent to Camly as such. On by default for a new bridge camera; null turns it off. What it may hold is yours to decide and to declare."},"BridgePatch":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":120,"minLength":1},{"type":"null"}]},"tag":{"anyOf":[{"type":"string","maxLength":80,"minLength":1},{"type":"null"}],"description":"The customer or site, 80 characters at most; null removes it."}},"additionalProperties":false,"type":"object"},"CameraPatch":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":120,"minLength":1},{"type":"null"}]},"url":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"description":"For a bridge camera: rtsp:// or http:// address, without a login."},"sealed_credentials":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"description":"The camera login, sealed to the bridge (camly-seal-v1)."},"motion_source":{"anyOf":[{"type":"string","enum":["pixel","onvif"]},{"type":"null"}],"description":"pixel compares pictures on site; onvif uses the camera's own motion events, and needs onvif_xaddr."},"onvif_xaddr":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"description":"The camera's ONVIF service address, for motion_source onvif. A scan finds it."},"archive":{"anyOf":[{"$ref":"#/components/schemas/Archive"},{"type":"null"}],"description":"null turns the archive off, and the bridge deletes what it kept."},"motion_zone":{"anyOf":[{"items":{"items":{"type":"number"},"type":"array"},"type":"array"},{"type":"null"}],"description":"3 to 32 [x, y] points in 0-1 picture units where motion counts; null for the whole picture."}},"additionalProperties":false,"type":"object"},"ChatRequest":{"properties":{"messages":{"items":{"$ref":"#/components/schemas/Message"},"type":"array","maxItems":40,"minItems":1,"description":"The conversation so far, ending with the user. Up to 40."},"image":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"A picture in base64, to talk about."},"incidents":{"anyOf":[{"$ref":"#/components/schemas/IncidentScope"},{"type":"null"}],"description":"Talk about what monitors found. Needs a Full access key."},"language":{"type":"string","enum":["en","fr"],"default":"en"},"model_tier":{"type":"string","enum":["lite","pro"],"default":"lite"},"stream":{"type":"boolean","default":true,"description":"Server-Sent Events by default; false for one JSON answer."}},"additionalProperties":false,"type":"object","required":["messages"]},"Condition":{"properties":{"op":{"type":"string","enum":["eq","gt","lt","ge","le","between","outside"]},"value":{"anyOf":[{"type":"number"},{"type":"null"}]},"min":{"anyOf":[{"type":"number"},{"type":"null"}]},"max":{"anyOf":[{"type":"number"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["op"],"description":"eq, gt, lt, ge, le take value; between and outside take min and max."},"FindItem":{"properties":{"item":{"anyOf":[{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,39}$"},{"type":"null"}]},"count":{"type":"integer","maximum":50.0,"minimum":1.0,"default":1}},"additionalProperties":false,"type":"object"},"FindSpec":{"properties":{"items":{"items":{"$ref":"#/components/schemas/FindItem"},"type":"array","maxItems":5,"minItems":1},"together":{"type":"boolean","default":true},"also":{"type":"string","maxLength":300,"default":""},"threshold":{"type":"number","maximum":1.0,"minimum":0.0,"default":0.7},"language":{"type":"string","pattern":"^(en|fr)$","default":"en"}},"additionalProperties":false,"type":"object","required":["items"]},"Hours":{"properties":{"days":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}]},"timezone":{"type":"string","default":"UTC"},"from":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$","default":"00:00"},"to":{"type":"string","pattern":"^(([01]\\d|2[0-3]):[0-5]\\d|24:00)$","default":"24:00"}},"additionalProperties":false,"type":"object","description":"days are ISO weekdays, 1 = Monday. A from later than to crosses midnight, and belongs to the day it starts on."},"IncidentRules":{"properties":{"confirm_checks":{"type":"integer","maximum":10.0,"minimum":1.0,"default":2,"description":"Positive checks in a row that open it."},"clear_checks":{"type":"integer","maximum":10.0,"minimum":1.0,"default":2,"description":"Negative checks in a row that close it."},"max_open_minutes":{"type":"integer","maximum":43200.0,"minimum":1.0,"default":1440,"description":"It closes at this age, whatever the checks say."},"update_every_minutes":{"anyOf":[{"type":"integer","maximum":1440.0,"minimum":0.0},{"type":"null"}],"description":"Send incident.updated this often while open; 0 on every positive check; absent never."}},"additionalProperties":false,"type":"object","description":"When a stream of checks becomes an incident."},"IncidentScope":{"properties":{"camera":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only the incidents of this camera."},"monitor":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Only the incidents of this monitor."},"hours":{"type":"integer","maximum":168.0,"minimum":1.0,"default":24,"description":"How far back from now: 24 by default, 168 at most."}},"additionalProperties":false,"type":"object"},"ItemPatch":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":80,"minLength":1},{"type":"null"}]}},"additionalProperties":false,"type":"object"},"Line":{"properties":{"points":{"prefixItems":[{"prefixItems":[{"type":"number"},{"type":"number"}],"type":"array","maxItems":2,"minItems":2},{"prefixItems":[{"type":"number"},{"type":"number"}],"type":"array","maxItems":2,"minItems":2}],"type":"array","maxItems":2,"minItems":2,"description":"Two [x, y] points in 0-1 picture units."},"direction":{"type":"string","enum":["any","left","right"],"default":"any"}},"additionalProperties":false,"type":"object","required":["points"],"description":"A line drawn on the picture the model sees: a crossing counts when something moves across it. direction any counts both ways; left or right counts only crossings towards that side, seen going from the first point to the second, and the picture shows it as an arrow."},"Measure":{"properties":{"variable":{"type":"string","maxLength":40,"minLength":1,"pattern":"^[A-Za-z][A-Za-z0-9_ ]*$","description":"Its name, such as level or count."},"unit":{"type":"string","maxLength":12,"default":"","description":"Such as % or cm."},"condition":{"anyOf":[{"$ref":"#/components/schemas/Condition"},{"type":"null"}],"description":"Flag when the value meets it."},"reference_value":{"anyOf":[{"type":"number"},{"type":"null"}],"description":"The value in reference_image."}},"additionalProperties":false,"type":"object","required":["variable"],"description":"The value to read."},"Message":{"properties":{"role":{"type":"string","enum":["user","assistant"]},"content":{"type":"string","maxLength":4000,"minLength":1,"description":"A user message has at most 1000 characters."}},"additionalProperties":false,"type":"object","required":["role","content"]},"MonitorPatch":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":120,"minLength":1},{"type":"null"}]},"agent_version":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"description":"Move the monitor to this version of its agent."},"schedule":{"anyOf":[{"$ref":"#/components/schemas/Schedule"},{"type":"null"}],"description":"Replaces the whole schedule."},"incident_rules":{"anyOf":[{"$ref":"#/components/schemas/IncidentRules"},{"type":"null"}],"description":"Replaces the whole set of rules."},"webhook_endpoint":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"One endpoint for its events; null for every endpoint of the project."}},"additionalProperties":false,"type":"object"},"NewAgent":{"properties":{"name":{"type":"string","maxLength":120,"minLength":1,"description":"Shown in the console."},"config":{"$ref":"#/components/schemas/AgentConfig"},"note":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"description":"What this version changes."}},"additionalProperties":false,"type":"object","required":["name","config"],"description":"A new saved agent; its configuration becomes version 1."},"NewCamera":{"properties":{"name":{"type":"string","maxLength":120,"minLength":1},"source":{"type":"string","enum":["push","bridge","simulated"],"default":"push"},"bridge":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"For source bridge: the bridge that reads this camera."},"url":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"description":"For source bridge: rtsp:// or http:// address, without a login (send it in sealed_credentials)."},"sealed_credentials":{"anyOf":[{"type":"string","maxLength":4000},{"type":"null"}],"description":"The camera login, sealed to the bridge public_key (camly-seal-v1). Never put a password in url."},"motion_source":{"type":"string","enum":["pixel","onvif"],"default":"pixel","description":"Bridge cameras: pixel compares pictures on site; onvif uses the camera's own motion events."},"onvif_xaddr":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"description":"The ONVIF service address, needed with motion_source onvif."},"motion_zone":{"anyOf":[{"items":{"items":{"type":"number"},"type":"array"},"type":"array"},{"type":"null"}],"description":"Bridge cameras: where motion counts, 3 to 32 points [x, y] in 0-1 picture units. It decides when the bridge reacts; pictures stay whole. Absent: the whole picture. The person on site can also draw it in the Bridge app."},"archive":{"anyOf":[{"$ref":"#/components/schemas/Archive"},{"type":"null"}],"description":"For source bridge: a rolling archive kept on site, for look-back. Off when absent."},"recorder":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"For source push: the recorder that sends this camera's pictures by FTP. Give channel too."},"channel":{"anyOf":[{"type":"integer","maximum":256.0,"minimum":1.0},{"type":"null"}],"description":"The channel of that recorder, from 1."}},"additionalProperties":false,"type":"object","required":["name"],"description":"See Create a camera."},"NewEndpoint":{"properties":{"url":{"type":"string","maxLength":500,"minLength":8},"event_types":{"items":{"type":"string"},"type":"array","default":[]}},"additionalProperties":false,"type":"object","required":["url"]},"NewEnrollmentToken":{"properties":{"kind":{"type":"string","enum":["single","fleet"],"default":"single"},"max_uses":{"anyOf":[{"type":"integer","maximum":1000.0,"minimum":1.0},{"type":"null"}],"description":"kind fleet: how many bridges it can enrol."},"valid_hours":{"anyOf":[{"type":"integer","maximum":2160.0,"minimum":1.0},{"type":"null"}],"description":"kind fleet: 720 by default, 2160 at most. A single token lasts 24 hours."},"note":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"tag":{"anyOf":[{"type":"string","maxLength":80,"minLength":1},{"type":"null"}],"description":"Given to every bridge it enrols."}},"additionalProperties":false,"type":"object"},"NewItem":{"properties":{"key":{"type":"string","pattern":"^[a-z0-9][a-z0-9_-]{0,39}$"},"name":{"anyOf":[{"type":"string","maxLength":80,"minLength":1},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["key","description"]},"NewLookback":{"properties":{"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"},"config":{"anyOf":[{"$ref":"#/components/schemas/AgentConfig"},{"type":"null"}],"description":"Inline configuration, usually type read with expect."},"agent":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Or a saved agent."},"agent_version":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}]},"max_pictures":{"type":"integer","maximum":360.0,"minimum":1.0,"default":60,"description":"Pictures checked at most. Pictures of motion bursts come first, then the timer pictures. Each is one check."},"only_motion":{"type":"boolean","default":false,"description":"Check only the pictures of motion bursts: cheaper when nothing matches, but if motion was missed the timer pictures are not looked at."},"results":{"type":"string","enum":["first","best"],"default":"first"},"top":{"type":"integer","maximum":5.0,"minimum":1.0,"default":3}},"additionalProperties":false,"type":"object","required":["from","to"],"description":"See Search the archive."},"NewMonitor":{"properties":{"name":{"type":"string","maxLength":120,"minLength":1},"camera":{"type":"string"},"agent":{"type":"string"},"agent_version":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"description":"Default: the latest version, pinned now."},"schedule":{"$ref":"#/components/schemas/Schedule","default":{"min_interval_seconds":60,"max_interval_seconds":900,"motion":true}},"incident_rules":{"$ref":"#/components/schemas/IncidentRules","default":{"confirm_checks":2,"clear_checks":2,"max_open_minutes":1440}},"webhook_endpoint":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Send its events to this endpoint only. Absent: every endpoint of the project."}},"additionalProperties":false,"type":"object","required":["name","camera","agent"],"description":"See Create a monitor."},"NewPicker":{"properties":{"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"},"reference":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"from_name":{"anyOf":[{"type":"string","maxLength":80,"minLength":1},{"type":"null"}]},"locale":{"type":"string","pattern":"^(en|fr)$","default":"en"},"max_pictures":{"type":"integer","maximum":60.0,"minimum":1.0,"default":30},"only_motion":{"type":"boolean","default":false},"find":{"anyOf":[{"$ref":"#/components/schemas/FindSpec"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["from","to","title"]},"NewPictures":{"properties":{"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"},"max_pictures":{"type":"integer","maximum":60.0,"minimum":1.0,"default":30},"only_motion":{"type":"boolean","default":false},"find":{"anyOf":[{"$ref":"#/components/schemas/FindSpec"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["from","to"]},"NewRecorder":{"properties":{"name":{"type":"string","maxLength":120,"minLength":1}},"additionalProperties":false,"type":"object","required":["name"]},"NewReference":{"properties":{"camera":{"type":"string"},"pictures":{"type":"string"},"picture":{"type":"string"},"box":{"items":{"type":"number"},"type":"array"}},"additionalProperties":false,"type":"object","required":["camera","pictures","picture","box"]},"NewVersion":{"properties":{"config":{"$ref":"#/components/schemas/AgentConfig"},"note":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"description":"What this version changes."}},"additionalProperties":false,"type":"object","required":["config"],"description":"A new version of a saved agent. Earlier versions stay runnable."},"RecorderPatch":{"properties":{"name":{"type":"string","maxLength":120,"minLength":1}},"additionalProperties":false,"type":"object","required":["name"]},"Schedule":{"properties":{"min_interval_seconds":{"type":"integer","maximum":86400.0,"minimum":0.0,"default":60,"description":"Never two checks closer than this, even on motion. At least 10 with a live key."},"max_interval_seconds":{"type":"integer","maximum":86400.0,"minimum":10.0,"default":900,"description":"A bridge sends a picture at least this often."},"hours":{"anyOf":[{"$ref":"#/components/schemas/Hours"},{"type":"null"}],"description":"When the monitor works. Absent: always."},"motion":{"type":"boolean","default":true,"description":"Let motion trigger a check between intervals."}},"additionalProperties":false,"type":"object","description":"Limits on checks. A bridge applies them on site; for pushed cameras the API enforces them."},"Simulate":{"properties":{"ticks":{"type":"integer","maximum":16.0,"minimum":1.0,"default":1,"description":"1 to 16 ticks of the 8-tick script."}},"additionalProperties":false,"type":"object"},"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["type","code","message","request_id"],"properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","permission_error","billing_error","policy_error","rate_limit_error","api_error"]},"code":{"type":"string","examples":["insufficient_balance","budget_exceeded","policy_refusal","rate_limit_exceeded"]},"message":{"type":"string"},"request_id":{"type":"string","examples":["req_8f2a..."]}}}}},"Region":{"type":"object","properties":{"label":{"type":"string"},"point":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2,"description":"[x, y] in 0-1 picture units, from the top-left corner."}}},"RunResult":{"type":"object","required":["flagged"],"properties":{"flagged":{"type":"boolean","description":"The answer: the event happened, the classes were found, the condition is met, the subject is the same."},"confidence":{"type":["number","null"],"minimum":0,"maximum":1,"description":"From 0 to 1, the scale of threshold."},"description":{"type":["string","null"],"description":"One or two sentences on what was seen."},"regions":{"type":"array","items":{"$ref":"#/components/schemas/Region"},"description":"Where things were seen."},"measurement":{"type":"object","description":"type measure only.","properties":{"variable":{"type":"string"},"value":{"type":["number","null"]},"unit":{"type":"string"}}},"condition_met":{"type":"boolean","description":"type measure with a condition."},"text":{"type":["string","null"],"description":"type read only: the text as read, with ? for a character that could not be read. Null when not found."},"matched":{"type":"boolean","description":"type read with expect: the text read contains the expected one. Case, spaces and separators do not count."},"track":{"type":"object","description":"type tracker only.","properties":{"identity":{"type":"string","description":"Whether the subject in the picture is the one in the reference: same, different or unknown."},"moved":{"type":"boolean"}}}}},"Run":{"type":"object","properties":{"id":{"type":"string","examples":["run_..."]},"object":{"const":"run"},"type":{"type":"string","enum":["event","detect","measure","tracker","read"]},"model_tier":{"type":"string","enum":["lite","pro"]},"mode":{"type":"string","enum":["live","test"]},"agent":{"type":"string","description":"When run by a saved agent."},"version":{"type":"integer"},"result":{"$ref":"#/components/schemas/RunResult"},"usage":{"type":"object","properties":{"checks":{"type":"integer","description":"Pictures analysed."},"cost_eur":{"type":"string","examples":["0.005"]}}},"created":{"type":"string","format":"date-time"}}},"RunRecord":{"type":"object","description":"A past check. The picture is not kept.","properties":{"id":{"type":"string","examples":["run_..."]},"object":{"const":"run"},"type":{"type":"string","enum":["event","detect","measure","tracker","read"]},"mode":{"type":"string","enum":["live","test"]},"status":{"type":"string","description":"succeeded, or failed when the model gave no usable answer: not charged."},"source":{"type":"string","description":"api, console or monitor."},"model_tier":{"type":"string","enum":["lite","pro"]},"monitor":{"type":["string","null"]},"lookback":{"type":["string","null"]},"agent":{"type":["string","null"]},"version":{"type":["integer","null"]},"result":{"oneOf":[{"$ref":"#/components/schemas/RunResult"},{"type":"null"}],"description":"null when the check failed."},"error":{"type":["string","null"],"description":"Why a check failed, such as vision_unavailable."},"usage":{"type":"object","properties":{"checks":{"type":"integer"},"cost_eur":{"type":"string"}}},"created":{"type":"string","format":"date-time"}}},"RunRequest":{"type":"object","description":"Either an inline `config` or a saved `agent` (and optionally its `version`); one `image` or a burst of `images`.","properties":{"config":{"$ref":"#/components/schemas/AgentConfig"},"agent":{"type":"string","description":"A saved agent of the key's project (agt_...)."},"version":{"type":"integer","minimum":1,"description":"Defaults to the latest version."},"image":{"type":"string","contentEncoding":"base64","description":"A JPEG, PNG, WebP or BMP, at most 10 MB."},"images":{"type":"array","maxItems":6,"items":{"type":"string","contentEncoding":"base64"},"description":"A burst of pictures in time order (event and detect)."},"reference_image":{"type":"string","contentEncoding":"base64","description":"measure: a picture with a known value; tracker: the picture of the subject."}}},"Balance":{"type":"object","properties":{"object":{"const":"balance"},"currency":{"const":"eur"},"available_eur":{"type":"string","examples":["42.12"]}}},"Agent":{"type":"object","properties":{"id":{"type":"string"},"object":{"const":"agent"},"name":{"type":"string"},"project_id":{"type":"string"},"latest_version":{"type":"integer","description":"The newest version number."},"config":{"$ref":"#/components/schemas/AgentConfig"},"versions":{"type":"array","description":"Newest first. Not included when listing agents.","items":{"type":"object","properties":{"version":{"type":"integer"},"note":{"type":["string","null"]},"created":{"type":"string","format":"date-time"}}}},"created":{"type":"string","format":"date-time"},"updated":{"type":"string","format":"date-time"},"archived":{"type":["string","null"],"format":"date-time","description":"When it was archived in the console, or null. Archived agents are listed only with ?include_archived=true and cannot run."}}},"AgentVersion":{"type":"object","properties":{"agent":{"type":"string","description":"The agent this version belongs to."},"version":{"type":"integer"},"note":{"type":["string","null"],"description":"What changed, as written when it was saved."},"config":{"$ref":"#/components/schemas/AgentConfig"},"created":{"type":"string","format":"date-time"}}},"Camera":{"type":"object","description":"A camera, fed by your code (push) or by a Camly Bridge.","properties":{"id":{"type":"string","examples":["cam_..."]},"object":{"const":"camera"},"name":{"type":"string"},"source":{"type":"string","enum":["push","bridge","simulated"]},"bridge":{"type":["string","null"],"description":"The bridge that reads it; null for a pushed or simulated camera."},"url":{"type":["string","null"],"description":"Bridge cameras: the address on the site network, without a password."},"added_by":{"type":"string","enum":["api","site"],"description":"site: added in the Bridge app by the person on site. It sends nothing until you attach a monitor."},"has_credentials":{"type":"boolean","description":"Whether a sealed login is stored. The login itself is never returned."},"archive":{"oneOf":[{"$ref":"#/components/schemas/Archive"},{"type":"null"}],"description":"The archive settings; null when it is off."},"motion_zone":{"type":["array","null"],"items":{"type":"array","items":{"type":"number"}},"description":"Where motion counts. Null: the whole picture."},"archive_status":{"type":["object","null"],"description":"What the bridge last reported: pictures, bytes, oldest."},"motion_source":{"type":"string","enum":["pixel","onvif"]},"onvif_xaddr":{"type":["string","null"],"description":"The camera's ONVIF service address, for motion_source onvif."},"status":{"type":"string","enum":["unknown","online","offline"]},"mode":{"type":"string","enum":["live","test"]},"upload_url":{"oneOf":[{"$ref":"#/components/schemas/UploadUrl"},{"type":"null"}],"description":"Push cameras: the upload URL, if one was made (never the token itself)."},"recorder":{"type":["string","null"],"description":"The recorder whose channel feeds this camera, or null."},"channel":{"type":["integer","null"],"description":"That channel of the recorder."},"last_frame":{"type":["string","null"],"format":"date-time","description":"When the last picture arrived."},"created":{"type":["string","null"],"format":"date-time"}}},"Monitor":{"type":"object","description":"What ties a camera to an agent: the schedule and the incident rules.","properties":{"id":{"type":"string","examples":["mon_..."]},"object":{"const":"monitor"},"name":{"type":"string"},"camera":{"type":"string"},"agent":{"type":"string"},"agent_version":{"type":"integer","description":"The pinned version. It moves only when you change it."},"mode":{"type":"string","enum":["live","test"]},"status":{"type":"string","enum":["active","paused"]},"paused_reason":{"type":["string","null"],"description":"user, insufficient_balance, budget_exceeded or idle_test (a test monitor on the simulated camera, untouched for 7 days)."},"schedule":{"$ref":"#/components/schemas/Schedule"},"incident_rules":{"$ref":"#/components/schemas/IncidentRules"},"webhook_endpoint":{"type":["string","null"],"description":"When set, this monitor sends its events to that endpoint only."},"open_incident":{"type":["string","null"],"description":"The id of its open incident, or null."},"last_check":{"type":["string","null"],"format":"date-time","description":"When it last checked a picture."},"created":{"type":["string","null"],"format":"date-time"}}},"Incident":{"type":"object","description":"Something that lasted: it has a start, an end and one evidence picture.","properties":{"id":{"type":"string","examples":["inc_..."]},"object":{"const":"incident"},"monitor":{"type":"string"},"camera":{"type":"string"},"mode":{"type":"string","enum":["live","test"]},"status":{"type":"string","enum":["open","closed"]},"started":{"type":"string","format":"date-time","description":"The first positive check."},"confirmed":{"type":"string","format":"date-time","description":"When the rules opened the incident."},"closed":{"type":["string","null"],"format":"date-time"},"close_reason":{"type":["string","null"],"enum":["cleared","max_duration","no_data",null]},"description":{"type":["string","null"]},"checks":{"type":"integer","description":"Checks made while it was open."},"peak_confidence":{"type":["number","null"],"description":"0-1."},"evidence_url":{"type":["string","null"],"description":"Fetch it with your key. Null once expired or deleted."},"evidence_expires":{"type":["string","null"],"format":"date-time","description":"When the evidence picture is deleted."}}},"Event":{"type":"object","description":"What a webhook delivers. Deduplicate on id: delivery is at least once.","properties":{"id":{"type":"string","examples":["evt_..."]},"object":{"const":"event"},"type":{"type":"string","enum":["incident.opened","incident.updated","incident.closed","monitor.paused","monitor.resumed","camera.offline","camera.online","bridge.offline","bridge.online","lookback.finished","camera.added","camera.removed","camera.renamed","bridge.enrolled","bridge.discovered","billing.balance_low","billing.recharge_failed","budget.threshold_reached","pictures.ready","picture.kept","picker.chosen"]},"mode":{"type":"string","enum":["live","test"]},"data":{"type":"object"},"created":{"type":"string","format":"date-time"}}},"WebhookEndpoint":{"type":"object","properties":{"id":{"type":"string","examples":["whe_..."]},"object":{"const":"webhook_endpoint"},"url":{"type":"string"},"mode":{"type":"string","enum":["live","test"]},"event_types":{"type":"array","items":{"type":"string","enum":["incident.opened","incident.updated","incident.closed","monitor.paused","monitor.resumed","camera.offline","camera.online","bridge.offline","bridge.online","lookback.finished","camera.added","camera.removed","camera.renamed","bridge.enrolled","bridge.discovered","billing.balance_low","billing.recharge_failed","budget.threshold_reached","pictures.ready","picture.kept","picker.chosen"]},"description":"Empty: every event."},"secret":{"type":"string","description":"Returned once, at creation. Verifies Camly-Signature."},"created":{"type":"string","format":"date-time"}}},"Bridge":{"type":"object","description":"A Camly Bridge on a site. One bridge serves many cameras.","properties":{"id":{"type":"string","examples":["br_..."]},"object":{"const":"bridge"},"name":{"type":"string"},"tag":{"type":["string","null"],"description":"Your label: which customer or site."},"mode":{"type":"string","enum":["live","test"]},"status":{"type":"string","enum":["online","offline"]},"hostname":{"type":["string","null"],"description":"The name of the computer it runs on."},"agent_version":{"type":["string","null"],"description":"The version of the Camly Bridge."},"public_key":{"type":"string","description":"Seal camera logins to this key; only this bridge can open them."},"last_heartbeat":{"type":["string","null"],"format":"date-time","description":"Its last heartbeat. bridge.offline goes out after 15 minutes without one."},"discovered":{"type":"array","items":{"type":"object"},"description":"Cameras it found on its network."},"created":{"type":"string","format":"date-time"},"revoked":{"type":["string","null"],"format":"date-time","description":"When it was revoked, or null."}}},"EnrollmentToken":{"type":"object","properties":{"id":{"type":"string","examples":["ent_..."]},"object":{"const":"enrollment_token"},"kind":{"type":"string","enum":["single","fleet"]},"mode":{"type":"string","enum":["live","test"]},"token":{"type":"string","description":"Returned once, at creation."},"last4":{"type":"string","description":"The last four characters, to recognise it. The token itself is shown once."},"max_uses":{"type":"integer"},"uses":{"type":"integer","description":"Bridges enrolled with it so far."},"note":{"type":["string","null"]},"tag":{"type":["string","null"],"description":"Bridges enrolled with this token arrive with this tag."},"expires":{"type":"string","format":"date-time","description":"After this, it enrols nothing."},"created":{"type":"string","format":"date-time"}}},"FrameResult":{"type":"object","description":"One entry per monitor of the camera.","properties":{"object":{"const":"frame"},"camera":{"type":"string"},"received":{"type":"string","format":"date-time"},"next_frame_seconds":{"type":["integer","null"],"description":"When to send the next picture: the shortest interval while something is being confirmed or an incident is open, the longest otherwise. Null: no active monitor."},"checks":{"type":"array","items":{"type":"object","properties":{"monitor":{"type":"string"},"skipped":{"type":"string","description":"paused, outside_hours, motion_off, min_interval, rate_limited, insufficient_balance or budget_exceeded: no check was made and nothing was charged."},"run":{"type":"string"},"flagged":{"type":"boolean"},"confidence":{"type":["number","null"]},"failed":{"type":"boolean","description":"No usable answer; not charged."},"incident":{"oneOf":[{"$ref":"#/components/schemas/Incident"},{"type":"null"}]}}}}}},"Lookback":{"type":"object","description":"A search in a bridge archive.","properties":{"id":{"type":"string","examples":["lbk_..."]},"object":{"const":"lookback"},"camera":{"type":"string"},"mode":{"type":"string","enum":["live","test"]},"from":{"type":"string","format":"date-time"},"to":{"type":"string","format":"date-time"},"agent":{"type":["string","null"]},"agent_version":{"type":["integer","null"]},"status":{"type":"string","enum":["pending","running","found","not_found","failed","expired"]},"reason":{"type":["string","null"],"description":"no_pictures, exhausted, max_pictures, insufficient_balance, budget_exceeded, rate_limited or bridge_silent."},"pictures_checked":{"type":"integer","description":"Each one was a check."},"max_pictures":{"type":"integer"},"only_motion":{"type":"boolean"},"captured":{"type":["string","null"],"format":"date-time","description":"When the matching picture was taken."},"run":{"type":["string","null"],"description":"The check that matched."},"result":{"oneOf":[{"$ref":"#/components/schemas/RunResult"},{"type":"null"}],"description":"The answer for the picture that matched."},"picture_url":{"type":["string","null"],"description":"Fetch it with your key. The matching picture as the bridge kept it (up to 1920 pixels wide since Bridge 2.9.0; the check used it at 1280). Kept for the project retention."},"picture_expires":{"type":["string","null"],"format":"date-time"},"created":{"type":["string","null"],"format":"date-time"},"finished":{"type":["string","null"],"format":"date-time"}}},"Pictures":{"type":"object","description":"The pictures of a time window in a bridge archive.","properties":{"id":{"type":"string","examples":["pic_..."]},"object":{"const":"pictures"},"camera":{"type":"string"},"mode":{"type":"string","enum":["live","test"]},"from":{"type":["string","null"],"format":"date-time"},"to":{"type":["string","null"],"format":"date-time"},"max_pictures":{"type":"integer"},"only_motion":{"type":"boolean"},"status":{"type":"string","enum":["pending","ready","failed","expired"]},"reason":{"type":["string","null"],"description":"no_pictures (the archive holds nothing in the window), bridge_error or bridge_silent."},"cost_eur":{"type":"string"},"created":{"type":["string","null"],"format":"date-time"},"finished":{"type":["string","null"],"format":"date-time"},"pictures":{"type":"array","items":{"$ref":"#/components/schemas/Picture"},"description":"In time order. Not in lists."}}},"Picture":{"type":"object","description":"One archived picture of a window.","properties":{"id":{"type":"string","examples":["pi_..."]},"object":{"const":"picture"},"captured":{"type":["string","null"],"format":"date-time"},"motion":{"type":"boolean","description":"Taken during a motion burst."},"settled":{"type":"boolean","description":"Taken once the scene went still after motion: the result of a movement, such as bags put down (Bridge 2.9.3)."},"small_url":{"type":["string","null"],"description":"The small picture (480 px wide), with your key. Kept 24 hours."},"small_expires":{"type":["string","null"],"format":"date-time"},"full":{"type":"object","properties":{"status":{"type":"string","enum":["none","pending","kept","failed"],"description":"none until you keep it; pending while the bridge sends it."},"reason":{"type":["string","null"]},"url":{"type":["string","null"]},"expires":{"type":["string","null"],"format":"date-time"}}}}},"Picker":{"type":"object","description":"A hosted picker: a link for the person who chooses the picture.","properties":{"id":{"type":"string","examples":["pk_..."]},"object":{"const":"picker"},"camera":{"type":"string"},"pictures":{"type":"string","description":"The pictures request it opened (pic_...)."},"url":{"type":"string","description":"The link, on creation only: send it as it is. Anyone with it can see the pictures of the window for 24 hours and choose one."},"title":{"type":"string"},"reference":{"type":["string","null"],"description":"Your own id, sent back as it is."},"from_name":{"type":"string","description":"Who the page says asks: your organisation name unless you give one."},"locale":{"type":"string","enum":["en","fr"]},"status":{"type":"string","enum":["open","chosen","expired"]},"expires":{"type":["string","null"],"format":"date-time"},"created":{"type":["string","null"],"format":"date-time"},"chosen":{"type":["object","null"],"properties":{"picture":{"type":"string"},"captured":{"type":["string","null"],"format":"date-time"},"chosen_at":{"type":["string","null"],"format":"date-time"},"boxes":{"type":"array","items":{"type":"array","items":{"type":"number"}},"description":"[x1, y1, x2, y2] in 0-1 units of the picture: what the person circled."},"full":{"type":"object","description":"As on a picture: status kept with its url, or failed with a reason."}}}}},"Item":{"type":"object","description":"An item of the library: what a Find counts.","properties":{"id":{"type":"string","examples":["it_..."]},"object":{"const":"item"},"key":{"type":"string","description":"What a Find names, such as white_wrap: lower case, digits, - and _."},"name":{"type":"string"},"description":{"type":"string","description":"What it looks like, for the model."},"references":{"type":"integer","description":"How many reference crops it has, on all cameras."},"created":{"type":["string","null"],"format":"date-time"},"updated":{"type":["string","null"],"format":"date-time"}}},"ItemReference":{"type":"object","description":"A crop of an item on one camera: the same angle and light as the next Find there.","properties":{"id":{"type":"string","examples":["ir_..."]},"object":{"const":"item_reference"},"item":{"type":"string"},"camera":{"type":"string"},"source":{"type":"string","enum":["picker","api"]},"box":{"type":"array","items":{"type":"number"},"description":"[x1, y1, x2, y2] in 0-1 units of the picture it was cut from."},"picture_url":{"type":"string"},"created":{"type":["string","null"],"format":"date-time"}}},"UploadUrl":{"type":"object","description":"A secret address the camera itself sends pictures to, with its own event rules: no API key header needed.","properties":{"object":{"const":"upload_url"},"camera":{"type":"string"},"last4":{"type":"string"},"token":{"type":"string","description":"Returned once, at creation: cmly_up_..."},"url":{"type":"string","description":"Returned once. Give it to the camera as an HTTP(S) POST recipient. Add ?trigger=motion for motion rules."},"basic_auth_url":{"type":"string","description":"For cameras that take a user name and password: this address, with the token as the password."},"created":{"type":"string","format":"date-time"}}},"Recorder":{"type":"object","description":"A recorder (DVR or NVR) that sends its own snapshots by FTP. One login for the whole recorder; each channel you add is a push camera.","properties":{"id":{"type":"string","examples":["rec_..."]},"object":{"const":"recorder"},"name":{"type":"string"},"mode":{"type":"string","enum":["live","test"]},"ftp":{"type":"object","description":"What to type in the recorder's FTP settings.","properties":{"host":{"type":"string"},"port":{"type":"integer"},"user":{"type":"string"},"password":{"type":"string","description":"Returned once, at creation or when a new password is made."},"password_last4":{"type":"string"}}},"channels":{"type":"array","description":"Channels that sent a picture, and channels that have a camera.","items":{"type":"object","properties":{"channel":{"type":"integer"},"camera":{"type":["string","null"],"description":"Its camera, or null: pictures of this channel are not checked until you add one."},"last_picture":{"type":["string","null"],"format":"date-time"},"path":{"type":["string","null"],"description":"The path of its last picture, as the recorder wrote it."}}}},"unrecognised":{"type":["object","null"],"description":"The last picture whose path did not tell the channel, or null.","properties":{"last_picture":{"type":["string","null"],"format":"date-time"},"path":{"type":["string","null"]}}},"last_picture":{"type":["string","null"],"format":"date-time"},"created":{"type":"string","format":"date-time"},"revoked":{"type":["string","null"],"format":"date-time"}}}},"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"A key from the console: cmly_sk_live_... or cmly_sk_test_..."},"uploadBasic":{"type":"http","scheme":"basic","description":"A camera upload token (cmly_up_...) as the password."},"recorderBasic":{"type":"http","scheme":"basic","description":"A recorder's FTP user name and password."}}},"servers":[{"url":"https://api.camly.ai"}],"tags":[{"name":"Runs","description":"Analyse pictures."},{"name":"Chat","description":"Talk about a picture, or about what your monitors found."},{"name":"Agents","description":"Saved, versioned configurations."},{"name":"Cameras","description":"Where pictures come from."},{"name":"Monitors","description":"A camera, an agent, a schedule and incident rules."},{"name":"Incidents","description":"What the monitors found, with a start, an end and evidence."},{"name":"Look-back","description":"Find a picture of the past in a bridge archive, on the site."},{"name":"Items","description":"The item library for Find: what to count, with reference crops per camera."},{"name":"Pictures","description":"The archived pictures of a time window, small, with no model check; keep the ones a person chooses as evidence."},{"name":"Events","description":"Everything that happened, to read or to catch up on."},{"name":"Webhooks","description":"Signed deliveries. Camly-Signature: t=<time>,v1=<HMAC-SHA256 of \"t.body\">."},{"name":"Bridges","description":"Camly Bridges on your sites."},{"name":"Recorders","description":"Recorders (DVR, NVR) that send their own snapshots by FTP."},{"name":"Balance","description":"Your prepaid balance."}],"security":[{"apiKey":[]}]}