{"openapi":"3.0.0","info":{"title":"Evercam Server","description":"The Evercam API backs the Evercam dashboard and is open to third-party\napplications. All endpoints are served over HTTPS from\n`https://admin-api-keys.staging.media.evercam.io`.\n\nStart with **Auth** for how to authenticate and **Getting Started** for\nversioning and the error format. Third-party apps authenticate through\n**OAuth**.\n","version":"3.0-oas3"},"servers":[{"url":"https://admin-api-keys.staging.media.evercam.io","description":"Dash API (dash)"}],"security":[{"Bearer-Token":[]},{"oauth2":[]}],"paths":{"/v2/status":{"get":{"tags":["Status"],"summary":"API status","description":"Health-check endpoint. Always returns `204 No Content` with an empty body when the\nAPI is reachable. This route is registered before the authentication pipeline, so it\nis fully public and requires no credentials.\n","operationId":"getStatus","security":[{}],"responses":{"204":{"description":"The API is up. Empty body."}}}},"/v2/logs":{"post":{"tags":["Logs"],"summary":"Forward a frontend log line","description":"Forward a structured log entry from the frontend into the backend's system\nlogs. The backend auto-injects standard labels (`application`, `level`,\n`user_id`, `origin`, `user_agent`) and emits the entry through its logging\npipeline.\n","operationId":"createLog","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["level","message"],"properties":{"level":{"type":"string","description":"Log severity level.","enum":["error","info","warning"],"example":"error"},"message":{"type":"string","description":"The log line. Max 2000 characters.","maxLength":2000,"example":"checkout failed for plan pro"}}}}}},"responses":{"204":{"description":"Log line accepted and forwarded."},"400":{"description":"Invalid parameters","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}},"401":{"description":"Invalid API id / key or JWT token","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}}}}},"/v2/auth/login":{"post":{"tags":["Auth"],"summary":"Login","description":"Authenticate a user with an email (`username`) and `password`, returning\nthe user object plus a JWT access token.\n\nInvalid credentials, an account that requires a password reset, or a\nnon-admin logging in from the admin origin all return HTTP `400` with an\n`EvercamError` body (e.g. `code: \"INVALID_CREDENTIALS\"` or\n`code: \"PASSWORD_RESET\"`) — **not** `401`. A malformed request body\n(validation failure) also returns `400`.\n\n## Rate limiting\n\nAfter **3 failed password attempts within 5 minutes per email address**,\nfurther attempts are blocked with HTTP `429` for the remainder of the\nwindow. The counter increments only on a wrong password and resets on a\nsuccessful login.\n","operationId":"login","security":[{}],"requestBody":{"description":"User credentials (email/password)","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"username":{"type":"string","description":"The user's email address (the login identifier)."},"password":{"type":"string","format":"password","description":"User's password"}},"required":["username","password"],"example":{"username":"user@evercam.io","password":"password"}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1users/post/responses/201/content/application~1json/schema"}}}},"400":{"description":"Invalid credentials, password-reset required, non-admin login from the\nadmin origin, or a malformed request body. Body is an `EvercamError`.\n","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1users/post/responses/400/content/application~1json/schema"}}}},"429":{"description":"Too many failed login attempts for this email address.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds the caller should wait before retrying."}},"content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"too_many_login_attempts"},"message":{"type":"string","example":"Too many failed login attempts. Try again in 5 minutes."},"retry_after_minutes":{"type":"integer","example":5}}}}}}}}},"/v2/auth/{provider}":{"post":{"tags":["Auth"],"summary":"Login with provider","description":"Authenticate a user with a provider using OAuth2.0.\n\n## Supported Providers\n\nCurrently we support authenticating using `Google` and `Microsoft`.\n\n## Login Accounts\n\nEach user signed up using username / password on our system has an implicit account associated with it.\nSo when a user authenticate using another provider and we do have a user with the same email, a new login \naccount is created and associated with the user entity.\n\nSo this means that a user can sign in using multiple providers.\n\n## Provider authentication and Evercam users\n\nWhen a user authenticate using a provider account, we try to get the profile details of this user,\nwe distinguish tree cases:\n\n* The user is already signed with this account and has an associated user in our database. In this case \nthe user is provided with an access token.\n\n* The user is already exists (there's a user with the same **email** address) but has no associated account \nwith the authenticated provider. In this case a new login account is created and associated with the user.\n\n* There's no user found in the database using the email retrieved from the user info of the authenticated user, \nin this case a new user and login account are created.\n\n## Errors\n\nThe possible errors are :\n  - PROVIDER_AUTH_FAILURE\n  - PROVIDER_EMAIL_REQUIRED\n  - BAD_ARGUMENT\n\nRefer to the [error code description section](#section/Errors) for more details about this errors.\n","operationId":"providerLogin","security":[{}],"parameters":[{"name":"provider","in":"path","required":true,"description":"The SSO provider exid used for authentication. Validated against the `sso_providers` table (an unknown value yields a `400` BAD_ARGUMENT error). Currently `google` and `microsoft` are supported.\n","example":"google","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"Supply EITHER `id_token` (Google only) OR both `code` and `redirect_uri`. When `id_token` is present it takes precedence and `code`/`redirect_uri` are ignored; otherwise `code` and `redirect_uri` are both required.\n","properties":{"code":{"type":"string","description":"The authorization code retrieved from the provider","example":"4/0Aea..."},"redirect_uri":{"type":"string","format":"uri","description":"The redirect uri used to get the authorization code","example":"https://dash.evercam.io/auth/callback"},"id_token":{"type":"string","description":"An id token supplied by the authentication provider as a means to authenticate to back-end services.\nUsually used for mobile/desktop apps as this apps tend to authenticate the user via SSO clients.\n\n**Note** that this field is an alternative to the fields above (and currently works only for `Google` provider), \nif this is present it takes precedence over _code/redirect_uri_ fields.\n"}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1users/post/responses/201/content/application~1json/schema"}}}},"400":{"description":"Provider authentication failed or the request was invalid. The rendered `%Evercam.Error{}` `code` distinguishes the case:\n- `PROVIDER_AUTH_FAILURE` — the provider rejected the `code`/`id_token`\n  or the token could not be verified.\n- `PROVIDER_EMAIL_REQUIRED` — the provider profile did not expose an\n  email address.\n- `BAD_ARGUMENT` — missing/invalid body params, or an unknown `provider`.\n","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1users/post/responses/400/content/application~1json/schema"}}}}}}},"/v2/auth/logout":{"delete":{"tags":["Auth"],"summary":"Logout","description":"Revoke the current JWT/access token and log the user out. The token to\nrevoke is taken from the authenticated session (`current_token`); if no\ntoken is present the request still succeeds (idempotent).\n","operationId":"logout","security":[{"Bearer-Token":[]}],"responses":{"200":{"description":"Successfully logged out. Returns an empty JSON object.","content":{"application/json":{"schema":{"type":"object","properties":{}},"example":{}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"}}}},"/v2/auth/credentials":{"get":{"tags":["Auth"],"summary":"Get API id/key","description":"Return the authenticated user's API credentials (`api_id` and `api_key`).\nOnly a session the user signed into (password or SSO login) can read them;\nreturns `401` if the caller is not authenticated or is a widget, and `403`\nfor any other credential (API key, OAuth token, impersonation session).\n","operationId":"getMyCredentials","security":[{"Bearer-Token":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"api_id":{"type":"string","description":"Ths api id"},"api_key":{"type":"string","description":"The api key"}},"example":{"api_id":"fdf545s4dfs87","api_key":"4fd45645sdf45s4df5s45df54sdf"}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"}}}},"/v2/api-keys":{"get":{"tags":["API Keys"],"summary":"List your API keys","description":"Lists the API keys belonging to the authenticated user. Only `masked_key` is\nreturned; raw keys are not retrievable after creation.\n","operationId":"listApiKeys","x-required-permission":"Authenticated user (own keys only)","parameters":[{"name":"name","in":"query","description":"Partial, case-insensitive match on the key name.","schema":{"type":"string"}},{"name":"type","in":"query","schema":{"type":"string","enum":["user","workflows","widget"]}},{"name":"status","in":"query","description":"Filter by computed status. `active` means not revoked, not expired and `active: true`. Repeat the parameter to match any of several.\n","style":"form","explode":true,"schema":{"type":"array","items":{"type":"string","enum":["active","expired","revoked"]}}},{"name":"expires_at_from","in":"query","schema":{"type":"string","format":"date"}},{"name":"expires_at_to","in":"query","schema":{"type":"string","format":"date"}},{"name":"last_used_at_from","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"last_used_at_to","in":"query","schema":{"type":"string","format":"date-time"}},{"name":"sort","in":"query","description":"`<field>|asc` or `<field>|desc` over `name`, `expires_at`, `last_used_at` or `status`. Defaults to `name|asc`.\n","example":"last_used_at|desc","schema":{"type":"string"}},{"name":"page","in":"query","schema":{"type":"integer","minimum":1,"default":1}},{"name":"limit","in":"query","schema":{"type":"integer","minimum":1,"default":50}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"from":{"$ref":"#/paths/~1v2~1widgets/get/responses/200/content/application~1json/schema/properties/from"},"to":{"$ref":"#/paths/~1v2~1widgets/get/responses/200/content/application~1json/schema/properties/to"},"page":{"$ref":"#/paths/~1v2~1company~1kits/get/parameters/0/schema"},"limit":{"$ref":"#/paths/~1v2~1company~1kits/get/parameters/1/schema"},"total":{"$ref":"#/paths/~1v2~1widgets/get/responses/200/content/application~1json/schema/properties/total"},"items":{"type":"array","items":{"$ref":"#/paths/~1v2~1api-keys~1{id}/patch/responses/200/content/application~1json/schema"}}}}}}},"400":{"$ref":"#/paths/~1v2~1widgets/get/responses/400"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"}}},"post":{"tags":["API Keys"],"summary":"Create an API key","description":"Creates a key owned by the authenticated user and returns the raw key. This\nis the only time the raw key is available — it is stored hashed.\n\nNot available to API-key, widget or impersonated sessions: a credential must\nnever mint another credential.\n","operationId":"createApiKey","x-required-permission":"Authenticated user (password, SSO or OAuth session)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","scopes","resources"],"properties":{"name":{"type":"string","description":"Must be unique among the user's non-revoked keys.","example":"CI pipeline"},"type":{"type":"string","enum":["user","workflows","widget"],"default":"user"},"scopes":{"type":"array","minItems":1,"items":{"type":"string","description":"A grant an API key can hold. Holding a scope is necessary but not sufficient: most of the API is unreachable with an API key whatever scopes it carries.\n","enum":["user:info","profile:write","projects:read","cameras:read","camera:live_view","camera:recordings","camera:ptz","project:gate_report","project:timeline","project:media_hub","project:bim","project:drone","project:360","project:planner","project:smart_search","project:ppe_monitoring","project:weather","project:video_wall","project:automations","project:connectors","project:comments","project:settings","project:widgets"],"example":"project:media_hub"},"example":["projects:read","cameras:read"]},"expires_at":{"type":"string","format":"date","description":"Must be in the future when supplied.","example":"2027-01-31"},"resources":{"type":"object","required":["projects"],"properties":{"projects":{"type":"array","minItems":1,"description":"Project exids the key may reach. At least one is required — a key is always bound to projects.\n","items":{"type":"string"},"example":["007pr-zqhay"]}}}}}}}},"responses":{"201":{"description":"Key created. The raw `key` is returned once and never again.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/paths/~1v2~1api-keys~1{id}/patch/responses/200/content/application~1json/schema"},{"type":"object","description":"Returned only when a key is created or regenerated. This is the single occasion on which the raw key is available — it is stored hashed and cannot be retrieved afterwards.\n","properties":{"key":{"type":"string","description":"The raw key: the `evk_` prefix followed by 43 url-safe base64 characters. Send it in `x-access-key` or as `Authorization: ApiKey <key>`.\n","example":"evk_EXAMPLE_KEY_NOT_A_REAL_CREDENTIAL"}},"required":["key"]}]}}}},"400":{"description":"Validation failed. Common `target`s: `name` (taken), `scopes` (empty or\nunknown scope), `projects` (empty or unknown project exid),\n`expires_at` (not in the future).\n","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1users/post/responses/400/content/application~1json/schema"}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"}}}},"/v2/api-keys/{id}":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"example":99}],"patch":{"tags":["API Keys"],"summary":"Update an API key","description":"Updates one of the authenticated user's own keys. Every field is optional;\nomitted fields are left as they are. Revoked keys cannot be updated.\n","operationId":"updateApiKey","x-required-permission":"Authenticated user (own keys only)","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","example":"CI pipeline (renamed)"},"scopes":{"type":"array","minItems":1,"items":{"$ref":"#/paths/~1v2~1api-keys/post/requestBody/content/application~1json/schema/properties/scopes/items"}},"expires_at":{"type":"string","format":"date"},"resources":{"type":"object","properties":{"projects":{"type":"array","minItems":1,"description":"Replaces the bound projects. Cannot be cleared.","items":{"type":"string"}}}}}}}}},"responses":{"200":{"description":"Updated key","content":{"application/json":{"schema":{"type":"object","description":"A scoped API key. The raw key is only ever returned by the create and regenerate operations; everywhere else only `masked_key` is available.\n","properties":{"id":{"type":"integer","example":99},"name":{"type":"string","description":"Unique per owner among keys that have not been revoked.","example":"CI pipeline"},"type":{"type":"string","enum":["user","workflows","widget"],"example":"user"},"masked_key":{"type":"string","example":"evk_EXAM********MPLE"},"scopes":{"type":"array","description":"Grants the key holds. An operation is reachable when the key holds at least one of the scopes granting it.","items":{"$ref":"#/paths/~1v2~1api-keys/post/requestBody/content/application~1json/schema/properties/scopes/items"},"example":["projects:read","cameras:read"]},"projects":{"type":"array","description":"Project exids the key is bound to. At least one is required.","items":{"type":"string"},"example":["007pr-zqhay"]},"active":{"type":"boolean","description":"Toggled by the toggle-active operation. An inactive key is rejected with 401.","example":true},"expires_at":{"type":"string","format":"date","nullable":true,"description":"Must be in the future when set. A past date makes the key unusable.","example":"2027-01-31"},"last_used_at":{"type":"string","format":"date-time","nullable":true,"example":"2026-09-16T08:19:20Z"},"revoked_at":{"type":"string","format":"date-time","nullable":true,"description":"Set once revoked. Revocation is permanent.","example":null},"inserted_at":{"type":"string","format":"date-time","example":"2026-09-16T08:17:56Z"},"updated_at":{"type":"string","format":"date-time","example":"2026-09-16T08:17:56Z"}}}}}},"400":{"description":"Validation failed, or the key has already been revoked.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1users/post/responses/400/content/application~1json/schema"}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"404":{"description":"Resource not found","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}}}},"delete":{"tags":["API Keys"],"summary":"Revoke an API key","description":"Revokes the key: `revoked_at` is set and it is rejected from then on. The\nrecord is kept and still appears in the list with a `revoked` status.\nRevocation is permanent — issue a new key rather than trying to undo it.\n\nTo delete the record outright an administrator uses the admin API.\n","operationId":"revokeApiKey","x-required-permission":"Authenticated user (own keys only)","responses":{"204":{"description":"Key revoked"},"400":{"description":"The key has already been revoked.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1users/post/responses/400/content/application~1json/schema"}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"404":{"$ref":"#/paths/~1v2~1api-keys~1{id}/patch/responses/404"}}}},"/v2/api-keys/{id}/regenerate":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"example":99}],"post":{"tags":["API Keys"],"summary":"Regenerate an API key","description":"Rotates the key: the existing one is revoked and a replacement is issued\nwith the same name, type, scopes, projects and expiry — under a **new id**.\nThe old key stops working immediately, so callers must be updated before\nrotating.\n\nThe raw replacement key is returned once, as on create.\n","operationId":"regenerateApiKey","x-required-permission":"Authenticated user (own keys only)","responses":{"201":{"description":"Replacement key. Note the new `id`.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1api-keys/post/responses/201/content/application~1json/schema"}}}},"400":{"description":"The key has already been revoked.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1users/post/responses/400/content/application~1json/schema"}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"404":{"$ref":"#/paths/~1v2~1api-keys~1{id}/patch/responses/404"}}}},"/v2/api-keys/{id}/toggle-active":{"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer"},"example":99}],"post":{"tags":["API Keys"],"summary":"Activate or deactivate an API key","description":"Flips `active`. A deactivated key is rejected with `401` until it is\nswitched back on — unlike revocation, this is reversible.\n","operationId":"toggleApiKeyActive","x-required-permission":"Authenticated user (own keys only)","responses":{"200":{"description":"The key with its new `active` value","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1api-keys~1{id}/patch/responses/200/content/application~1json/schema"}}}},"400":{"description":"The key has already been revoked.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1users/post/responses/400/content/application~1json/schema"}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"404":{"$ref":"#/paths/~1v2~1api-keys~1{id}/patch/responses/404"}}}},"/v2/auth/users/me":{"get":{"tags":["Auth"],"summary":"Get current user","description":"Validates the credential sent with the request and returns the authenticated user's profile, along with the method the request was authenticated with. Returns 401 if the credential is missing, invalid, or expired.","operationId":"getCurrentUser","security":[{"Bearer-Token":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/paths/~1v2~1users~1{id}/get/responses/200/content/application~1json/schema"},{"type":"object","properties":{"auth_method":{"type":"string","description":"How the request was authenticated.","enum":["password","impersonation","sso","widget","api_key_legacy","oauth_access","oauth_refresh","api_key"]}}}]}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"}}}},"/v2/auth/options":{"get":{"tags":["Auth"],"summary":"Get authentication options","description":"Retrieve the available authentication methods for the given email address.\nIf the email (or its company domain) has SSO providers configured, those\nproviders are returned; otherwise the default password option is returned.\n\nAn unknown email never fails — it falls back to the default login options\nand still returns `200`. Omitting the required `email` query param returns\n`400`.\n\nThis endpoint is public (callable without authentication); a `401` is only\nreturned if invalid credentials are explicitly supplied in the request.\n","operationId":"getAuthOptions","security":[{},{"Bearer-Token":[]}],"parameters":[{"name":"email","in":"query","required":true,"description":"User's email address to check for available authentication options","schema":{"type":"string","format":"email","example":"user@evercam.io"}}],"responses":{"200":{"description":"Successfully retrieved authentication options","content":{"application/json":{"schema":{"type":"object","properties":{"options":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["password","sso"],"description":"Authentication type"},"exid":{"type":"string","description":"External ID of the SSO provider (only for SSO type)"},"name":{"type":"string","description":"Display name of the SSO provider (only for SSO type)"},"client_id":{"type":"string","description":"OAuth client ID (only for SSO type)"},"scope":{"type":"string","description":"OAuth scope (only for SSO type)"},"response_type":{"type":"string","description":"OAuth response type (only for SSO type)"},"login_url":{"type":"string","format":"uri","description":"SSO login URL (only for SSO type)"},"icon_url":{"type":"string","format":"uri","description":"URL to the provider's icon (only for SSO type)"},"prompt":{"type":"string","description":"OAuth prompt parameter (only for SSO type). Controls the authentication experience:\n- none: Silent authentication, no UI displayed\n- login: Force re-authentication\n- consent: Force consent screen display\n- select_account: Show account selection for multiple accounts\n"}},"required":["type"]}}}},"example":{"options":[{"type":"password"},{"type":"sso","exid":"google-sso-123","name":"Google SSO","client_id":"abc123.apps.googleusercontent.com","scope":"openid email profile","response_type":"code","login_url":"https://accounts.google.com/o/oauth2/v2/auth","icon_url":"https://example.com/icons/google.png","prompt":"consent"},{"type":"sso","exid":"okta-sso-456","name":"Okta SSO","client_id":"0oa1b2c3d4e5f6g7h8i9","scope":"openid email profile","response_type":"code","login_url":"https://company.okta.com/oauth2/v1/authorize","icon_url":"https://example.com/icons/okta.png","prompt":"select_account"}]}}}},"400":{"description":"The `email` query parameter is missing.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"},"example":{"message":"Invalid parameters."}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"}}}},"/v2/auth/signup_options":{"get":{"tags":["Auth"],"summary":"Get signup options","description":"Retrieve available signup methods. If `email` is provided, returns the SSO providers\nconfigured for that user's company (falling back to the company matched by the email\ndomain). If no email is provided, the user/company is not found, or no SSO providers are\nconfigured, the default signup options are returned (`password` plus the global signup SSOs).\n\nRuns under the optional-auth pipeline: anonymous requests are allowed, but if credentials\nare supplied and are invalid the API returns 401 before reaching the controller.\n","operationId":"getSignupOptions","security":[{},{"Bearer-Token":[]}],"parameters":[{"name":"email","in":"query","required":false,"description":"User's email address to check for available signup options (optional)","schema":{"type":"string","format":"email"}}],"responses":{"200":{"$ref":"#/paths/~1v2~1auth~1options/get/responses/200"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"}}}},"/v2/auth/provider/{provider}":{"get":{"summary":"Get SSO provider config","description":"Returns the SSO provider configuration for a given provider exid. Used by\nthe login page to build the SSO redirect URL before the user authenticates.\n","operationId":"getSsoProvider","tags":["Auth"],"parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string","description":"SSO provider exid"}}],"responses":{"200":{"description":"Provider configuration","content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","enum":["password","sso"]},"exid":{"type":"string","nullable":true},"name":{"type":"string","nullable":true},"client_id":{"type":"string","nullable":true},"scope":{"type":"string","nullable":true},"response_type":{"type":"string","nullable":true},"login_url":{"type":"string","nullable":true},"icon_url":{"type":"string","nullable":true},"prompt":{"type":"string","nullable":true}}}}}},"404":{"$ref":"#/paths/~1v2~1api-keys~1{id}/patch/responses/404"}}}},"/v2/oauth/authorize":{"get":{"summary":"OAuth 2.0 authorization endpoint","description":"Initiates the OAuth 2.0 Authorization Code flow. Validates the client,\nredirect URI, and requested scopes, then redirects the browser to the\nconsent page on the frontend.\n\nSupports PKCE (`code_challenge` + `code_challenge_method`).\n","operationId":"oauthAuthorize","tags":["OAuth"],"parameters":[{"name":"client_id","in":"query","required":true,"schema":{"type":"string"}},{"name":"redirect_uri","in":"query","required":true,"schema":{"type":"string"}},{"name":"scope","in":"query","required":true,"schema":{"type":"string","description":"Space-separated list of requested scopes"}},{"name":"response_type","in":"query","required":true,"schema":{"type":"string","enum":["code"]}},{"name":"state","in":"query","required":false,"schema":{"type":"string"}},{"name":"code_challenge","in":"query","required":false,"schema":{"type":"string"}},{"name":"code_challenge_method","in":"query","required":false,"schema":{"type":"string","enum":["S256"]}}],"responses":{"302":{"description":"Redirect to consent page"},"400":{"$ref":"#/paths/~1v2~1oauth~1token/post/responses/400"}}}},"/v2/oauth/client-info":{"get":{"summary":"Get OAuth client info","description":"Returns public information about an OAuth client and human-readable\ndescriptions of the requested scopes. Used by the consent page to display\nthe app name, logo, and scope explanations before the user grants access.\n","operationId":"oauthClientInfo","tags":["OAuth"],"parameters":[{"name":"client_id","in":"query","required":true,"schema":{"type":"string"}},{"name":"scope","in":"query","required":false,"schema":{"type":"string","description":"Space-separated list of scopes to describe"}}],"responses":{"200":{"description":"Client info and scope descriptions","content":{"application/json":{"schema":{"type":"object","properties":{"client":{"type":"object","properties":{"name":{"type":"string"},"logo_url":{"type":"string","nullable":true},"description":{"type":"string","nullable":true}}},"scopes":{"type":"array","items":{"type":"object","properties":{"scope":{"type":"string"},"description":{"type":"string"},"group":{"type":"string"}}}}}}}}},"400":{"$ref":"#/paths/~1v2~1oauth~1token/post/responses/400"},"404":{"$ref":"#/paths/~1v2~1api-keys~1{id}/patch/responses/404"}}}},"/v2/oauth/consent":{"post":{"summary":"Submit OAuth consent decision","description":"Records the user's allow/deny decision for an OAuth authorization request.\nReturns a redirect URL containing an authorization code (allow) or an\n`access_denied` error (deny) to send back to the client application.\n","operationId":"oauthConsent","tags":["OAuth"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["decision","client_id","redirect_uri"],"properties":{"decision":{"type":"string","enum":["allow","deny"]},"client_id":{"type":"string"},"redirect_uri":{"type":"string"},"scope":{"type":"string","description":"Space-separated scopes (required when decision is allow)"},"state":{"type":"string"},"code_challenge":{"type":"string"},"code_challenge_method":{"type":"string"}}}}}},"responses":{"200":{"description":"Redirect URL for the client","content":{"application/json":{"schema":{"type":"object","properties":{"redirect_url":{"type":"string"}}}}}},"400":{"$ref":"#/paths/~1v2~1oauth~1token/post/responses/400"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"}}}},"/v2/oauth/token":{"post":{"summary":"Exchange authorization code for tokens","description":"Issues access and refresh tokens. Supports two grant types:\n- `authorization_code` — exchange a code obtained from the consent flow\n- `refresh_token` — obtain a new access token using a refresh token\n\nSupports PKCE via `code_verifier`.\n","operationId":"oauthToken","tags":["OAuth"],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["grant_type"],"properties":{"grant_type":{"type":"string","enum":["authorization_code","refresh_token"]},"code":{"type":"string","description":"Required for authorization_code grant"},"client_id":{"type":"string"},"client_secret":{"type":"string"},"redirect_uri":{"type":"string"},"code_verifier":{"type":"string","description":"PKCE verifier"},"refresh_token":{"type":"string","description":"Required for refresh_token grant"}}}}}},"responses":{"200":{"description":"Token response","content":{"application/json":{"schema":{"type":"object","properties":{"access_token":{"type":"string"},"refresh_token":{"type":"string"},"token_type":{"type":"string"},"expires_in":{"type":"integer"}}}}}},"400":{"description":"Bad request","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"}}}},"/v2/oauth/revoke":{"post":{"summary":"Revoke an OAuth token","description":"Revokes an access or refresh token (RFC 7009). Always returns 200 even\nif the token is invalid or already revoked.\n","operationId":"oauthRevoke","tags":["OAuth"],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["token"],"properties":{"token":{"type":"string"}}}}}},"responses":{"200":{"description":"Token revoked (or already invalid)"}}}},"/v2/oauth/introspect":{"post":{"summary":"Introspect an OAuth token","description":"Returns metadata about an access token (RFC 7662). The calling client must\nauthenticate via HTTP Basic auth or `client_id`/`client_secret` body params.\n\nReturns `{\"active\": false}` for invalid, expired, or revoked tokens.\n","operationId":"oauthIntrospect","tags":["OAuth"],"requestBody":{"required":true,"content":{"application/x-www-form-urlencoded":{"schema":{"type":"object","required":["token"],"properties":{"token":{"type":"string"},"client_id":{"type":"string"},"client_secret":{"type":"string"}}}}}},"responses":{"200":{"description":"Token introspection result","content":{"application/json":{"schema":{"type":"object","properties":{"active":{"type":"boolean"},"sub":{"type":"string","nullable":true},"scope":{"type":"string","nullable":true},"client_id":{"type":"string","nullable":true},"exp":{"type":"integer","nullable":true}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"}}}},"/v2/users":{"post":{"tags":["Users"],"summary":"User signup","description":"Register a new user and log them in.\n\nThis endpoint is public (no authentication required). On success the newly\ncreated user is returned together with a freshly minted access token.\n\nIf the email already has a pending project invite, the account is created\nalready confirmed.\n","operationId":"createUser","security":[{},{"Bearer-Token":[]}],"requestBody":{"description":"User's information","required":true,"content":{"application/json":{"schema":{"type":"object","allOf":[{"$ref":"#/paths/~1v2~1users~1{id}/patch/requestBody/content/application~1json/schema"},{"type":"object","properties":{"email":{"type":"string","format":"email","description":"User's unique email address.","example":"john@evercam.io"},"password":{"type":"string","format":"password","minLength":8,"maxLength":72,"description":"User's password. Must be 8-72 characters long and contain at least one special character.\n","example":"Str0ng!Pass"},"referral_url":{"type":"string","description":"Optional URL the user was referred from.","example":"https://evercam.io"}},"required":["firstname","lastname","password","email"]}]}}}},"responses":{"201":{"description":"User created and logged in.","content":{"application/json":{"schema":{"type":"object","allOf":[{"$ref":"#/paths/~1v2~1users~1{id}/get/responses/200/content/application~1json/schema"},{"type":"object","properties":{"token":{"type":"string","description":"JWT token","example":"<jwt-token>"}}}]}}}},"400":{"description":"Wrong or invalid params. Returned when the request body fails changeset\nvalidation, e.g.:\n* Missing/invalid firstname, lastname, email or country\n* Email has already been taken\n* Password too short or missing a special character\n","content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","description":"A unique error code"},"message":{"type":"string","description":"A human-readable error message"},"details":{"type":"object","description":"Other details related to the error."},"inner_error":{"description":"A nested error (may be an object or omitted), present for wrapped/validation errors."}}}}}}}}},"/v2/users/permissions":{"get":{"tags":["Users"],"summary":"Get user permissions","description":"Returns all effective permissions assigned to the authenticated user across\nevery resource (project, camera, app, company), derived from their assigned\nroles and any sub-assignments.\n","operationId":"getUserPermissions","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"permissions":{"type":"array","items":{"type":"object","properties":{"exid":{"type":"string","description":"Permission identifier.","example":"project-media_hub_view"},"resource_id":{"type":"string","description":"Resource exid this permission applies to.","example":"my-project-exid"}}}}}},"example":{"permissions":[{"exid":"project-media_hub_view","resource_id":"my-project-exid"},{"exid":"camera-recordings_view","resource_id":"cam-abc123"},{"exid":"access-control-view-roles","resource_id":"evercam-admin"}]}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"}}}},"/v2/users/roles":{"get":{"tags":["Users"],"summary":"Get user's assigned roles","description":"Retrieve all roles assigned to the authenticated user. \nResults can be filtered by resource type and resource ID.\n\nReturns parent role assignments only (excludes sub-assignments which are returned nested within each role).\n","operationId":"getUserRoles","parameters":[{"name":"resource_type","in":"query","description":"Filter roles by resource type. \nIf not provided, defaults to 'project'.\n","required":false,"schema":{"type":"string","enum":["project","camera","app","company"],"default":"project"},"example":"project"},{"name":"resource_id","in":"query","description":"Filter roles by specific resource ID (e.g., project exid, camera exid, or 'evercam-admin' for app roles).\n","required":false,"schema":{"type":"string"},"example":"my-project-exid"}],"responses":{"200":{"description":"Successfully retrieved user's assigned roles.","content":{"application/json":{"schema":{"type":"object","properties":{"roles":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"The unique identifier of the role.","example":123},"name":{"type":"string","description":"The name of the role.","example":"Project Manager"},"permissions":{"type":"array","items":{"type":"string"},"description":"Effective permissions for this role assignment. \nMay come from override_role if customized, otherwise from the base role.\n","example":["project-media_hub_view","project-timeline_view","project-settings_view"]},"sub_roles":{"type":"array","items":{"type":"object","properties":{"role_id":{"type":"integer","description":"The unique identifier of the sub role.","example":456},"resource_id":{"type":"string","description":"The resource ID (e.g., camera exid) for the sub role.","example":"camera-abc123"},"role_name":{"type":"string","nullable":true,"description":"The name of the sub role.","example":"Camera Viewer"},"permissions":{"type":"array","items":{"type":"string"},"description":"Permissions granted by this sub role.","example":["camera-live_view_view","camera-recordings_view"]}}},"description":"Sub roles associated with this role assignment.\nUsed for hierarchical roles like project roles that grant camera access.\n"},"resource_type":{"type":"string","description":"The type of resource this role applies to.","example":"project"},"resource_id":{"type":"string","description":"The specific resource ID this role is assigned to.","example":"my-project-exid"}}}}}},"examples":{"project_roles":{"summary":"Project roles response","value":{"roles":[{"id":1,"name":"Project Admin","permissions":["project-settings_view","project-settings_manage_project","project-settings_invite_users","project-settings_manage_roles"],"sub_roles":[{"role_id":10,"resource_id":"camera-xyz","role_name":"Camera Advanced","permissions":["camera-live_view_view","camera-recordings_view","camera-recordings_export_cloud","camera-recordings_export_local","camera-ptz_manage"]}],"resource_type":"project","resource_id":"my-project-123"}]}},"app_roles":{"summary":"Admin app roles response","value":{"roles":[{"id":5,"name":"Employee","permissions":["access-control-view-roles","users-view"],"sub_roles":[],"resource_type":"app","resource_id":"evercam-admin"}]}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"}}}},"/v2/users/me":{"delete":{"tags":["Users"],"summary":"Delete the authenticated user","description":"Soft-delete the authenticated user's own account. The frontend is\nexpected to gate this with a confirmation prompt. The body is\noptional; if the user owns cameras or projects, ownership is\ntransferred to `new_owner_email` (default\n`construction@evercam.io`).\n","operationId":"deleteSelf","requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"new_owner_email":{"type":"string","format":"email","description":"Email of the user who will receive ownership of any\ncameras or projects owned by the caller. Defaults to\n`construction@evercam.io`.\n","example":"ops@evercam.io"}}}}}},"responses":{"204":{"description":"Success."},"400":{"description":"Invalid `new_owner_email`."},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"404":{"description":"New owner does not exist."},"422":{"description":"Failed to transfer ownership of user resources."}}}},"/v2/users/{id}":{"get":{"tags":["Users"],"summary":"Get user's profile","description":"Returns a user's profile details.\n\nNon-admin callers may only fetch their own profile (the path `id`\nmust match the authenticated user's email). Admins may fetch any\nuser. To avoid leaking which emails are registered, callers without\npermission to read the requested user receive 404 (the same\nresponse as for an unknown email).\n","operationId":"getUser","parameters":[{"name":"id","description":"Unique id of the user","in":"path","required":true,"example":"user@evercam.io","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"title":"User","type":"object","properties":{"id":{"type":"string","description":"Unique user id."},"firstname":{"type":"string","description":"User first name."},"lastname":{"type":"string","description":"User last name."},"telephone":{"type":"string","description":"User internation Telephone."},"email":{"type":"string","format":"email","description":"User unique email."},"is_admin":{"type":"boolean","description":"Whether the user is an admin or not"},"persona":{"type":"string","description":"User's category. e.g. HR, sales, other, ...etc"},"country":{"type":"string","description":"User's country as an ISO 3166-1 alpha-2 code (e.g. `us`), or `null` if not set.","nullable":true},"company_id":{"type":"integer","description":"User's company unique ID"},"company_exid":{"type":"string","description":"User's company unique exid"},"company_name":{"type":"string","description":"User's company name"},"created_at":{"type":"string","format":"date-time","example":"2019-02-18T09:00:00.000+00:00","description":"Creation date of the user (date of sign up)"},"updated_at":{"type":"string","format":"date-time","example":"2019-02-18T09:00:00.000+00:00","description":"Last updated date of user"},"confirmed_at":{"type":"string","format":"date-time","example":"2019-02-18T09:00:00.000+00:00","description":"Date of the confirmation of a user"},"last_login_at":{"type":"string","format":"date-time","example":"2019-02-18T09:00:00.000+00:00","description":"Last login date of a user"},"evercam_account":{"type":"boolean","description":"Indicates whether the user has an evercam account or not.\n\nIf this value is `false`, it means that the user signed up using another provider\nother than Evercam. (e.g. Google account)\n"},"features":{"type":"array","items":{"type":"string"},"description":"List of activated feature flags"}},"example":{"id":"user@evercam.io","firstname":"John","lastname":"Doe","telephone":"+213659478521","email":"user@evercam.io","is_admin":false,"persona":"HR","country":"us","company_id":1,"company_exid":"evercam.io","company_name":"Evercam","evercam_account":true,"created_at":"2019-02-13T14:15:00Z","updated_at":"2019-02-13T14:15:00Z","confirmed_at":"2019-02-13T14:15:00Z","last_login_at":"2019-02-13T14:15:00Z","features":["feature1","feature2"]}}}}},"401":{"description":"Invalid API keys or Unauthorized"},"404":{"description":"User does not exist or caller is not allowed to read it."}}},"patch":{"tags":["Users"],"summary":"Update a user","description":"Updates some or all properties of the user identified by the path `id`\n(email).\n\nNon-admin callers may only update their own profile. Admins may update\nany user. Only the `firstname`, `lastname`, `telephone`, `persona`,\nand `country` fields are persisted; other fields in the request body\nare ignored.\n","operationId":"updateUser","parameters":[{"$ref":"#/paths/~1v2~1users~1{id}/get/parameters/0"}],"requestBody":{"description":"User's information","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"firstname":{"type":"string","minLength":2,"description":"User's first name"},"lastname":{"type":"string","minLength":2,"description":"User's last name"},"telephone":{"type":"string","description":"user's phone number"},"persona":{"type":"string"},"country":{"type":"string","description":"The user's country. Must be in ISO 3166 format."}},"example":{"firstname":"John","lastname":"Doe","email":"john@evercam.io","telephone":"+213699102520","persona":"HR","country":"dz"}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1users~1{id}/get/responses/200/content/application~1json/schema"}}}},"400":{"description":"Validation failure (e.g. invalid email or country)."},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"404":{"description":"User does not exist or caller is not allowed to update it."}}}},"/v2/users/{email}/delete":{"post":{"tags":["Users"],"deprecated":true,"summary":"Delete a user (deprecated)","description":"**Deprecated**: use `DELETE /v2/users/me` for self-deletion or `DELETE /v2/admin/users/{email}` for admin deletion of another user. This route is kept for backwards compatibility and will be removed in a future release.\n\n**Note:** the `verif_email` body field is no longer validated. Existing clients may continue to send it; the value is ignored.\n\nDelete a user.\n\n**Permissions**\n\nThis endpoint allows a user to delete his account or an admin to delete any account.\n\n**Pre-conditions**\n\nTo be able to delete a user, the following conditions must be validated:\n  * The field `verif_email` in the body of the request must be equal to the user's email to delete.\n  * `new_owner_email` must be non-empty and must not be the same as the user being deleted.\n\n**Ownership transfer**\n\nBefore deletion, all resources owned by the user (cameras, etc.) are transferred to the account identified by `new_owner_email` (defaults to `construction@evercam.io`). If that account does not exist, the request fails with `404`. If the transfer itself fails, the request fails with `422`.\n**Soft Deletion**\n\nIf the above conditions are satisfied, the user is soft deleted, means that the user is marked as deleted (field `deleted_at` is set)\nand the user record is kept in the database.\n\nSo a soft delete include the following:\n  * Delete all the records associated with this user except for **media** and **shared cameras**.\n  * Anonymize the user, means the following fields are updated: `firstname`, `lastname`, `email`, `password` and `telephone`.\n    * **firstname** is set to `User`\n    * **lastname** is set to `Deleted`\n    * **email** is set to `<random-value>@deleted.com`\n    * **password** is set to: `<random-value>`\n    * **telephone** is set to: `null`\n\n***Note***: `<random-value>` is a generated random string (usually a UUID 4)\n\n**Hard Deletion**\n\nEven if we soft delete users at first, we schedule a job that runs once a week that checks that soft deleted users has no more\ndependencies in **Evercam** by checking the shared cameras and the count of media.\n\nIf a user has no camera shared (perhaps the shared camera is deleted or another user deleted the share), and has no media then the user\nis permanently deleted from the system.\n","operationId":"deleteUser","parameters":[{"name":"email","description":"The user email","in":"path","required":true,"schema":{"type":"string","format":"email","example":"john@evercam.io"}}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"verif_email":{"type":"string","format":"email","description":"Another layer of verification, this is used to make sure that the user who initiated the delete request\nis deleting the intended user. Must equal the `email` path param.\n","example":"john@evercam.io"},"new_owner_email":{"type":"string","format":"email","description":"Email of the account that inherits the deleted user's owned resources. Must be non-empty and different from the deleted user's email.\n","default":"construction@evercam.io","example":"construction@evercam.io"}},"required":["verif_email"]}}}},"responses":{"204":{"description":"User deleted (no content)"},"400":{"description":"Invalid params — the `verif_email` did not match the user's email, or `new_owner_email` is empty / same as the deleted user.\n","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"The user to delete or the new owner does not exist.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}},"422":{"description":"Failed to transfer ownership of the user's resources.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}}}}},"/v2/users/{email}/features":{"get":{"summary":"Get user feature flags","description":"Returns the feature flags enabled for the authenticated user. Used by the\ndashboard to conditionally enable/disable features.\n","operationId":"getUserFeatures","tags":["Users"],"parameters":[{"name":"email","in":"path","required":true,"schema":{"type":"string","format":"email"}}],"responses":{"200":{"description":"Feature flags","content":{"application/json":{"schema":{"type":"object","properties":{"features":{"type":"array","items":{"type":"string"}}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"}}}},"/v2/users/session/activities":{"get":{"tags":["Users"],"summary":"Get user activities","description":"Returns audit log entries.\n\nNon-admin callers are scoped to their own logs: omitting `user_id` returns\nonly the caller's logs, and passing a `user_id` other than the caller's\nreturns 403. Admins may pass any `user_id`.\n","operationId":"getUserActivities","parameters":[{"name":"user_id","description":"Filter by user id. Non-admins may only pass their own id.","in":"query","required":false,"schema":{"type":"integer"}},{"name":"action","description":"Filter by one or more action names. A single bare value (e.g. `?action=login`) is also accepted.","in":"query","required":false,"style":"form","explode":true,"schema":{"type":"array","items":{"type":"string"},"example":["create","update"]}},{"name":"entity","description":"Filter by one or more entity names (e.g. cameras, projects). A single bare value is also accepted.","in":"query","required":false,"style":"form","explode":true,"schema":{"type":"array","items":{"type":"string"},"example":["cameras"]}},{"name":"from","in":"query","description":"Lower bound of date interval (ISO8601).","required":false,"example":"2019-01-18T09:00:00Z","schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","description":"Upper bound of date interval (ISO8601).","required":false,"example":"2019-02-18T09:00:00Z","schema":{"type":"string","format":"date-time"}},{"name":"camera_id","description":"Filter by camera id stored in audit details.","in":"query","required":false,"schema":{"type":"string"}},{"name":"router_id","description":"Filter by router id stored in audit details.","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","description":"Sort expression (e.g. `inserted_at:desc`).","in":"query","required":false,"schema":{"type":"string"}},{"$ref":"#/paths/~1v2~1video-walls/get/parameters/7"},{"$ref":"#/paths/~1v2~1video-walls/get/parameters/8"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"who":{"type":"string","description":"The user to whom belong the log"},"type":{"type":"string","enum":["user edited","login","compare created","on_hold","timelapse recordings created","stopped sharing","failed-share-request","edited","camera deleted","decommissioned","online","requested for password reset","under_maintenance","waiting_for_site_visit","shared","password changed","share-request","vh status","camera edited","cloud recordings created","waiting","file uploaded","offline","custom","archive created","compare deleted","camera created","public_note","camera updated","saved media URL","delete-share-request","retry archive creation","cloud recordings updated","archive edited","timelapse recordings updated","created","updated share","archive deleted","pending-share-request"]},"camera_exid":{"type":"string","description":"Unique id of a camera"},"inserted_at":{"type":"string","format":"date-time","description":"The creation date of the log"},"details":{"type":"object"}},"example":{"who":"user@evercam.io","type":"camera deleted","camera_exid":"dfdf-ersdf","inserted_at":"2020-02-05T15:12:51Z","details":{"detail1":"hello","detail2":"there"}}}}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"description":"Caller is not allowed to read another user's activities."},"422":{"description":"Invalid query parameters."}}}},"/v2/users/{id}/password/reset":{"post":{"tags":["Users"],"security":[{}],"summary":"Request a password reset","description":"Generates a one-time reset token for the user identified by the `{id}` (email) path segment and emails them instructions to change their password. This endpoint is public. To avoid leaking which emails are registered, it always returns 200 with the same generic message even when no matching user exists.","operationId":"initResetPassword","parameters":[{"$ref":"#/paths/~1v2~1users~1{id}/get/parameters/0"}],"responses":{"200":{"description":"Request accepted. The same message is returned whether or not the email is registered.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"If your email is in our database, you will receive a password reset email. Remember to check your spam."}},"required":["message"]}}}}}}},"/v2/users/{id}/password":{"patch":{"tags":["Users"],"security":[{}],"summary":"Finish password reset","description":"Completes a password reset: sets a new password for the user identified by the `{id}` (email) path segment, using the one-time `token` that was emailed to them by the reset-request endpoint. This endpoint is public (no authentication required) — the reset token is the credential.","operationId":"finishResetPassword","parameters":[{"$ref":"#/paths/~1v2~1users~1{id}/get/parameters/0"},{"name":"token","in":"query","description":"One-time password reset token issued by the reset-request endpoint.","required":true,"style":"form","explode":true,"schema":{"type":"string","example":"fdsfs54er845df"}}],"requestBody":{"description":"New password","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"password":{"type":"string","format":"password","minLength":6,"example":"Ad45Df6%df578"}},"required":["password"]}}}},"responses":{"200":{"description":"Password changed successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"example":{"message":"Success message"}}}}},"400":{"description":"Invalid or expired reset token, or the new password fails validation.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}},"404":{"description":"No user exists for the given email.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}}}}},"/v2/users/{email}/password/update":{"patch":{"tags":["Users"],"summary":"Update password","description":"Update the authenticated user's password. The path `id` (email)\nmust match the authenticated user; admins cannot reset another\nuser's password through this endpoint (use the password reset\nflow instead). A mismatched path returns 404 to avoid leaking\nwhich emails are registered.\n","operationId":"updatePassword","parameters":[{"name":"email","in":"path","required":true,"description":"User email.","schema":{"type":"string","format":"email"}}],"requestBody":{"description":"Current and new password","required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"current_password":{"type":"string","format":"password","description":"The current password"},"new_password":{"type":"string","format":"password","description":"The new password for the user"}},"required":["current_password","new_password"],"example":{"current_password":"old_password","new_password":"new_password"}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"example":{"message":"Password changed successfully."}}}}},"400":{"$ref":"#/paths/~1v2~1logs/post/responses/400"},"404":{"description":"Path `id` does not match the authenticated user (or user does\nnot exist).\n"}}}},"/v2/users/{id}/confirm":{"post":{"tags":["Users"],"security":[{}],"summary":"User confirmation","description":"Confirms a newly registered user's account using the confirmation code that was emailed to them. On success the account is marked confirmed and a fresh access token is issued and returned alongside the user's profile. This endpoint is public (no authentication required).","operationId":"confirmUser","parameters":[{"$ref":"#/paths/~1v2~1users~1{id}/get/parameters/0"},{"name":"c","in":"query","description":"Confirmation code sent to the user by email at sign-up.","required":true,"style":"form","explode":false,"schema":{"type":"string","example":"a1b2c3d4"}}],"responses":{"200":{"description":"Account confirmed. Returns the user profile with a new access token.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1users/post/responses/201/content/application~1json/schema"}}}},"400":{"description":"User not found for the given email, or the confirmation code is invalid (changeset error).","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}},"410":{"description":"The account is already confirmed / the confirmation link has expired.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1users/post/responses/400/content/application~1json/schema"}}}}}}},"/v2/users/active-sessions":{"get":{"tags":["Users"],"summary":"Get active sessions.","description":"Get active sessions of the connected user.<br/>A session is considered active if it's not revoked and created in less than a week.","operationId":"getMyActiveSessions","parameters":[{"name":"ip_address","in":"query","description":"Filter by ip address","required":false,"schema":{"type":"string"}},{"name":"os","in":"query","description":"Filter by os","required":false,"schema":{"type":"string"}},{"name":"browser","in":"query","description":"Filter by browser","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"from":{"$ref":"#/paths/~1v2~1widgets/get/responses/200/content/application~1json/schema/properties/from"},"to":{"$ref":"#/paths/~1v2~1widgets/get/responses/200/content/application~1json/schema/properties/to"},"page":{"$ref":"#/paths/~1v2~1company~1kits/get/parameters/0/schema"},"limit":{"$ref":"#/paths/~1v2~1company~1kits/get/parameters/1/schema"},"total":{"$ref":"#/paths/~1v2~1widgets/get/responses/200/content/application~1json/schema/properties/total"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"Session's id","example":1630},"browser":{"type":"string","description":"The browser from which the session is created","example":"Chrome"},"os":{"type":"string","description":"The os from which the session is created","example":"Windows 7"},"ip_address":{"type":"string","description":"The ip address of the user created the session","example":"162.241.1.25"},"created_at":{"type":"string","format":"date-time","description":"Creation date of the session"},"is_current":{"type":"boolean","description":"Whether the connected user use this session"},"last_used_at":{"type":"string","format":"date-time","description":"The date last used of this session"},"type":{"type":"string","enum":["password","impersonation","sso","widget","api_key","oauth_access","oauth_refresh"],"description":"Tells how the session (access token) was created."},"impersonated_by":{"type":"string","nullable":true,"description":"The email of the impersonator. `null` for non-impersonation sessions."}}}}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"}}}},"/v2/users/active-sessions/{id}":{"delete":{"tags":["Users"],"summary":"Revoke a session.","description":"Delete a session and clear the cache.","operationId":"revokeUserSession","parameters":[{"name":"id","in":"path","description":"The session's id","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"Session deleted"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"404":{"description":"No active session with the given id belongs to the authenticated user.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"},"example":{"message":"Active session not found."}}}}}}},"/v2/users/authorized-apps":{"get":{"tags":["Users"],"summary":"Get authorized apps.","description":"Get a list of third-party OAuth applications that have been granted access to the connected user's account.","operationId":"getMyAuthorizedApps","parameters":[{"name":"search","in":"query","description":"Filter by app name","required":false,"schema":{"type":"string"}},{"name":"page","in":"query","description":"Page number","required":false,"schema":{"type":"integer"}},{"name":"limit","in":"query","description":"Items per page","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"from":{"$ref":"#/paths/~1v2~1widgets/get/responses/200/content/application~1json/schema/properties/from"},"to":{"$ref":"#/paths/~1v2~1widgets/get/responses/200/content/application~1json/schema/properties/to"},"page":{"$ref":"#/paths/~1v2~1company~1kits/get/parameters/0/schema"},"limit":{"$ref":"#/paths/~1v2~1company~1kits/get/parameters/1/schema"},"total":{"$ref":"#/paths/~1v2~1widgets/get/responses/200/content/application~1json/schema/properties/total"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"The grant's id (refresh token id)","example":4521},"client_id":{"type":"string","description":"The OAuth client identifier","example":"ev_tqyLrzSjN5hIlmLfvDQknNW6VUUO64E5"},"client_name":{"type":"string","description":"The name of the OAuth application","example":"BuildingSmart Pro"},"client_description":{"type":"string","nullable":true,"description":"The description of the OAuth application","example":"A construction management tool"},"logo_url":{"type":"string","nullable":true,"description":"The logo URL of the OAuth application"},"scopes":{"type":"array","items":{"type":"string"},"description":"The scopes granted to this application","example":["cameras:read","camera:live_view"]},"granted_at":{"type":"string","format":"date-time","description":"When the user authorized this application"}}}}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"}}}},"/v2/users/authorized-apps/{id}":{"delete":{"tags":["Users"],"summary":"Revoke an authorized app grant.","description":"Revoke a specific OAuth grant, invalidating the refresh token and all associated access tokens. The user receives an email notification.","operationId":"revokeAuthorizedApp","parameters":[{"name":"id","in":"path","description":"The grant's id (refresh token id)","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"Grant revoked"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"404":{"description":"Grant not found"}}}},"/v2/company":{"get":{"summary":"Get company","description":"Returns statistics for the requester's own company (users / projects /\ncameras / kits / sessions counts). Evercam admins may instead look up any\ncompany by its Zoho id by passing `with_zoho=true` together with `id`.\n\n**Required permission:** `company-admin` feature on the requester's own\ncompany, or an Evercam admin.\n","operationId":"getCompany","x-required-permission":"company-admin (own company) or Evercam admin","tags":["Companies"],"parameters":[{"name":"with_zoho","in":"query","description":"When present (any value), the company is looked up by its Zoho id (`id`) instead of the requester's own `company_id`. Evercam admin only.","required":false,"schema":{"type":"string"},"example":"true"},{"name":"id","in":"query","description":"Zoho id of the company to look up. Only honoured when `with_zoho` is also supplied; otherwise the requester's own company is used.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer"},"exid":{"type":"string"},"name":{"type":"string"},"zoho_id":{"type":"string"},"domains":{"type":"string"},"linkedin_url":{"type":"string"},"sessions":{"type":"integer"},"projects":{"type":"integer"},"cameras":{"type":"integer"},"users":{"type":"integer"},"kits":{"type":"integer"},"sso_providers":{"type":"array","items":{"type":"string"}},"inserted_at":{"type":"string","format":"date-time"}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"description":"Forbidden. The requester is not an Evercam admin and either does not belong to the resolved company or lacks the `company-admin` feature (body `{ \"message\": \"Forbidden.\" }`).","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Some random error here"}}}}}},"404":{"description":"No company could be resolved (the requester has no `company_id`, or no company matches the supplied Zoho `id`) — body `{ \"message\": \"Not found.\" }`.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}}}}},"/v2/company/hdds":{"get":{"summary":"Get company HDDs","description":"Get HDD info for all cameras belonging to the authenticated user's company.\n\nThe company is resolved from the current user (`current_user.company_id`).\nOptionally, an admin may target a company by its Zoho id by passing both\nthe `with_zoho` and `id` query parameters.\n\n**Required permission:** the caller must be a `company-admin` of the resolved\ncompany (or a global admin).\n","operationId":"getCompanyHdds","x-required-permission":"company-admin on the resolved company","tags":["Companies"],"parameters":[{"name":"with_zoho","in":"query","required":false,"description":"When present (any value), the company is looked up by its Zoho id (taken from the `id` query parameter) instead of the current user's company.\n","schema":{"type":"string"}},{"name":"id","in":"query","required":false,"description":"Zoho id of the company to target. Only used when `with_zoho` is present.\n","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"serial_number":{"type":"string","nullable":true},"size":{"type":"string","nullable":true},"hdd_status":{"type":"string","nullable":true},"type":{"type":"string","nullable":true},"shelf_block":{"type":"string","nullable":true},"format":{"type":"string","nullable":true},"error_status":{"type":"string","nullable":true},"reported_capacity":{"type":"string","nullable":true},"reported_free_space":{"type":"string","nullable":true},"reported_property":{"type":"string","nullable":true},"reported_path":{"type":"string","nullable":true},"reported_hdd_type":{"type":"string","nullable":true},"location":{"type":"string","nullable":true,"description":"Physical location name of the HDD (from the associated location record)."},"footages":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"camera_name":{"type":"string"},"camera_exid":{"type":"string"},"start_date":{"type":"string","format":"date-time"},"end_date":{"type":"string","format":"date-time","nullable":true}}}}}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"No company found for the current user (or the given Zoho id).","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}}}}},"/v2/company/users":{"get":{"summary":"Get company users","description":"Returns a paginated report of the users belonging to the requester's own\ncompany.\n\n**Required permission:** `company-admin` feature on the requester's own\ncompany, or an Evercam admin.\n","operationId":"getCompanyUsers","x-required-permission":"company-admin (own company) or Evercam admin","tags":["Companies"],"parameters":[{"name":"page","in":"query","required":false,"schema":{"$ref":"#/paths/~1v2~1company~1kits/get/parameters/0/schema"}},{"name":"limit","in":"query","required":false,"description":"Page size. Defaults to 50.","schema":{"$ref":"#/paths/~1v2~1company~1kits/get/parameters/1/schema"}},{"name":"sort","in":"query","required":false,"description":"Sort expression, e.g. `email|asc`, `last_login_at|desc`.","schema":{"type":"string"},"example":"last_login_at|desc"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"from":{"$ref":"#/paths/~1v2~1widgets/get/responses/200/content/application~1json/schema/properties/from"},"to":{"$ref":"#/paths/~1v2~1widgets/get/responses/200/content/application~1json/schema/properties/to"},"page":{"$ref":"#/paths/~1v2~1company~1kits/get/parameters/0/schema"},"limit":{"$ref":"#/paths/~1v2~1company~1kits/get/parameters/1/schema"},"total":{"$ref":"#/paths/~1v2~1widgets/get/responses/200/content/application~1json/schema/properties/total"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"fullname":{"type":"string"},"email":{"type":"string","format":"email"},"events_count":{"type":"integer"},"last_login_at":{"type":"string","format":"date-time","nullable":true}}}}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"description":"Forbidden. The requester is not an Evercam admin and either does not belong to the resolved company or lacks the `company-admin` feature (body `{ \"message\": \"Forbidden.\" }`).","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}},"404":{"description":"No company could be resolved for the requester (body `{ \"message\": \"Not found.\" }`).","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}}}}},"/v2/company/projects":{"get":{"summary":"Get company projects","description":"Returns a paginated list of the (non-deleted) projects belonging to the\nrequester's own company.\n\n**Required permission:** `company-admin` feature on the requester's own\ncompany, or an Evercam admin.\n","operationId":"getCompanyProjects","x-required-permission":"company-admin (own company) or Evercam admin","tags":["Companies"],"parameters":[{"name":"page","in":"query","required":false,"schema":{"$ref":"#/paths/~1v2~1company~1kits/get/parameters/0/schema"}},{"name":"limit","in":"query","required":false,"description":"Page size. Defaults to 50.","schema":{"$ref":"#/paths/~1v2~1company~1kits/get/parameters/1/schema"}},{"name":"sort","in":"query","required":false,"description":"Sort expression. Sortable fields: `name`, `exid`, `status`, `archive_tier`, `inserted_at`, `start_date`, `end_date`.","schema":{"type":"string"},"example":"name|asc"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"from":{"$ref":"#/paths/~1v2~1widgets/get/responses/200/content/application~1json/schema/properties/from"},"to":{"$ref":"#/paths/~1v2~1widgets/get/responses/200/content/application~1json/schema/properties/to"},"page":{"$ref":"#/paths/~1v2~1company~1kits/get/parameters/0/schema"},"limit":{"$ref":"#/paths/~1v2~1company~1kits/get/parameters/1/schema"},"total":{"$ref":"#/paths/~1v2~1widgets/get/responses/200/content/application~1json/schema/properties/total"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"exid":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","nullable":true},"archive_tier":{"type":"string","nullable":true},"inserted_at":{"type":"string","format":"date-time"},"start_date":{"type":"string","format":"date-time","nullable":true},"end_date":{"type":"string","format":"date-time","nullable":true}}}}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"description":"Forbidden. The requester is not an Evercam admin and either does not belong to the resolved company or lacks the `company-admin` feature (body `{ \"message\": \"Forbidden.\" }`).","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}},"404":{"description":"No company could be resolved for the requester (body `{ \"message\": \"Not found.\" }`).","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}}}}},"/v2/company/cameras":{"get":{"summary":"Get company cameras","description":"Get all cameras belonging to the current user's company.\n\n**Required permission:** `company-admin` role or app admin\n","operationId":"getCompanyCameras","x-required-permission":"company-admin","tags":["Companies"],"parameters":[{"name":"page","in":"query","required":false,"schema":{"$ref":"#/paths/~1v2~1company~1kits/get/parameters/0/schema"}},{"name":"limit","in":"query","required":false,"schema":{"$ref":"#/paths/~1v2~1company~1kits/get/parameters/1/schema"}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"from":{"$ref":"#/paths/~1v2~1widgets/get/responses/200/content/application~1json/schema/properties/from"},"to":{"$ref":"#/paths/~1v2~1widgets/get/responses/200/content/application~1json/schema/properties/to"},"page":{"$ref":"#/paths/~1v2~1company~1kits/get/parameters/0/schema"},"limit":{"$ref":"#/paths/~1v2~1company~1kits/get/parameters/1/schema"},"total":{"$ref":"#/paths/~1v2~1widgets/get/responses/200/content/application~1json/schema/properties/total"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"exid":{"type":"string"},"name":{"type":"string"},"status":{"type":"string"},"owner_fullname":{"type":"string"},"owner_email":{"type":"string","format":"email"},"project_exid":{"type":"string"},"users_count":{"type":"integer"}}}}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"}}}},"/v2/company/kits":{"get":{"summary":"Get company kits","description":"Get all hardware kits belonging to the current user's company.\n\n**Required permission:** `company-admin` role or app admin\n","operationId":"getCompanyKits","x-required-permission":"company-admin","tags":["Companies"],"parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","description":"The page number","example":2}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","description":"The size of the page","example":50}},{"name":"sort","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"from":{"$ref":"#/paths/~1v2~1widgets/get/responses/200/content/application~1json/schema/properties/from"},"to":{"$ref":"#/paths/~1v2~1widgets/get/responses/200/content/application~1json/schema/properties/to"},"page":{"$ref":"#/paths/~1v2~1company~1kits/get/parameters/0/schema"},"limit":{"$ref":"#/paths/~1v2~1company~1kits/get/parameters/1/schema"},"total":{"$ref":"#/paths/~1v2~1widgets/get/responses/200/content/application~1json/schema/properties/total"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"name":{"type":"string"},"serial":{"type":"string"},"status":{"type":"string"},"power_type":{"type":"string"},"country_name":{"type":"string"},"nvr_id":{"type":"integer","nullable":true},"nvr_serial":{"type":"string","nullable":true},"nvr_version":{"type":"string","nullable":true},"nvr_nerves":{"type":"string","nullable":true},"nvr_model":{"type":"string","nullable":true},"nvr_device_type":{"type":"string","nullable":true},"router_id":{"type":"integer","nullable":true},"router_serial":{"type":"string","nullable":true},"project_exid":{"type":"string","nullable":true},"project_name":{"type":"string","nullable":true},"alarms":{"type":"array","items":{"type":"object"}},"sims":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"number":{"type":"string"}}}},"cameras":{"type":"array","items":{"type":"object","properties":{"exid":{"type":"string"},"name":{"type":"string"},"status":{"type":"string"}}}}}}}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"}}}},"/v2/cameras/{camera_exid}/recordings/snapshots/{year}/{month}/days":{"get":{"tags":["Recordings"],"summary":"Get list of days","description":"Get the list of days of a specific year / month where there's at least one snapshot.\n\nThe start day and end day of the month are in the camera timezone and not in `UTC`.\n**Required permission:** `camera-recordings_view`\n","operationId":"getRecordingDays","x-required-permission":"camera-recordings_view","parameters":[{"$ref":"#/paths/~1v2~1cameras~1{camera_exid}/parameters/0"},{"name":"year","in":"path","description":"The year","example":2019,"required":true,"schema":{"type":"integer","minimum":1}},{"name":"month","in":"path","description":"The month","required":true,"schema":{"type":"integer","minimum":1,"maximum":12}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"days":{"type":"array","description":"Days of the given year/month (in the camera timezone) that have at least one recorded snapshot.","items":{"type":"integer","description":"Month's day","minimum":1,"maximum":31}}},"example":{"days":[1,5,13,27]}}}}},"400":{"$ref":"#/paths/~1v2~1logs/post/responses/400"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"Camera does not exist","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}}}}},"/v2/cameras/{camera_exid}/recordings/snapshots/{year}/{month}/{day}/hours":{"get":{"tags":["Recordings"],"summary":"list hours","description":"Returns all hours of a given day where there's snapshots for a particular camera.\n**Required permission:** `camera-recordings_view`\n","operationId":"getRecordingHoursInDay","x-required-permission":"camera-recordings_view","parameters":[{"$ref":"#/paths/~1v2~1cameras~1{camera_exid}/parameters/0"},{"name":"year","in":"path","description":"The year","required":true,"example":2019,"schema":{"type":"integer","minimum":1}},{"name":"month","in":"path","description":"The month","required":true,"example":10,"schema":{"type":"integer","minimum":1,"maximum":12}},{"name":"day","in":"path","description":"The day","required":true,"example":13,"schema":{"type":"integer","minimum":1,"maximum":31}}],"responses":{"200":{"description":"Snapshots' Hours","content":{"application/json":{"schema":{"type":"object","properties":{"hours":{"type":"array","items":{"type":"integer","minimum":0,"maximum":23}}},"example":{"hours":[10,11,15,18]}}}}},"400":{"$ref":"#/paths/~1v2~1logs/post/responses/400"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"Camera does not exist"}}}},"/v2/cameras/{camera_exid}/recordings/snapshots/latest":{"get":{"tags":["Recordings"],"summary":"Get latest snapshot","description":"Returns the latest stored snapshot for a camera.\n\nBy default the response is a JSON object containing the snapshot\n`created_at` timestamp (in the camera timezone) and the image as a\nbase64 data URI in `data`. When `include_image=false` only `created_at`\nis returned. When `view=true` the raw `image/jpeg` bytes are returned\ninstead of JSON.\n\n**Required permission:** `camera-recordings_view` or `camera-live_view_view`\n","operationId":"getLatestSnapshot","x-required-permission":"camera-recordings_view or camera-live_view_view","parameters":[{"$ref":"#/paths/~1v2~1cameras~1{camera_exid}/parameters/0"},{"name":"view","description":"Get the response as an image/jpeg","in":"query","required":false,"style":"form","explode":true,"schema":{"type":"boolean","default":false}},{"name":"include_image","description":"Add image base64 or remove from the response","in":"query","required":false,"style":"form","explode":true,"schema":{"type":"boolean","default":true}}],"responses":{"200":{"description":"Latest snapshot. When no snapshot exists, `data` is `null`.\n","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"string","nullable":true,"description":"The snapshot image as a base64-encoded `data:image/jpeg;base64,...` URI. `null` when no snapshot is available, and omitted entirely when `include_image=false`.\n"},"created_at":{"type":"string","format":"date-time","description":"Snapshot timestamp, in the camera timezone."}},"example":{"data":"data:image/jpeg;base64,df458df...","created_at":"2021-06-02T15:25:30Z"}}},"image/jpeg":{"schema":{"type":"string","format":"binary"}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"Returned only when `view=true` and no snapshot exists. The body is a\nJSON object with a `message` string (an empty string in this case).\n","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}}}}},"/v2/cameras/{camera_exid}/recordings/snapshots/oldest":{"get":{"tags":["Recordings"],"summary":"Get oldest snapshot","description":"Returns the oldest stored snapshot for a camera.\n\nBy default the response is a JSON object containing the snapshot\n`created_at` timestamp (in the camera timezone) and the image as a\nbase64 data URI in `data`. When `include_image=false` only `created_at`\nis returned. When `view=true` the raw `image/jpeg` bytes are returned\ninstead of JSON.\n\n**Required permission:** `camera-recordings_view`\n","operationId":"getOldestSnapshot","x-required-permission":"camera-recordings_view","parameters":[{"$ref":"#/paths/~1v2~1cameras~1{camera_exid}/parameters/0"},{"$ref":"#/paths/~1v2~1cameras~1{camera_exid}~1recordings~1snapshots~1latest/get/parameters/1"},{"$ref":"#/paths/~1v2~1cameras~1{camera_exid}~1recordings~1snapshots~1latest/get/parameters/2"}],"responses":{"200":{"description":"Oldest snapshot. When no snapshot exists, `data` is `null`.\n","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1cameras~1{camera_exid}~1recordings~1snapshots~1latest/get/responses/200/content/application~1json/schema"}},"image/jpeg":{"schema":{"type":"string","format":"binary"}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"Returned only when `view=true` and no snapshot exists. The body is a\nJSON object with a `message` string (an empty string in this case).\n","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}}}}},"/v2/cameras/{camera_exid}/recordings/snapshots/{timestamp}/nearest":{"get":{"tags":["Recordings"],"summary":"Get nearest snapshot","description":"Returns the snapshot nearest to a given timestamp.\n\nGiven a timestamp, returns the snapshot with the minimum timestamp in the interval `[timestamp, timestamp + 1 hour]`.\n\nBy default the response is a JSON object with a single-element `snapshots` array containing the snapshot `created_at` (in the camera timezone) and the image as a base64 data URI in `data`. When `include_image=false` only `created_at` is returned inside the array item. When `view=true` the raw `image/jpeg` bytes are returned instead of JSON.\n\n**Required permission:** `camera-recordings_view`\n","operationId":"getNearestSnapshot","x-required-permission":"camera-recordings_view","parameters":[{"$ref":"#/paths/~1v2~1cameras~1{camera_exid}/parameters/0"},{"$ref":"#/paths/~1v2~1cameras~1{camera_exid}~1recordings~1snapshots~1latest/get/parameters/1"},{"$ref":"#/paths/~1v2~1cameras~1{camera_exid}~1recordings~1snapshots~1latest/get/parameters/2"},{"name":"timestamp","in":"path","description":"The timestamp to search around, in ISO8601 format.","required":true,"example":"2019-02-18T09:00:00.000+00:00","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"Nearest snapshot","content":{"application/json":{"schema":{"type":"object","properties":{"snapshots":{"type":"array","items":{"$ref":"#/paths/~1v2~1cameras~1{camera_exid}~1recordings~1snapshots~1latest/get/responses/200/content/application~1json/schema"},"maxItems":1,"minItems":1}}}},"image/jpeg":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/paths/~1v2~1logs/post/responses/400"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"No snapshot found in the interval. The body is a JSON object with a\n`message` string (an empty string in this case).\n","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}}}}},"/v2/cameras/{camera_exid}/snapshots":{"parameters":[{"$ref":"#/paths/~1v2~1cameras~1{camera_exid}/parameters/0"}],"post":{"summary":"Upload a snapshot","description":"Upload a new recording/anpr snapshot for the specified camera. The only accepted format is `jpeg`.\n\nThis endpoint is usually used to upload images from external systems other than cameras.\n\n*Currently we have a use case where we upload images from GDrive*\n\n**Note** that this endpoint required the user to have at least `snapshot` right on the specified camera.\n**Required permission:** `camera-recordings_view`\n","operationId":"uploadSnapshot","x-required-permission":"camera-recordings_view","tags":["Snapshots"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"timestamp":{"type":"string","format":"date-time","description":"The capture time of the snapshot (ISO8601).","example":"2021-07-13T14:47:06+00:00"},"image":{"type":"string","format":"byte","description":"A base64 encoded jpeg image."},"anpr":{"type":"boolean","default":false,"description":"Save jpeg image as anpr if true."}},"required":["timestamp","image"]}}}},"responses":{"201":{"description":"Snapshot accepted for saving (empty body)"},"400":{"$ref":"#/paths/~1v2~1logs/post/responses/400"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"500":{"description":"Image not saved"}}}},"/v2/cameras/{camera_exid}/recordings/snapshots":{"parameters":[{"$ref":"#/paths/~1v2~1cameras~1{camera_exid}/parameters/0"}],"get":{"tags":["Recordings"],"summary":"Get snapshot's metadata","description":"Returns metadata for all snapshots taken in a specified interval.\n\nAfter that we can use **created_at** metadata to get the actual snapshot.\n\n**Note**: The interval must not exceed one day.\n\n**Required permission:** `camera-recordings_view`\n","operationId":"getSnapshotsMetadata","x-required-permission":"camera-recordings_view","parameters":[{"name":"from","in":"query","description":"The min date of the snapshot in ISO8601 format","required":true,"style":"form","explode":true,"example":"2019-02-18T09:00:00.000+00:00","schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","description":"The max date of the snapshot in ISO8601 format","required":true,"style":"form","explode":true,"example":"2019-02-18T09:00:00.000+00:00","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"Snapshot's metadata","content":{"application/json":{"schema":{"type":"object","properties":{"snapshots":{"type":"array","items":{"type":"object","properties":{"created_at":{"type":"string","format":"date-time","description":"Creation date of the snapshot, can be used to get the actual snapshot","example":"2021-07-13T14:47:06-05:00"},"notes":{"type":"string","description":"Free-text note attached to the snapshot. Currently always returned as an empty string.","example":""}},"required":["created_at","notes"]}}},"example":{"snapshots":[{"created_at":"2021-07-13T14:47:06-05:00","notes":""},{"created_at":"2021-07-13T15:02:11-05:00","notes":""}]}}}}},"400":{"$ref":"#/paths/~1v2~1logs/post/responses/400"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"500":{"description":"Internal Server Error"}}}},"/v2/cameras/{camera_exid}/recordings/snapshots/{timestamp}":{"get":{"tags":["Recordings"],"summary":"Get a snapshot","description":"Returns the stored snapshot corresponding to a given timestamp.\n\nBy default the response is a JSON object with a single-element\n`snapshots` array containing the snapshot `created_at` (in the camera\ntimezone) and the image as a base64 data URI in `data`. When\n`include_image=false` only `created_at` is returned inside the array\nitem. When `view=true` the raw `image/jpeg` bytes are returned instead\nof JSON. When `rm_timestamp=true` the timestamp overlay is stripped from\nthe image before it is returned.\n\n**Required permission:** `camera-recordings_view`\n","operationId":"showSnapshot","x-required-permission":"camera-recordings_view","parameters":[{"$ref":"#/paths/~1v2~1cameras~1{camera_exid}/parameters/0"},{"$ref":"#/paths/~1v2~1cameras~1{camera_exid}~1recordings~1snapshots~1latest/get/parameters/1"},{"$ref":"#/paths/~1v2~1cameras~1{camera_exid}~1recordings~1snapshots~1latest/get/parameters/2"},{"name":"rm_timestamp","description":"Remove timestamp from snapshot","in":"query","required":false,"schema":{"type":"boolean","default":false}},{"name":"timestamp","in":"path","description":"The timestamp of the snapshot in ISO8601 format","required":true,"style":"simple","explode":false,"example":"2019-02-18T09:00:00.000+00:00","schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"Snapshot","content":{"application/json":{"schema":{"type":"object","properties":{"snapshots":{"type":"array","items":{"$ref":"#/paths/~1v2~1cameras~1{camera_exid}~1recordings~1snapshots~1latest/get/responses/200/content/application~1json/schema"},"maxItems":1,"minItems":1}}}},"image/jpeg":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/paths/~1v2~1logs/post/responses/400"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"Snapshot not found for the given timestamp.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string"}},"example":{"message":"resource not found"}}}}},"500":{"description":"Unexpected error while retrieving the snapshot from storage.\n","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1users/post/responses/400/content/application~1json/schema"}}}}}}},"/v2/cameras":{"get":{"tags":["Cameras"],"summary":"Get all cameras","description":"Returns the cameras the connected user can access. Without `project_exid`, returns all cameras the user owns or has a role on. When `project_exid` is supplied, the response is scoped to that project's cameras and the request is authorized against the project (requires any role on the project).\n","operationId":"getAllCameras","parameters":[{"name":"project_exid","in":"query","description":"Optional project exid to scope the returned cameras to a single project. When provided, the request is authorized against that project.","required":false,"style":"form","explode":true,"schema":{"type":"string"}},{"name":"compact","in":"query","description":"Return a slimmer camera object. Omits `camera_power_schedule`, `is_power_schedule_active`, `last_polled_at`, `is_access_restricted`, `nvr_scheme`, `updated_at`, `description`, `owner`, `pitch`, `roll` and `thumbnail_url`; reduces `cloud_recordings` to `frequency`, `storage_duration` and `status`, and `proxy_url` to `hls`. The full object remains available from `GET /v2/cameras/{camera_exid}`.","required":false,"style":"form","explode":true,"schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"List of cameras","content":{"application/json":{"schema":{"type":"object","properties":{"cameras":{"type":"array","items":{"title":"Camera","type":"object","properties":{"id":{"type":"string","description":"Camera's id","example":"everc-dupzo"},"exid":{"type":"string","description":"Camera's id","example":"everc-dupzo"},"name":{"type":"string","description":"The camera's name","example":"The Great Camera"},"owned":{"type":"boolean","description":"Whether the requestor is the owner of the camera","example":true},"owner":{"type":"string","description":"email of the camera's owner","example":"abc@evercam.io"},"model":{"type":"string","description":"The camera's vendor model name","enum":["hikvision","y-cam","axis","dahua","mobotix","avigilion","hanwha","milesight","other"]},"created_at":{"type":"string","format":"date-time","description":"Creation date of camera in ISO8601 format","example":"2019-02-18T09:00:00.000+00:00"},"updated_at":{"type":"string","format":"date-time","description":"Camera's update date in ISO8601 format","example":"2019-02-18T09:00:00.000+00:00"},"last_polled_at":{"type":"string","format":"date-time","example":"2019-02-18T09:00:00.000+00:00"},"last_online_at":{"type":"string","format":"date-time","description":"Last known camera's online date","example":"2019-02-18T09:00:00.000+00:00"},"status":{"type":"string","description":"The camera's state","example":"online"},"is_online":{"type":"boolean","description":"Whether the camera's status is online or not","example":true},"offline_reason":{"type":"string"},"recording_from_nvr":{"type":"boolean","description":"Whether the system recording from camera or NVR","example":true},"thumbnail_url":{"type":"string"},"proxy_url":{"type":"object","properties":{"hls":{"type":"string","example":"https://example.evercam.io/hls/camera-id/index.m3u8","description":"Hls streaming url"},"rtmp":{"type":"string","example":"rtmp://example.evercam.io:1935/camera-id","description":"Rtmp streaming url"}}},"project":{"type":"object","properties":{"id":{"type":"string","description":"Camera's project id","example":"teamp-wlfxe"},"name":{"type":"string","description":"Camera's project name","example":"Wicklow"}}},"description":{"type":"string"},"feature_flags":{"type":"array","items":{"type":"string"},"description":"List of activated feature flags"},"cloud_recordings":{"type":"object","properties":{"id":{"type":"integer","description":"The cloud recording id"},"frequency":{"type":"integer","enum":[1,2,4,5,6,10,12,30,60],"description":"The rate at which snapshots are retrieved\n\nValue | Frequency\n------|----------\n60 | 1 each second\n30 | 1 each 2 seconds\n12 | 1 each 5 seconds\n6 | 1 each 10 seconds\n4 | 1 each 15 seconds\n2 | 1 each 30 seconds\n1 | 1 each minute\n5 | 1 each 5 minutes\n10 | 1 each 10 minutes\n"},"storage_duration":{"type":"integer","enum":[-1,1,7,30,90],"description":"The retention period of the snapshots in days. **-1** disable retention and keep everything.\n"},"status":{"type":"string","enum":["on","off","paused","on-scheduled"],"description":"Describe the status of the cloud recording.\n\n**off** and **paused** will stop recording snapshots from the camera.\n\n**on-scheduled** will use a custom schedule to get snapshots.\n"},"schedule":{"$ref":"#/paths/~1v2~1projects~1{project_exid}~1media-hub~1timelapses/post/requestBody/content/application~1json/schema/properties/schedule"}},"required":["frequency","storage_duration","status","schedule"]},"streaming_server":{"type":"string","example":"camera-server.evercam.io","description":"Camera's streaming server address"},"location":{"type":"object","properties":{"lat":{"type":"number"},"lng":{"type":"number"}},"description":"Camera lat,lng location"},"timezone":{"type":"string","example":"Europe/Dublin"},"fov_angle":{"type":"number","description":"field of view angle"},"fov_radius":{"type":"number","description":"field of view radius"},"discoverable":{"type":"boolean"},"is_public":{"type":"boolean"},"heading":{"type":"number","description":"camera rotation angle around Yaw axis (vertical axis in aircraft rotations). 0° on yaw axis means camera is looking to the east, 90° for South, 180° for west and -90° for the North."},"pitch":{"type":"number","description":"camera rotation around Pitch axis (side horizontal axis in aircraft rotations). used to describe the up and down motion of camera. this value changes depending on camera height and site dimensions, it's zero/null or something around, in most cases."},"roll":{"type":"number","description":"camera rotation, Roll is the rotation around the longitudinal axis, this value should be null or zero in most cases."},"is_power_schedule_active":{"type":"boolean"},"camera_power_schedule":{"type":"object"},"nvr_host":{"type":"string","description":"nvr ip address"},"nvr_http_port":{"type":"number"},"nvr_scheme":{"type":"string","example":"http"},"nvr_streaming_endpoint":{"type":"string","example":"/ISAPI/Streaming/channels/102/av_stream"},"nvr_snapshot_endpoint":{"type":"string","example":"/ISAPI/Streaming/channels/101/picture?videoResolutionWidth=1920&videoResolutionHeight=1080"},"nvr_model":{"type":"string","example":"hikvision"},"nvr_device_id":{"type":"string","example":"101","description":"device id or channel to distinguish cameras on the same nvr"},"is_access_restricted":{"type":"boolean","description":"Indicates whether all users, except the project owner, are restricted from accessing the camera.","example":false},"live_view_frequency":{"type":"integer","nullable":true,"enum":[5,10,15,30,60,300,600,3600,null],"description":"The interval in seconds between live view snapshot polls.\nWhen null, the camera uses the default max speed.\n"},"kit_alarms":{"type":"array","items":{"type":"string"},"description":"List of alarms for the kit linked to the camera."},"timestamp_position":{"type":"object","nullable":true,"description":"Bounding box of the on-camera timestamp, used to pre-populate the timestamp removal drawing when creating a timelapse. Saved automatically when a timelapse is created with a timestamp_position in its video_options.","properties":{"x":{"type":"number","description":"X coordinate of the top-left corner of the bounding box","example":4},"y":{"type":"number","description":"Y coordinate of the top-left corner of the bounding box","example":2},"w":{"type":"number","description":"Width of the bounding box","example":50},"h":{"type":"number","description":"Height of the bounding box","example":20}}}}}}}}}}},"400":{"$ref":"#/paths/~1v2~1logs/post/responses/400"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"description":"Forbidden","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}},"404":{"description":"Not Found - the supplied `project_exid` does not match any project."}}}},"/v2/public/cameras":{"get":{"tags":["Cameras"],"security":[{}],"summary":"Get public cameras","description":"Returns all public cameras (no authentication required). When `geojson=true` is supplied the response is a GeoJSON `FeatureCollection` instead of the paginated object described below.\n","operationId":"getPublicCameras","parameters":[{"name":"is_near_to","in":"query","description":"Either a `latitude,longitude` coordinate pair or a free-text address (geocoded via Google Maps). Filters cameras to those near the point.\n","required":false,"style":"form","explode":true,"example":"53.3506917,-6.2544413","schema":{"type":"string"}},{"name":"within_distance","in":"query","description":"Maximum distance (in metres) from `is_near_to` to include a camera. Defaults to 1000.\n","required":false,"style":"form","explode":true,"example":9.5,"schema":{"type":"number","default":1000}},{"name":"geojson","in":"query","description":"When `true`, the response is a GeoJSON `FeatureCollection` of the matching public cameras (the `limit`/`offset` pagination params are ignored in this mode).\n","required":false,"style":"form","explode":true,"schema":{"type":"string","enum":["true"]}},{"name":"limit","in":"query","description":"Limit of records, for example 10","required":false,"style":"form","explode":true,"schema":{"type":"integer","default":100,"maximum":1000}},{"name":"offset","in":"query","example":15,"required":false,"style":"form","explode":true,"schema":{"type":"integer","default":0,"minimum":0}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"records":{"type":"integer","description":"Total found cameras","example":51},"cameras":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Camera's id","example":"camera-12345"},"name":{"type":"string","description":"The camera's name","example":"camera 1"},"owner":{"type":"string","description":"Email of the camera's owner","example":"user@evercam.io"},"status":{"type":"string","description":"The camera's state","example":"decommissioned"},"location":{"type":"object","nullable":true,"properties":{"lat":{"type":"number","example":53.3506917},"lng":{"type":"number","example":-6.2544413}},"description":"Camera lat/lng location. Null when the camera has no coordinates set.\n"},"model":{"type":"string","description":"The camera's vendor model name","example":"other","enum":["hikvision","y-cam","axis","dahua","mobotix","avigilion","hanwha","milesight","other"]},"updated_at":{"type":"string","format":"date-time","description":"Camera's update date in ISO8601 format","example":"2025-10-22T23:33:33.278339Z"},"timezone":{"type":"string","example":"Europe/Dublin"},"created_at":{"type":"string","format":"date-time","description":"Creation date of camera in ISO8601 format","example":"2014-10-02T13:09:05.795039Z"},"last_online_at":{"type":"string","format":"date-time","description":"Last known camera's online date","example":"2021-11-26T18:49:33.000000Z"},"last_polled_at":{"type":"string","format":"date-time","example":"2021-11-26T18:49:33.000000Z"},"thumbnail_url":{"type":"string","example":"http://localhost:4000/v1/cameras/feufh/thumbnail"},"is_public":{"type":"boolean","example":true},"proxy_url":{"type":"object","properties":{"hls":{"type":"string","nullable":true,"example":"https://example.evercam.io/hls/camera-id/index.m3u8","description":"HLS streaming url"},"rtmp":{"type":"string","nullable":true,"example":"rtmp://example.evercam.io:1935/camera-id","description":"RTMP streaming url"}}},"discoverable":{"type":"boolean","example":true}}}},"pages":{"type":"integer","description":"Total pages' number","example":1}}}}}}}}},"/v2/cameras/{camera_exid}":{"parameters":[{"name":"camera_exid","description":"Unique id of a camera","in":"path","required":true,"schema":{"type":"string"},"example":"aoizr-dsze"}],"get":{"tags":["Cameras"],"summary":"Get a camera","description":"Returns the camera details.\n\n**Required permission:** `Any role on the camera or project`\n","operationId":"getCamera","x-required-permission":"Any role on the camera or project","responses":{"200":{"description":"Camera's details","content":{"application/json":{"schema":{"type":"object","properties":{"cameras":{"type":"array","items":{"$ref":"#/paths/~1v2~1cameras/get/responses/200/content/application~1json/schema/properties/cameras/items"},"minItems":1,"maxItems":1}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"Camera not found"}}},"patch":{"tags":["Cameras"],"summary":"Update camera","description":"Update camera. Only the following mutable attributes are accepted; any other\nfields in the body are ignored: `discoverable`, `is_public`, `name`, `heading`,\n`fov_angle`, `fov_radius`, `coordinates` and `is_access_restricted`. This\noperation requires project-management permission.\n\nA decommissioned camera cannot be updated and returns `400`.\n\n**Required permission:** `project-settings_manage_project`\n","operationId":"updateCamera","x-required-permission":"project-settings_manage_project","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"is_public":{"type":"boolean","description":"is_public flag (true/false), anyone with the link can view camera"},"discoverable":{"type":"boolean","description":"if this flag is true, Camera will be discoverable on the web,"},"name":{"type":"string","description":"Camera name"},"coordinates":{"type":"array","items":{"type":"number"},"minItems":2,"maxItems":2,"description":"The camera GPS coordinates. The field is an array with 2 elements where the first element is\nthe longitude and the second element is the latitude.\n\nLongitude must be in the range [-180, 180) and the latitude in [-80, 80]\n"},"heading":{"type":"number","description":"Camera's rotation's heading"},"fov_angle":{"type":"number","description":"Camera's fov's angle"},"fov_radius":{"type":"number","description":"Camera's fov's radius"},"is_access_restricted":{"type":"boolean","description":"When true, all users except the project owner are restricted from accessing the camera. Updating this flag also broadcasts an access-restriction update.","example":false}}}}}},"responses":{"200":{"$ref":"#/paths/~1v2~1cameras~1{camera_exid}/get/responses/200"},"400":{"description":"Bad Request - the camera is decommissioned and cannot be updated. The body is the full `%Evercam.Error{}` struct; the descriptive text lives nested under `inner_error`.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1users/post/responses/400/content/application~1json/schema"},"example":{"code":"BAD_ARGUMENT","message":"Validation errors","inner_error":{"code":"DECOMMISSIONED_CAMERA","message":"Invalid operation on decommissioned camera"}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"Camera does not exist or Unauthorized"},"422":{"description":"Unprocessable Entity - the update failed (validation error). Returned when updating `is_access_restricted` and the changeset is invalid.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Update failed"}}}}}}}}},"/v2/cameras/{camera_exid}/live/snapshot":{"get":{"tags":["Snapshots"],"summary":"Get a live snapshot","description":"Returns the latest jpeg image from a live camera.\n\n**Required permission:** `camera-live_view_view`\n","operationId":"getLiveSnapshot","x-required-permission":"camera-live_view_view","parameters":[{"$ref":"#/paths/~1v2~1cameras~1{camera_exid}/parameters/0"}],"responses":{"200":{"description":"Success","content":{"image/jpeg":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Bad Request - Cannot request a live snapshot from a camera with invalid status","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Cannot request a live snapshot from a camera with status: 'decommissioned'"}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"500":{"description":"Internal Server Error - Camera node is down or timed out","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Camera node is down or timed out"}}}}}},"504":{"description":"Gateway Timeout - Camera does not respond with a jpeg","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"Error description from camera","example":"Connection timeout"},"response":{"type":"string","description":"Raw response body from camera","example":""}}}}}}}}},"/v2/cameras/{camera_exid}/thumbnail":{"get":{"tags":["Cameras"],"summary":"Get thumbnail","description":"Get a camera thumbnail (the latest cached snapshot) as a JPEG image.\n\n**Required permission:** `camera-recordings_view` or `camera-live_view_view`\n","operationId":"getThumbnail","x-required-permission":"camera-recordings_view or camera-live_view_view","parameters":[{"$ref":"#/paths/~1v2~1cameras~1{camera_exid}/parameters/0"}],"responses":{"200":{"description":"Success","content":{"image/jpeg":{"schema":{"type":"string","format":"binary"}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"Camera thumbnail not available. A placeholder \"unavailable\" JPEG image is returned in the body (still `image/jpeg`).","content":{"image/jpeg":{"schema":{"type":"string","format":"binary"}}}}}}},"/v2/cameras/{camera_exid}/last-public-note":{"get":{"tags":["Cameras"],"summary":"Get camera last public note","description":"Returns the camera last public note.\n\n**Required permission:** `Any role on the camera or project`\n","operationId":"getCameraLastPublicNote","x-required-permission":"Any role on the camera or project","parameters":[{"$ref":"#/paths/~1v2~1cameras~1{camera_exid}/parameters/0"}],"responses":{"200":{"description":"Camera's last public note","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","description":"Note id","example":2458},"camera_id":{"type":"integer","description":"Camera id","example":42},"camera":{"type":"object","nullable":true,"properties":{"exid":{"type":"string","example":"my-camera"},"name":{"type":"string","example":"My Camera"}}},"who":{"type":"string","nullable":true,"description":"Full name of the note author","example":"Mark Jones"},"note_type":{"type":"string","description":"Note type","example":"public_note"},"content":{"type":"string","description":"Note content","example":"Camera is offline due to maintenance"},"pinned":{"type":"boolean","description":"Whether the note is pinned","example":false},"inserted_at":{"type":"string","format":"date-time","description":"Note creation datetime"}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"Camera didn't found"}}}},"/v2/projects/{project_exid}/cameras":{"get":{"summary":"List user's cameras in a project","description":"Retrieve a list of all cameras in a project, both public and private cameras owned by or shared with the connected user.\n\n**Required permission:** `Any role on the camera or project`\n","tags":["Projects"],"operationId":"listProjectCameras","x-required-permission":"Any role on the camera or project","parameters":[{"$ref":"#/paths/~1v2~1projects~1{project_exid}/parameters/0"},{"$ref":"#/paths/~1v2~1cameras/get/parameters/1"}],"responses":{"200":{"description":"A list of cameras associated with the specified project.","content":{"application/json":{"schema":{"type":"object","properties":{"cameras":{"type":"array","items":{"$ref":"#/paths/~1v2~1cameras/get/responses/200/content/application~1json/schema/properties/cameras/items"}}}}}}},"400":{"$ref":"#/paths/~1v2~1logs/post/responses/400"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"Project not found.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}}}},"patch":{"summary":"Restrict all users from accessing the project's cameras","description":"Enable or disable access restriction for all cameras associated with a project.\n\n**Required permission:** `project-settings_manage_project`\n","operationId":"disableProjectsCameras","x-required-permission":"project-settings_manage_project","tags":["Projects"],"parameters":[{"$ref":"#/paths/~1v2~1projects~1{project_exid}/parameters/0"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"is_access_restricted":{"type":"boolean","description":"Indicates whether all users, except those with the manage permission, are restricted from accessing all cameras in the project."}},"required":["is_access_restricted"]}}}},"responses":{"200":{"description":"Cameras successfully updated (returns an empty array).","content":{"application/json":{"schema":{"type":"array","description":"An empty array indicating success.","items":{}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"Project not found.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}}}}},"/v2/widgets/{id}":{"get":{"tags":["Widgets"],"summary":"Get Widget","description":"Fetch a single widget by its numeric id. Accessible when the widget is public, or when the authenticated user owns it; otherwise a 404 is returned (private widgets are not distinguishable from missing ones).","operationId":"getWidgetById","parameters":[{"name":"id","description":"Numeric id (primary key) of the widget.","in":"path","required":true,"schema":{"type":"integer","example":42}}],"responses":{"200":{"description":"Widget data (renders WidgetView show.json).","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/paths/~1v2~1widgets/post/responses/201/content/application~1json/schema/allOf/0"},{"type":"object","properties":{"widget_key":{"type":"string","description":"Widget key used for widget authentication."},"widget_id":{"type":"string","description":"Widget id used for widget authentication."}}}]}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"404":{"description":"Widget not found, or is private and not owned by the caller.","content":{"text/plain":{"schema":{"type":"string","example":"Widget not found or is private"}}}}}},"put":{"tags":["Widgets"],"summary":"Update Widget","description":"Update a widget the caller owns. Note that `session_settings` and `active` are ignored by this endpoint even if supplied (use `PUT /v2/widgets/session` and `PATCH /v2/widgets/{id}/status` respectively).","operationId":"updateWidget","parameters":[{"name":"id","description":"Numeric id (primary key) of the widget.","in":"path","required":true,"schema":{"type":"integer","example":42}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ressources":{"type":"object","description":"Resource references for the widget. Each nested resource may be given as `{ \"exid\": \"...\" }` (or the exid string directly) and is resolved server-side to the corresponding project/camera/preset id.","properties":{"project":{"type":"object","properties":{"exid":{"type":"string"}}},"camera":{"type":"object","properties":{"exid":{"type":"string"}}},"preset":{"type":"object","properties":{"exid":{"type":"string","description":"Video Wall preset exid, or \"__auto__\" which means it is stored with no preset."}}}}},"name":{"type":"string","description":"Widget name"},"settings":{"description":"Widget setting depending on the widget_type field","oneOf":[{"$ref":"#/paths/~1v2~1widgets/post/requestBody/content/application~1json/schema/properties/settings/oneOf/0"},{"$ref":"#/paths/~1v2~1widgets/post/requestBody/content/application~1json/schema/properties/settings/oneOf/1"},{"$ref":"#/paths/~1v2~1widgets/post/requestBody/content/application~1json/schema/properties/settings/oneOf/2"},{"$ref":"#/paths/~1v2~1widgets/post/requestBody/content/application~1json/schema/properties/settings/oneOf/3"},{"$ref":"#/paths/~1v2~1widgets/post/requestBody/content/application~1json/schema/properties/settings/oneOf/4"}]},"description":{"type":"string","description":"Widget description"},"show_dashboard_link":{"type":"boolean","description":"Whether or not widget allows a link to the original component in dashboard"},"widget_type":{"type":"string","description":"Supported widget types, can be (Live View, Recordings, BIM Compare, Video Wall, 360)"},"public":{"type":"boolean","description":"Whether or not widget is public or private"},"domain_restricted":{"type":"boolean","description":"Whether or not widget restricted to specific domains"},"allowed_origin":{"type":"string","description":"The allowed URL to use this widget, will be checked on auth when domain_restricted is set to true"}}}}}},"responses":{"200":{"description":"The updated widget (renders WidgetView show.json).","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/paths/~1v2~1widgets/post/responses/201/content/application~1json/schema/allOf/0"},{"type":"object","properties":{"widget_key":{"type":"string","description":"Widget key used for widget authentication."},"widget_id":{"type":"string","description":"Widget id used for widget authentication."}}}]}}}},"400":{"$ref":"#/paths/~1v2~1widgets/get/responses/400"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"404":{"description":"Widget not found, or is private and not owned by the caller.","content":{"text/plain":{"schema":{"type":"string","example":"Widget not found or is private"}}}}}},"delete":{"tags":["Widgets"],"summary":"Delete Widget","description":"Delete a widget the caller owns.","operationId":"deleteWidget","parameters":[{"name":"id","description":"Numeric id (primary key) of the widget.","in":"path","required":true,"schema":{"type":"integer","example":42}}],"responses":{"204":{"description":"Widget deleted (empty body)."},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"404":{"description":"Widget not found, or is private and not owned by the caller.","content":{"text/plain":{"schema":{"type":"string","example":"Widget not found or is private"}}}}}}},"/v2/widgets/{id}/status":{"patch":{"tags":["Widgets"],"summary":"Widget Status","description":"Toggle a widget's active status. Only the `active` boolean is read from the body; it is required. The caller must own the widget (or it must be public).","operationId":"updateWidgetStatus","parameters":[{"name":"id","description":"Numeric id (primary key) of the widget.","in":"path","required":true,"schema":{"type":"integer","example":42}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["active"],"properties":{"active":{"type":"boolean","description":"Whether the widget is active.","example":false}}}}}},"responses":{"200":{"description":"The updated widget (renders WidgetView show.json).","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/paths/~1v2~1widgets/post/responses/201/content/application~1json/schema/allOf/0"},{"type":"object","properties":{"widget_key":{"type":"string","description":"Widget key used for widget authentication."},"widget_id":{"type":"string","description":"Widget id used for widget authentication."}}}]}}}},"400":{"$ref":"#/paths/~1v2~1widgets/get/responses/400"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"404":{"description":"Widget not found, or is private and not owned by the caller.","content":{"text/plain":{"schema":{"type":"string","example":"Widget not found or is private"}}}}}}},"/v2/projects/{project_exid}/cameras/reorder":{"patch":{"tags":["Projects"],"summary":"Reorder a project's cameras","description":"Update the display order of cameras in a project by assigning each camera a numeric position.\nPositions must be integers greater than or equal to 0.\n","operationId":"reorderProjectCameras","parameters":[{"$ref":"#/paths/~1v2~1projects~1{project_exid}/parameters/0"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["positions"],"properties":{"positions":{"type":"array","description":"List of camera position assignments. Must be a non-empty array.","minItems":1,"items":{"type":"object","required":["camera_exid","position"],"properties":{"camera_exid":{"type":"string","description":"Unique id of the camera.","example":"front-gate-cam"},"position":{"type":"integer","minimum":0,"description":"The camera's position in the project (0-based).","example":0}}}}}}}}},"responses":{"200":{"description":"Cameras reordered successfully.","content":{"application/json":{"schema":{"type":"object","description":"An empty object indicating success."}}}},"400":{"$ref":"#/paths/~1v2~1logs/post/responses/400"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"404":{"description":"Project not found.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}}}}},"/v2/widgets":{"get":{"tags":["Widgets"],"summary":"List Widgets","description":"Get widgets by the authentificated user","operationId":"getWidgetByUser","parameters":[{"name":"id","in":"query","description":"Filter by the widget id","required":false,"schema":{"type":"integer"}},{"name":"project_exid","in":"query","description":"Filter by public or created by the current user widget scoped to the specified project exid","required":false,"schema":{"type":"string"}},{"name":"project_id","in":"query","description":"Filter by the widget project ressource","required":false,"schema":{"type":"string"}},{"name":"camera_id","in":"query","description":"Filter by the widget camera ressource","required":false,"schema":{"type":"string"}},{"name":"preset_id","in":"query","description":"Filter by the widget preset/video wall resource","required":false,"schema":{"type":"string"}},{"name":"active","in":"query","description":"Filter by widget if active or not.","required":false,"schema":{"type":"boolean"}},{"name":"domain_restricted","in":"query","description":"Filter by widget if domain restricted or not.","required":false,"schema":{"type":"boolean"}},{"name":"allowed_origin","in":"query","description":"Filter by allowed_origin.","required":false,"schema":{"type":"string"}},{"name":"widget_type","in":"query","description":"Filter by widget_type.","required":false,"schema":{"type":"string"}},{"name":"ressources","in":"query","description":"Filter by resource name (either by project, camera or preset name).","required":false,"schema":{"type":"string"}},{"name":"user","in":"query","description":"Filter by user name.","required":false,"schema":{"type":"string"}},{"name":"show_dashboard_link","in":"query","description":"Filter by widget if widget allows to show dashboard link.","required":false,"schema":{"type":"boolean"}},{"name":"public","in":"query","description":"Filter by public or private widget.","required":false,"schema":{"type":"boolean"}},{"name":"name","in":"query","description":"Filter by widget name.","required":false,"schema":{"type":"string"}},{"name":"description","in":"query","description":"Filter by widget description.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Paginated widgets","content":{"application/json":{"schema":{"type":"object","properties":{"from":{"type":"integer","description":"The starting offset of the result","example":161},"to":{"type":"integer","description":"The ending offset of the result","example":200},"page":{"$ref":"#/paths/~1v2~1company~1kits/get/parameters/0/schema"},"limit":{"$ref":"#/paths/~1v2~1company~1kits/get/parameters/1/schema"},"total":{"type":"integer","description":"Total records found","example":1630},"items":{"type":"array","items":{"$ref":"#/paths/~1v2~1widgets/post/responses/201/content/application~1json/schema/allOf/0"}}}}}}},"400":{"description":"Invalid request","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1users/post/responses/400/content/application~1json/schema"}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"}}},"post":{"tags":["Widgets"],"summary":"Create Widget","description":"Create widget","operationId":"createWidget","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["widget_type","ressources"],"properties":{"ressources":{"type":"object","properties":{"project":{"type":"object","properties":{"exid":{"type":"string"}}},"camera":{"type":"object","properties":{"exid":{"type":"string"}}},"preset":{"type":"object","properties":{"exid":{"type":"string","description":"Video Wall preset exid, or \"__auto__\" which means it is stored with no preset."}}}}},"name":{"type":"string","description":"Widget name"},"settings":{"description":"Widget setting depending on the widget_type field","oneOf":[{"type":"object","properties":{"fullscreen":{"type":"boolean","default":false},"download":{"type":"boolean","default":true},"zoom":{"type":"boolean","default":true},"playpause":{"type":"boolean","default":true},"refresh":{"type":"integer","default":5}}},{"type":"object","properties":{"dark_mode":{"type":"boolean","default":false},"calendar":{"type":"boolean","default":true},"has_delay":{"type":"boolean","default":false},"delay":{"type":"integer","default":5},"delay_unit":{"type":"string","enum":["Minutes","Hours","Days"],"default":"Minutes"},"has_range":{"type":"boolean","default":false},"date_range":{"type":"array","items":{"type":"string"}}}},{"type":"object","properties":{"timeline":{"type":"boolean","default":true},"calendar":{"type":"boolean","default":true},"dark_mode":{"type":"boolean","default":false}}},{"type":"object","properties":{"refresh_rate":{"type":"integer","default":50},"allow_force_aspect_ratio":{"type":"boolean","default":true},"allow_fit_content":{"type":"boolean","default":true},"allow_fullscreen":{"type":"boolean","default":true},"allow_cell_fullscreen":{"type":"boolean","default":true}}},{"type":"object","properties":{"date_id":{"type":"string"},"date":{"type":"string"},"floor_id":{"type":"string"},"floor":{"type":"string"},"marker_id":{"type":"string"},"marker":{"type":"string","description":"Marker id"},"show_minimap":{"type":"boolean","default":true},"allow_tools":{"type":"boolean","default":true},"auto_rotate":{"type":"boolean","default":false},"date_locked":{"type":"boolean","default":false},"floor_locked":{"type":"boolean","default":false},"marker_locked":{"type":"boolean","default":false},"media_locked":{"type":"boolean","default":false}}}]},"description":{"type":"string","description":"Widget description"},"show_dashboard_link":{"type":"boolean","description":"Whether or not widget allows a link to the original component in dashboard"},"widget_type":{"type":"string","description":"Supported widget types, can be (Live View, Recordings, BIM Compare, Video Wall, 360)"},"public":{"type":"boolean","description":"Whether or not widget is public or private"},"domain_restricted":{"type":"boolean","description":"Whether or not widget is restricted to specific domains"},"session_settings":{"type":"object","description":"Object containing an arbitrary set of live session config"},"allowed_origin":{"type":"string","description":"The allowed URL to use this widget, will be checked on auth when domain_restricted is set to true"}}}}}},"responses":{"201":{"description":"Widget created.","content":{"application/json":{"schema":{"allOf":[{"type":"object","properties":{"id":{"type":"integer"},"ressources":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"integer"},"exid":{"type":"string"},"name":{"type":"string"},"feature_flags":{"type":"array"}}},"camera":{"type":"object","properties":{"id":{"type":"integer"},"exid":{"type":"string"},"name":{"type":"string"},"status":{"type":"string"}}},"preset":{"type":"object","properties":{"id":{"type":"integer"},"exid":{"type":"string"},"name":{"type":"string"},"config":{"type":"object"}}}}},"created_by":{"type":"object","properties":{"firstname":{"type":"string","description":"user first name"},"lastname":{"type":"string","description":"user last name"},"email":{"type":"string","description":"user email"}}},"name":{"type":"string","description":"Optional name for widget"},"description":{"type":"string","description":"Optional description for widget"},"widget_type":{"type":"string","description":"Supported widget types, can be (Live View, Recordings, BIM Compare, Video Wall, 360)"},"domain_restricted":{"type":"boolean","description":"Whether or not widget is restricted to specific domains"},"show_dashboard_link":{"type":"boolean","description":"Whether or not to show a link to the original component"},"public":{"type":"boolean","description":"Whether or not widget is public"},"active":{"type":"boolean","description":"Whether or not widget is active"},"settings":{"description":"Widget setting depending on the widget_type field","oneOf":[{"$ref":"#/paths/~1v2~1widgets/post/requestBody/content/application~1json/schema/properties/settings/oneOf/0"},{"$ref":"#/paths/~1v2~1widgets/post/requestBody/content/application~1json/schema/properties/settings/oneOf/1"},{"$ref":"#/paths/~1v2~1widgets/post/requestBody/content/application~1json/schema/properties/settings/oneOf/2"},{"$ref":"#/paths/~1v2~1widgets/post/requestBody/content/application~1json/schema/properties/settings/oneOf/3"},{"$ref":"#/paths/~1v2~1widgets/post/requestBody/content/application~1json/schema/properties/settings/oneOf/4"}]},"session_settings":{"type":"object","description":"Object containing an arbitrary set of live session config"},"allowed_origin":{"type":"string","description":"The allowed url to use this widget, will be checked on auth unless is_public is set to true"},"restricted_camera_exids":{"type":"array","description":"Array containing the exids of the restricted cameras (associated  with the widget)."},"restrictions_type":{"type":"string","description":"the type of the restriction complete/partial/none.","example":"partial"},"inserted_at":{"type":"string","format":"date-time","example":"2019-02-18T09:00:00.000+00:00","description":"Creation date of the widget"},"updated_at":{"type":"string","format":"date-time","example":"2019-02-18T09:00:00.000+00:00","description":"Update date of the widget"},"seen_at":{"type":"string","format":"date-time","example":"2019-02-18T09:00:00.000+00:00","description":"Late date when the widget was viewed"}}},{"type":"object","properties":{"widget_key":{"type":"string","description":"Widget key used for widget authentication"},"widget_id":{"type":"string","description":"Widget id used for widget authentication"}}}]}}}},"400":{"$ref":"#/paths/~1v2~1widgets/get/responses/400"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"}}}},"/v2/widgets/credentials":{"get":{"tags":["Widgets"],"summary":"Get widget credentials","description":"Return the widget the caller is authenticated as. This endpoint requires a\n**widget session**: the request must carry a valid `widget_id` and\n`widget_key` pair (as query params). The response is the full widget object\n(same shape as the widget `show.json`, including `widget_key` and\n`widget_id`).\n","operationId":"getWidgetCredentials","security":[{}],"parameters":[{"name":"widget_id","in":"query","description":"The widget id used for widget authentication.","required":true,"schema":{"type":"string"},"example":"a1b2c3d4"},{"name":"widget_key","in":"query","description":"The widget key used for widget authentication.","required":true,"schema":{"type":"string"},"example":"0123456789abcdef0123456789abcdef"}],"responses":{"200":{"description":"Widget credentials.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/paths/~1v2~1widgets/post/responses/201/content/application~1json/schema/allOf/0"},{"type":"object","properties":{"widget_key":{"type":"string","description":"Widget key used for widget authentication"},"widget_id":{"type":"string","description":"Widget id used for widget authentication"}}}]}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"}}}},"/v2/widgets/session":{"put":{"tags":["Widgets"],"summary":"Set widget session settings","description":"Merge and persist the live-session config for the widget the caller is authenticated as. This endpoint is WIDGET-authenticated: the request must be made with a valid `widget_id` + `widget_key` (see `GET /v2/widgets/credentials`), not a user Bearer token. The `session_settings` object in the request body is deep-merged onto the widget's existing `session_settings` (existing keys are overwritten, others preserved).","operationId":"setWidgetSessionSettings","security":[{}],"parameters":[{"name":"widget_id","in":"query","description":"The widget id used for widget authentication.","required":true,"schema":{"type":"string"},"example":"a1b2c3d4"},{"name":"widget_key","in":"query","description":"The widget key used for widget authentication.","required":true,"schema":{"type":"string"},"example":"0123456789abcdef0123456789abcdef"}],"requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"session_settings":{"type":"object","description":"Arbitrary live-session config object. Merged onto the widget's current session_settings. Omitting it (or sending an empty object) leaves the stored settings unchanged.","example":{"camera_exid":"my-camera","zoom":2}}}}}}},"responses":{"200":{"description":"The updated widget (renders WidgetView show.json).","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/paths/~1v2~1widgets/post/responses/201/content/application~1json/schema/allOf/0"},{"type":"object","properties":{"widget_key":{"type":"string","description":"Widget key used for widget authentication."},"widget_id":{"type":"string","description":"Widget id used for widget authentication."}}}]}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"}}}},"/v2/video-walls":{"get":{"tags":["Video Walls"],"summary":"List Video Walls","description":"Get video walls belonging to the authenticated user. Results are always\nscoped to the requester (`user_id` is forced to the current user), paginated\nand optionally filtered.\n\n**Required permission (when a project is targeted):** `project-video_wall_view`\n","operationId":"getVideoWallsByUser","x-required-permission":"project-video_wall_view","parameters":[{"name":"project_exid","in":"query","description":"Filter by the video wall project exid (resolved to a project_id).","required":false,"schema":{"type":"string"}},{"name":"id","in":"query","description":"Filter by the video wall id.","required":false,"schema":{"type":"integer"}},{"name":"exid","in":"query","description":"Filter by the video wall exid (partial, case-insensitive).","required":false,"schema":{"type":"string"}},{"name":"project_id","in":"query","description":"Filter by the video wall project id.","required":false,"schema":{"type":"integer"}},{"name":"name","in":"query","description":"Filter by the video wall name (partial, case-insensitive).","required":false,"schema":{"type":"string"}},{"name":"project","in":"query","description":"Filter by the video wall project name or exid (partial, case-insensitive).","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","description":"Sort field with optional direction, e.g. `inserted_at|desc`. Allowed fields: id, name, exid, source, inserted_at.\n","required":false,"schema":{"type":"string"}},{"name":"page","description":"The page to fetch","in":"query","required":false,"schema":{"type":"integer","minimum":1,"example":3,"default":1}},{"name":"limit","description":"How many records to fetch","in":"query","required":false,"schema":{"type":"integer","minimum":1,"example":50,"default":50}}],"responses":{"200":{"description":"Paginated list of video walls.","content":{"application/json":{"schema":{"type":"object","properties":{"from":{"$ref":"#/paths/~1v2~1widgets/get/responses/200/content/application~1json/schema/properties/from"},"to":{"$ref":"#/paths/~1v2~1widgets/get/responses/200/content/application~1json/schema/properties/to"},"page":{"$ref":"#/paths/~1v2~1company~1kits/get/parameters/0/schema"},"limit":{"$ref":"#/paths/~1v2~1company~1kits/get/parameters/1/schema"},"total":{"$ref":"#/paths/~1v2~1widgets/get/responses/200/content/application~1json/schema/properties/total"},"items":{"type":"array","items":{"$ref":"#/paths/~1v2~1video-walls/post/responses/201/content/application~1json/schema"}}}}}}},"400":{"$ref":"#/paths/~1v2~1widgets/get/responses/400"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"}}},"post":{"tags":["Video Walls"],"summary":"Create video wall","description":"Create a video wall owned by the authenticated user. The owner (`user_id`)\nis taken from the session; `project_id` is resolved from `project_exid`.\nThe `exid` is generated server-side from the name.\n\n**Required permission (when a project is targeted):** `project-video_wall_view`\n","operationId":"createVideoWall","x-required-permission":"project-video_wall_view","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project_exid":{"type":"string","description":"The exid of the project this video wall belongs to.","example":"project-exid"},"name":{"type":"string","example":"Video wall name"},"config":{"type":"object","additionalProperties":{},"example":{"key":"value"}}},"required":["name"]}}}},"responses":{"201":{"description":"Video wall created.","content":{"application/json":{"schema":{"type":"object","description":"A video wall as rendered by `VideoWallView \"show.json\"`.\n","properties":{"id":{"type":"integer","format":"int64","example":1},"name":{"type":"string","example":"Video wall name"},"exid":{"type":"string","description":"Auto-generated unique slug for the video wall.","example":"abc123"},"config":{"type":"object","additionalProperties":{},"example":{"key":"value"}},"inserted_at":{"type":"string","format":"date-time","example":"2025-03-27T12:34:56Z"},"updated_at":{"type":"string","format":"date-time","example":"2025-03-27T12:34:56Z"}},"required":["id","name","exid","config","inserted_at","updated_at"]}}}},"400":{"$ref":"#/paths/~1v2~1widgets/get/responses/400"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"}}}},"/v2/video-walls/{exid}":{"get":{"tags":["Video Walls"],"summary":"Get video wall","description":"Get a video wall by its exid. Only video walls owned by the authenticated\nuser are returned.\n\n**Required permission (when the video wall belongs to a project):** `project-video_wall_view`\n","operationId":"getVideoWallById","x-required-permission":"project-video_wall_view","parameters":[{"name":"exid","description":"The unique exid of the video wall.","in":"path","required":true,"schema":{"type":"string"},"example":"aoizr-dsze"}],"responses":{"200":{"description":"Video wall data.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1video-walls/post/responses/201/content/application~1json/schema"}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"No video wall with that exid belongs to the user.","content":{"text/plain":{"schema":{"type":"string","example":"Video wall not found"}}}}}},"put":{"tags":["Video Walls"],"summary":"Update video wall","description":"Update a video wall owned by the authenticated user. This action is served\nfor both `PUT` and `PATCH`.\n\n**Required permission (when the video wall belongs to a project):** `project-video_wall_view`\n","operationId":"updateVideoWall","x-required-permission":"project-video_wall_view","parameters":[{"name":"exid","description":"The unique exid of the video wall.","in":"path","required":true,"schema":{"type":"string"},"example":"aoizr-dsze"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"project_exid":{"type":"string","description":"The exid of the project this video wall belongs to.","example":"project-exid"},"name":{"type":"string","example":"Video wall name"},"config":{"type":"object","additionalProperties":{},"example":{"key":"value"}}},"required":["name"]}}}},"responses":{"200":{"description":"Updated video wall data.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1video-walls/post/responses/201/content/application~1json/schema"}}}},"400":{"$ref":"#/paths/~1v2~1widgets/get/responses/400"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"No video wall with that exid belongs to the user.","content":{"text/plain":{"schema":{"type":"string","example":"Video wall not found"}}}}}},"delete":{"tags":["Video Walls"],"summary":"Delete video wall","description":"Delete a video wall owned by the authenticated user. Deletion fails if the\nvideo wall is still referenced by a widget.\n\n**Required permission (when the video wall belongs to a project):** `project-video_wall_view`\n","operationId":"deleteVideoWall","x-required-permission":"project-video_wall_view","parameters":[{"name":"exid","description":"The unique exid of the video wall.","in":"path","required":true,"schema":{"type":"string"},"example":"aoizr-dsze"}],"responses":{"204":{"description":"Video wall deleted."},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"No video wall with that exid belongs to the user.","content":{"text/plain":{"schema":{"type":"string","example":"Video wall not found"}}}},"409":{"description":"The video wall is still used by a widget. Error code `VIDEO_WALL_IN_USE`.\n","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1users/post/responses/400/content/application~1json/schema"}}}}}}},"/v2/cameras/{camera_exid}/health":{"get":{"summary":"Get camera health","description":"Get the health of the camera (online/offline statuses) in a specified date range.\n\nStatus intervals are derived from the `camera_status_history` table, which records an entry each time a camera's status changes. This replaces the previous audit-log-based approach.\n\nAll statuses other than `online` are mapped to the `offline` state.\n**Required permission:** `Any role on the camera or project`\n","operationId":"getCameraHealth","x-required-permission":"Any role on the camera or project","tags":["Cameras"],"parameters":[{"$ref":"#/paths/~1v2~1cameras~1{camera_exid}/parameters/0"},{"name":"from","in":"query","required":false,"schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"start":{"type":"string","format":"date-time","description":"The start of a period"},"end":{"type":"string","format":"date-time","description":"The end of a period"},"state":{"type":"string","enum":["online","offline"],"description":"The camera state on this period"},"status":{"type":"string","description":"The original status value before any processing"}}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"}}}},"/v2/projects/{project_exid}/transfer/{new_owner_id}":{"parameters":[{"$ref":"#/paths/~1v2~1projects~1{project_exid}/parameters/0"},{"name":"new_owner_id","in":"path","description":"The user id of the new project owner.","required":true,"schema":{"type":"integer","example":123}}],"put":{"tags":["Projects"],"summary":"Transfer project ownership","description":"Transfer project ownership to another user. On success, ownership of the\nproject's cameras is transferred to the new owner as well, the previous\nowner (caller) is granted an admin role on the project, and a notification\nemail is sent to the new owner.\n\n**Required permission:** `project-settings_manage_project`\n","operationId":"transferProjectOwnership","x-required-permission":"project-settings_manage_project","responses":{"200":{"description":"Ownership transferred successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"integer","example":12},"exid":{"type":"string","example":"qsdf-ghjklm"},"name":{"type":"string","example":"The big project"},"status":{"type":"string","description":"Project status","example":"active"},"user_id":{"type":"integer","description":"Id of the new owner.","example":123},"zoho_id":{"type":"string","nullable":true,"example":"432169000097919226"}}}}}}}},"400":{"$ref":"#/paths/~1v2~1widgets/get/responses/400"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"The target user does not exist.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"},"example":{"message":"User '123' does not exist."}}}}}}},"/v2/projects/{project_exid}/media-hub/timelapses":{"post":{"tags":["Timelapses"],"summary":"Create timelapse","description":"Create a new timelapse for the given camera using the specified options. The actual creation happens in\nbackground job. So the user must poll the timelapse endpoint to get the status of the operation.\n\n### Timelapse Creation\n\nAfter creating the timelapse entity, a background job is scheduled which will create the timelapse as follows:\n  * The snapshots are downloaded from the snapshot store according to the `schedule` and the `time interval`\n  * If the `remove_timestamp` property is set, we use `timestamp_position` property from `video_params` parameter to\n  remove the timestamp; if `timestamp_position` is not specified in the request, we detect the position of\n  the timestamp on the snapshot using `python`.\n  * The video is created using **ffmpeg**, then it's compressed and watermarks are added.\n  * Finally the video is stored in the `media` store.\n\n### Snapshot Selection\n\nLook at the get [timelapse snapshots endpoint](#operation/getTimelapseTimestamps) for more details.\n\n### Video options\n\nSome aspect of the video creation can be changed using the `video_options` field\n\nOption | Description\n-------|-------------\nfps | This field has a fixed value, defaults to 24.\nformat | This field has a fixed value, defaults to `mp4`.\nwidth  | The width of the video, has a fixed value (1080).\nheight | The height of the video, has a fixed value (720).\nremove_timestamp (required) | Whether the timestamp on the snapshots will be removed or not.\nsmooth_transition (required) | Add smooth transition between frames.\ntimestamp_position | x, y, height (h) and width (w) values of the bounding box where the timestamp is located within the snapshot.\n\n### Timestamp removal\n\nIf `timestamp_position` is not specified in the request, we run a function that detects the bounding box of the timestamp on the snapshot, we then use this to remove the time from the snapshot, it fills the space with the neighboring pixels, so if the background is not of unique color, it may have some blur effects.\n\n### Smooth transitioning\n\nSmooth transitioning works by blending two consecutive frames to create new ones, so the video will be of 30 fps instead of \nthe intended 24. The additional frames are created by using the time blending. \n\n### Logo\n\nWe can add a custom logo as a watermark besides the **Evercam** watermark. The logo is one of the files added as projects logos\nso the `id` property of `logo` will allow us to find the appropriate logo in the uploaded project logo.\n\nThe position and size of the logo are normalized float values in the interval **[0-1]**, so the final position and size of the\nlogo in the generated video are calculated as follows:\n\n```\nx = normalized value * width of video\ny = normalized value * height of video\n\nwidth = normalized value * width of video\nheight = normalized value * height of video\n```\n\n### Resolution of the video\n\nAs stated in the video options above, we do have the properties `width` and `height`, those values are not really used, they're \njust placeholders. The actual resolution is calculated as follows:\n\n* We start with a default width of **1280**.\n* If neither the `height` or `width` of the video is greater than the default width, then we'll keep the original resolution of the snapshots.\n* Otherwise, we rescale the snapshots to the default width depending on the orignal resolution. \n\n  If the width is greater than the height, then the width will be rescaled to the default width and the height will be rescaled depending \n  on the aspect ratio of the snapshots. \n  \n  If the height is greater than the width, we'll rescale the height to the default width and rescale the width depending on the aspect ratio.\n\n  **Example**:\n\n  We start with a default width of `1280`, if we have snapshots of the following resolution:\n  * `(960, 576)` then the actual timelapse video will be of the resolution `(960, 576)`\n  * `(2048, 1536)` then the actual timelapse video will be of the resolution `(1280, 1536 * 1280 / 2048)`\n  * `(3000, 4000)` then the actual timelapse video will be of the resolution `(3000 * 1280 / 4000, 1280)`\n\n### Timelapse states\n\nWhen the timelapse is created it'll be in the `pending` state, it'll stay in the same state during creation. If the creation\nis successful, it'll transition to `completed` state, otherwise to `failed` state.\n\n### Errors\n\nThere may be many things that can go wrong when creating the timelapse, if a snapshot is not downloaded or doesn't exists, it'll\nbe ignored and the creation will continue. If there's no snapshot in the specified interval and schedule, then the timelapse is\nmarked as **failed**. In case of any error other than the previous ones, the creation will be retried 3 times before giving up.\n**Required permission:** `project-media_hub_view`\n","operationId":"createTimelapse","x-required-permission":"project-media_hub_view","parameters":[{"$ref":"#/paths/~1v2~1projects~1{project_exid}/parameters/0"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"camera_exid":{"type":"string","description":"Unique id of a camera"},"title":{"type":"string","description":"Timelapse title","example":"The super timelapse"},"duration":{"type":"integer","description":"The duration of the timelapse in seconds","enum":[30,60,90]},"from_datetime":{"type":"string","description":"The start date of the snapshots to take","format":"date-time","example":"2020-01-05T15:00:00Z"},"to_datetime":{"type":"string","description":"The end date of the snapshots to take","format":"date-time","example":"2020-01-05T15:00:00Z"},"schedule":{"type":"object","properties":{"monday":{"type":"array","items":{"type":"string"},"maxItems":1,"minItems":1,"example":["10:00-15:00"]},"tuesday":{"type":"array","items":{"type":"string"},"maxItems":1,"minItems":1,"example":["10:00-15:00"]},"wednesday":{"type":"array","items":{"type":"string"},"maxItems":1,"minItems":1,"example":["10:00-15:00"]},"thursday":{"type":"array","items":{"type":"string"},"maxItems":1,"minItems":1,"example":["10:00-15:00"]},"friday":{"type":"array","items":{"type":"string"},"maxItems":1,"minItems":1,"example":["10:00-15:00"]},"saturday":{"type":"array","items":{"type":"string"},"maxItems":1,"minItems":1,"example":["10:00-15:00"]},"sunday":{"type":"array","items":{"type":"string"},"maxItems":1,"minItems":1,"example":["10:00-15:00"]}}},"public":{"type":"boolean","description":"if this is set to `true`, the timelapse will be accessible to anyone without authentication\n\nThe default value is `false`.\n","default":false},"video_options":{"type":"object","properties":{"remove_timestamp":{"type":"boolean"},"smooth_transition":{"type":"boolean"},"timestamp_position":{"type":"object","properties":{"x":{"type":"number"},"y":{"type":"number"},"h":{"type":"number"},"w":{"type":"number"}},"example":{"x":4,"y":2,"h":20,"w":50}},"section_blur":{"type":"boolean","default":false},"blur_regions":{"type":"array","description":"List of polygons to blur (required when `section_blur` is `true`). Each polygon is a list of at least 3 `{x, y}` points given as normalized coordinates in the `0.0`–`1.0` range, relative to the snapshot's width (`x`) and height (`y`). This keeps regions correct regardless of the output resolution. Each polygon's bounding box must have non-zero width and height.\n","items":{"type":"array","minItems":3,"items":{"type":"object","required":["x","y"],"properties":{"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1}}}},"example":[[{"x":0.25,"y":0.28},{"x":0.33,"y":0.34},{"x":0.32,"y":0.52},{"x":0.26,"y":0.45}]]}},"required":["remove_timestamp","smooth_transition"]},"logo":{"type":"object","description":"Optional custom logo watermark. The `id` refers to one of the project's uploaded logos. Position and size are normalized values relative to the video dimensions.\n","properties":{"id":{"type":"integer","description":"Id of the project logo to use."},"x":{"type":"number","minimum":0,"maximum":1,"exclusiveMaximum":true},"y":{"type":"number","minimum":0,"maximum":1,"exclusiveMaximum":true},"width":{"type":"number","minimum":0,"exclusiveMinimum":true,"maximum":0.5},"height":{"type":"number","minimum":0,"exclusiveMinimum":true,"maximum":0.5}},"required":["id","x","y","width","height"]}},"required":["camera_exid","title","duration","from_datetime","to_datetime","schedule","video_options"]}}}},"responses":{"201":{"description":"Timelapse created. Its media is generated asynchronously.","content":{"application/json":{"schema":{"type":"object","description":"A timelapse as rendered by `TimelapseView \"show.json\"` (returned when creating a project timelapse).\n","properties":{"id":{"type":"integer","description":"Timelapse id"},"exid":{"type":"string","description":"Timelapse exid","example":"ersd-zsdes"},"camera":{"type":"string","description":"Camera's name"},"from_date":{"type":"string","format":"date-time","description":"Start of the snapshot range, in the camera's timezone."},"to_date":{"type":"string","format":"date-time","description":"End of the snapshot range, in the camera's timezone."},"duration":{"type":"integer","description":"The timelapse duration in seconds"},"schedule":{"$ref":"#/paths/~1v2~1projects~1{project_exid}~1media-hub~1timelapses/post/requestBody/content/application~1json/schema/properties/schedule"},"status":{"type":"integer","description":"Timelapse status"},"requestor":{"type":"string","format":"email","description":"The email of the timelapse creator."},"created_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"},"notes":{"type":"string","nullable":true},"category":{"type":"string","nullable":true},"is_urgent":{"type":"boolean","nullable":true}}}}}},"400":{"$ref":"#/paths/~1v2~1widgets/get/responses/400"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"The project does not exist, or the referenced camera was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Camera 'evercam-camera' not found."}}}}}}}}},"/v2/projects/{project_exid}/media-hub/timelapses/{id}":{"parameters":[{"$ref":"#/paths/~1v2~1projects~1{project_exid}/parameters/0"},{"name":"id","in":"path","description":"The timelapse exid (string identifier).","required":true,"style":"simple","explode":false,"schema":{"type":"string","example":"ersd-zsdes"}}],"patch":{"tags":["Timelapses"],"summary":"Update timelapse","description":"Update a timelapse.\n\n### Fields\n\nOnly the `title` and `public` fields can be updated. Any other fields in the request body are ignored.\n\n### Permission\n\nAuthorization is satisfied if any of the following is true:\n  * The connected user is the project owner\n  * The connected user created the timelapse\n  * The user holds the `project-media_hub_manage` permission on the project\n\n**Required permission:** `project-media_hub_manage`\n","operationId":"updateTimelapse","x-required-permission":"project-media_hub_manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","example":"New name"},"public":{"type":"boolean","description":"Whether the timelapse is publicly accessible without authentication."}}}}}},"responses":{"200":{"description":"The updated timelapse.","content":{"application/json":{"schema":{"type":"object","description":"A timelapse rendered by the media-hub timelapse view (`ArchiveView \"timelapse.json\"`). Shared by the project timelapse update endpoint and the media-hub archive show endpoint (where a media file may be a timelapse).\n","properties":{"id":{"type":"integer","description":"Timelapse id"},"exid":{"type":"string","description":"Timelapse exid","example":"ersd-zsdes"},"camera_exid":{"type":"string","nullable":true,"description":"Exid of the camera the timelapse belongs to. Null when the timelapse is not tied to a camera.","example":"rezd-ertyp"},"title":{"type":"string","description":"Timelapse title","example":"Timelapse"},"from_date":{"type":"string","format":"date-time"},"to_date":{"type":"string","format":"date-time"},"created_at":{"type":"string","format":"date-time"},"status":{"type":"string","description":"Human-readable timelapse status."},"requester_name":{"type":"string","description":"Full name of the timelapse creator."},"requester_email":{"type":"string","format":"email","description":"Email of the timelapse creator."},"public":{"type":"boolean","description":"Whether the timelapse is publicly accessible without authentication."},"type":{"type":"string","description":"Always `timelapse`.","example":"timelapse"},"format":{"type":"string","description":"Format of the timelapse video (defaults to `mp4`).","example":"mp4"},"thumbnail_url":{"type":"string","format":"uri","description":"URL of the timelapse thumbnail."},"completed_at":{"type":"string","format":"date-time","nullable":true,"description":"When the timelapse finished processing; null while pending/failed."},"notes":{"type":"string","nullable":true},"category":{"type":"string","nullable":true},"is_urgent":{"type":"boolean","nullable":true},"bucket":{"type":"string","description":"Storage bucket for the media (e.g. `project`)."},"source_product":{"type":"string","nullable":true,"description":"The source product from which the media was created, e.g. 'camera', 'drone'."},"feature_type":{"type":"string","nullable":true,"description":"The feature type of the media, e.g. 'local_recording_clip', 'compare', 'x-ray'."}}}}}},"400":{"$ref":"#/paths/~1v2~1widgets/get/responses/400"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"The project does not exist, or the timelapse was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Timelapse 'ersd-zsdes' does not exists"}}}}}}}},"delete":{"tags":["Timelapses"],"summary":"Delete timelapse","description":"Delete a timelapse and all the files related to it.\n\n### Timelapse Creator\n\nIf the timelapse to delete is currently in progress, then it'll be cancelled.\n\n### Permission\n\nAuthorization is satisfied if any of the following is true:\n  * The connected user is the project owner\n  * The connected user created the timelapse\n  * The user holds the `project-media_hub_manage` permission on the project\n\n**Required permission:** `project-media_hub_manage`\n","operationId":"deleteTimelapse","x-required-permission":"project-media_hub_manage","responses":{"204":{"description":"Timelapse deleted successfully (no content)."},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"The project does not exist, or the timelapse was not found.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Timelapse 'ersd-zsdes' does not exists"}}}}}}}}},"/v2/cameras/{camera_exid}/timelapses/snapshots":{"get":{"tags":["Timelapses"],"summary":"Get timelapse timestamps","description":"Return a list of timestamps that make up a timelapse. The timestamps of the snapshots of the timelapse are\nchosen according to the specified `date range`, `schedule` and `count` fields.\n\n## Schedule\n\nThe schedule is used to choose which days and which hour interval to include, it's in the following format:\n```\n{\n  \"monday\": [\"00:00-23:00\"],\n  \"tuesday\": [],\n  \"wednesday\": ...\n  ...\n}\n```\n\n**Note 1**\n\nFor legacy reasons, even when the hour interval has a precision of minutes, only the hour precision is taken into account.\nmeans that: `00:00`, `00:10`, `00:17`, ... is the same as `00:00`. And also both the upper and lower value of the interval are inclusive\nmeans `[\"08:00-17:00\"]` is translated to the following time interval `[08:00:00-17:59:59]`.\n\n**Note 2**\n\nEven when the hour interval is an array, it only accepts at most one entry. Something like `[\"08:00-10:00\", \"11:00-15:00\"]` is not\nvalid, and in this case, only the first interval is taken into account.\n\n**Note 3**\n\nThe hour intervals are evaluated in the camera timezone and not in UTC.\n\n## Snapshots Selection\n\nThere may be thousands of snapshots each day, to make a timelapse we need hundrends of snapshots, so we must select only a subset of\nthe snapshots. e.g. a timelapse of 30s with 24fps (frame per second) requires 30 * 24 = 720 snapshots.\n\nThe selection process is a simple one:\n  * Get the total count (`total_snapshots`) of the snapshots in the specified range and schedule.\n  * Calculates the `step`, which equals to `total_snapshots / count`.\n  * If step is less than 1, then all the snapshots are selected.\n  * Otherwise we apply the following:\n    * We order the snapshots in ascending order and give each snapshot a number starting from 1\n    * We select each snapshost which number equals to `int(i * step)` with `int` the integer part and `i` an integer\n      starting from 1.\n\ne.g. Suppose we have 5 timestamps in the database `[2022-02-01 00:00:01Z - 2022-02-01 00:00:05Z]`, we wish to select only 2.\n  * So the `step = 5 / 2 = 2.5`.\n  * We order the snapshots and assign them an incrementing number.\n    number | timestamp\n    -------|----------\n    1 | 2022-02-01 00:00:01Z\n    2 | 2022-02-01 00:00:02Z\n    3 | 2022-02-01 00:00:03Z\n    4 | 2022-02-01 00:00:04Z\n    5 | 2022-02-01 00:00:05Z\n  * We select the following snapshots\n  \n  ```\n  i = 1\n  arr = []\n\n  while i * step <= total_snapshots do\n    arr = add(arr, int(i * step))\n  end\n\n  We'll have:\n  arr = [int(1 * 2.5), int(2 * 2.5)] = [2, 5]\n  So we select [2022-02-01 00:00:02Z, 2022-02-01 00:00:05Z]\n  ```\n\n**Required permission:** `project-media_hub_view`\n","operationId":"getTimelapseTimestamps","x-required-permission":"project-media_hub_view","parameters":[{"$ref":"#/paths/~1v2~1cameras~1{camera_exid}/parameters/0"},{"name":"from","in":"query","description":"The min date of the selected snapshots (in UTC)","required":true,"schema":{"type":"string","format":"date-time"}},{"name":"to","in":"query","description":"The max date of the selected snapshot (in UTC)","required":true,"schema":{"type":"string","format":"date-time"}},{"name":"schedule","in":"query","description":"The schedule, as a json string.","required":true,"schema":{"type":"string"}},{"name":"count","in":"query","description":"The total snapshots to select.","required":true,"schema":{"type":"integer","minimum":1,"maximum":1440}}],"responses":{"200":{"description":"Snapshots timestamps","content":{"application/json":{"schema":{"type":"object","properties":{"snapshots":{"type":"array","items":{"type":"string","format":"date-time","description":"The snapshot timestamp in the camera timezone"}}}}}}},"400":{"$ref":"#/paths/~1v2~1widgets/get/responses/400"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"}}}},"/v2/cameras/{camera_exid}/hls":{"get":{"tags":["Cameras"],"summary":"Get HLS manifest","description":"Get HLS manifest file.\n\nCurrently it only works if the camera is linked to an NVR of type: `ExNVR`.\n\nHLS request will return Forbidden if requester have only read-only camera rights and camera under NDA project.\n\n**Required permission:** `camera-live_view_view`\n","operationId":"GetHlsManifest","x-required-permission":"camera-live_view_view","parameters":[{"$ref":"#/paths/~1v2~1cameras~1{camera_exid}/parameters/0"},{"name":"start_date","in":"query","required":false,"description":"Start streaming from this date","schema":{"type":"string","format":"date-time"}}],"responses":{"302":{"description":"Redirect to the streaming server URL (`Location` header)"},"400":{"$ref":"#/paths/~1v2~1widgets/get/responses/400"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"}}}},"/v2/cameras/{camera_exid}/streaming":{"get":{"tags":["Cameras"],"summary":"Get live stream URL","description":"Redirects to the camera's live stream on its assigned streaming server\n(e.g. a MediaMTX instance).\n\nThe camera must have been registered for streaming beforehand.\n\n**Required permission:** `camera-live_view_view`\n","operationId":"GetCameraStreaming","x-required-permission":"camera-live_view_view","parameters":[{"$ref":"#/paths/~1v2~1cameras~1{camera_exid}/parameters/0"},{"name":"protocol","in":"query","required":false,"description":"Streaming protocol to use","schema":{"type":"string","enum":["hls","webrtc"],"default":"hls"}}],"responses":{"302":{"description":"Redirect to the streaming server URL (`Location` header)"},"400":{"$ref":"#/paths/~1v2~1widgets/get/responses/400"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"$ref":"#/paths/~1v2~1api-keys~1{id}/patch/responses/404"}}}},"/v2/projects/{project_exid}/progress-photos":{"parameters":[{"$ref":"#/paths/~1v2~1projects~1{project_exid}/parameters/0"}],"get":{"tags":["Automations"],"summary":"Get all project Automations","description":"Returns all Automations created by the current user for the specified\nproject.\n\n**Required permission:** Authenticated user; project resolved via `project_exid`.\nNo additional AuthzPlug permission check is performed by this action.\n","operationId":"listProgressPhotos","x-required-permission":"Authenticated user; project resolved via project_exid — no additional AuthzPlug permission check","responses":{"200":{"description":"List of Automations","content":{"application/json":{"schema":{"type":"object","properties":{"progress_photos":{"type":"array","items":{"$ref":"#/paths/~1v2~1progress-photos/post/responses/201/content/application~1json/schema/properties/progress_photos/items"}}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"404":{"description":"Project not found","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}}}}},"/v2/progress-photos":{"post":{"tags":["Automations"],"summary":"Create an Automation","description":"Create a new automation. An automation is a feature where live snapshots of the configured cameras are taken\nand sent as inlined images in an email and as well as attachments or uploaded to procore or aconex.\n\n**Automation Scheduling**\n\nWhen creating a new automation, a background job is scheduled to be run using the `schedule (days, time, timezone)` specified in the automation params.\n\ne.g: An automation that is scheduled in the following days `[Monday, Wednesday, Friday]` at `11:00 Africa/Algiers`, will be scheduled to run in\nUTC time depending on the time of creation. If the automation is created for example on `Monday, January 24 2022 at 09:59 UTC`, it'll be scheduled on\n`Monday, January 24 2022 at 10:00 UTC`. And if it's created at `Monday, January 24 2022 at 10:01 UTC`, it'll be scheduled on `Wednesday, January 26 10:00 UTC`.\n\n**Automation execution**\n\nA background job scheduler will run the job at the scheduled time, when the job is run, it'll fetch the automation record and do the following:\n  * Get only cameras that have `online` or `offline` status.\n  * If the automation provider is email and the list of recipients or cameras is empty, skip the automation and termintes the job immediately.\n  * Try to get live images for the selected cameras 3 times. If it fails, then fallback to get them from the image store\n    as long as this images are not older than 2 minutes from the current moment (the moment when the call to image store is made)\n  * If automation provider is email, we send an email to all the recipients with the images inlined in the email and also as attachments, and mention all the cameras\n    that failed to get live snapshots, otherwise we upload the live snapshots to procore or aconex.\n\n***Note***\n\nIf the job fails for whatever reason, it'll be retried 3 times. And also there's a chance that an email will be sent two times\n(this is a rare case and shouldn't happen most of the time)\n\n**Paused automations**\n\nYou can also create an automation in paused state, by setting the `is_paused` param to true, a paused automation will not schedule any job\nuntil you enable it by updating the automation.\n\n**Limits**\n\nThe only limit that we put now, is that you can configure only 15 cameras at most. This is mostly a limit of email providers,\nmost of email providers impose a limit on the size of the email. If you want to receive email for more than 15 cameras,\nconsider creating more automations.\n","operationId":"createprogress-photos","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"type":{"type":"string","description":"Progress Photo type. Defaults to `photo` if omitted.\n- `photo` / `compare` / `gate_report`: require `camera_exids`.\n- `weather`: does not require `camera_exids`; use `config.project_exid` to associate a project.\n\nEach type enables additional `config` fields: `compare_delay` for `compare`,\n`period`/`project_exid`/`columns`/`vehicle_types` for `gate_report`, and the\nweather fields for `weather`.\n","enum":["photo","compare","weather","gate_report"],"default":"photo"},"camera_exids":{"type":"string","description":"List of camera's ids seperated by comma. The max allowed cameras is 15.\nRequired for all types except `weather`.\n","example":"exrf-serdf,dred-zdfsx"},"notify_days":{"type":"string","description":"List of the days when to notify the users","example":"Friday,Monday"},"notify_time":{"type":"string","description":"Email's sending time, in HH:mm format","example":"14:13"},"timezone":{"type":"string","nullable":false,"default":"Etc/UTC","description":"IANA timezone the automation's schedule is evaluated in. Optional — omitting it falls back to `Etc/UTC`. An explicit `null` is rejected with a validation error, since the next run time cannot be computed without a timezone.\n","example":"Europe/Dublin"},"name":{"type":"string","description":"Progress Photo name.","example":"Progress Photo"},"provider":{"type":"string","description":"Progress Photo provider","enum":["email","procore","aconex","autodesk"]},"config":{"description":"Provider configuration merged with the type specific configuration. A `weather`\nautomation delivered by email therefore sends `recipients` together with the\nweather fields. Unknown keys are discarded server-side.\n","anyOf":[{"type":"object","description":"email configuration.","properties":{"recipients":{"type":"string","description":"List of the recipients' emails separated by comma.","example":"user1@evercam.io,user2@evercam.io"}}},{"type":"object","description":"procore configuration.","properties":{"company_id":{"type":"integer","description":"Procore company id.","example":57416218},"project_id":{"type":"integer","description":"Procore project id.","example":98010137},"category_id":{"type":"integer","description":"Category (album) project id.","example":56294995}}},{"type":"object","description":"aconex configuration.","properties":{"project_id":{"type":"integer","description":"Aconex project id.","example":98010137}}},{"type":"object","description":"weather configuration. Only used when `type` is `weather`.","properties":{"project_exid":{"type":"string","description":"Evercam project exid. Resolved server-side to `project_id`.\nRequired when `type` is `weather`.\n","example":"myproject-abc12"},"report_type":{"type":"string","description":"Whether the report covers upcoming or past weather. Required when\n`type` is `weather`.\n","enum":["forecast","history"],"default":"forecast"},"forecast_days":{"type":"integer","description":"Number of days to forecast, between 1 and 7. Required when\n`report_type` is `forecast`, ignored otherwise.\n","minimum":1,"maximum":7,"default":2},"history_period":{"type":"string","description":"Period covered when `report_type` is `history`. Currently the last 7\ndays ending yesterday.\n","enum":["last_week"],"default":"last_week"},"data_granularity":{"type":"string","description":"Whether each row of the report is one hour or one day.","enum":["hourly","daily"],"default":"hourly"},"export_format":{"type":"string","description":"Format of the report attached to the email.","enum":["pdf","csv"],"default":"pdf"},"selected_columns":{"type":"array","description":"Columns to include, in the given order. Valid values depend on\n`data_granularity`; defaults to every column when omitted or empty.\n\n`hourly`: `time`, `temperature`, `feels_like`, `weather_description`,\n`humidity`, `pressure`, `wind_speed`, `wind_direction`,\n`precipitation`, `uv_index`, `clouds`, `wind_degree`.\n\n`daily`: `date`, `night`, `morning`, `afternoon`, `evening`,\n`min_temp`, `max_temp`, `min_precip`, `max_precip`, `min_wind_speed`,\n`max_wind_speed`, `min_humidity`, `max_humidity`, `min_pressure`,\n`max_pressure`, `min_clouds`, `max_clouds`, `max_uv_index`.\n","items":{"type":"string"},"example":["time","temperature","weather_description","precipitation"]}}}]},"is_paused":{"type":"boolean","description":"Create a Progress Photo in paused state.","default":false}},"required":["provider","config","notify_time","notify_days"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"progress_photos":{"type":"array","items":{"title":"ProgressPhoto","type":"object","properties":{"type":{"type":"string","description":"The type of progress photo.","enum":["photo","compare","weather","gate_report"],"default":"photo"},"id":{"type":"string","description":"Progress Photo unique ID.","example":"erds-zszdf"},"cameras":{"type":"array","description":"Array containing associated cameras with progress photo.","items":{"type":"object","properties":{"exid":{"type":"string","description":"Camera unique exid","example":"ezrsd-fszed"},"name":{"type":"string","description":"Camera name","example":"Camera"}}}},"name":{"type":"string","description":"Progress Photo name.","example":"Progress Photo"},"provider":{"type":"string","description":"Progress Photo provider","enum":["email","procore","autodesk","aconex"]},"config":{"anyOf":[{"type":"object","description":"email configuration.","properties":{"recipients":{"type":"array","description":"List of the recipients' emails and possible names (if they are evercam users).","items":{"type":"object","properties":{"email":{"type":"string","description":"Recipient email.","example":"jon@doe.com"},"name":{"type":"string","description":"Recipient possible name.","example":"Jon doe"}}}}}},{"type":"object","description":"procore configuration.","properties":{"recipients":{"type":"array","description":"List of the recipients' emails and possible names (if they are evercam users).","items":{"type":"object","properties":{"email":{"type":"string","description":"Recipient email.","example":"jon@doe.com"},"name":{"type":"string","description":"Recipient possible name.","example":"Jon doe"}}}},"company_id":{"type":"integer","description":"Procore company id.","example":57416218},"project_id":{"type":"integer","description":"Procore project id.","example":98010137}}},{"type":"object","description":"weather configuration.","properties":{"recipients":{"type":"array","description":"List of the recipients' emails and possible names (if they are evercam users).","items":{"type":"object","properties":{"email":{"type":"string","description":"Recipient email.","example":"jon@doe.com"},"name":{"type":"string","description":"Recipient possible name.","example":"Jon doe"}}}},"project_exid":{"type":"string","description":"Evercam project exid.","example":"myproject-abc12"},"project_id":{"type":"integer","description":"Evercam project id, resolved from `project_exid`.","example":1234},"report_type":{"type":"string","description":"Whether the report covers upcoming or past weather.","enum":["forecast","history"]},"forecast_days":{"type":"integer","description":"Number of days forecasted. Only meaningful when `report_type` is `forecast`.","example":2},"history_period":{"type":"string","description":"Period covered when `report_type` is `history`.","enum":["last_week"]},"data_granularity":{"type":"string","description":"Whether each row of the report is one hour or one day.","enum":["hourly","daily"]},"export_format":{"type":"string","description":"Format of the report attached to the email.","enum":["pdf","csv"]},"selected_columns":{"type":"array","description":"Columns included in the report, in order. Absent when every column is included.","items":{"type":"string"},"example":["time","temperature","weather_description","precipitation"]}}}]},"notify_days":{"type":"string","description":"Notify days","example":"Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday"},"notify_time":{"type":"string","description":"Progress Photo notify time."},"requester_email":{"type":"string","description":"Progress Photo requester email."},"requester_name":{"type":"string","description":"Progress Photo requester fullname."},"is_paused":{"type":"boolean","default":false,"description":"Is Progress Photo paused or not."},"restricted_camera_exids":{"type":"array","description":"Array containing the exids of the restricted cameras(associated  with progress photo)."},"restricted_cameras_projects":{"type":"array","description":"Array containing projects' cameras (associated with progress photo) that are restricted.","items":{"type":"object","properties":{"exid":{"type":"string","description":"Project unique exid","example":"armsi-doxar"},"name":{"type":"string","description":"Project name","example":"Project"}}}},"restrictions_type":{"type":"string","description":"the type of the restriction complete/partial/none.","example":"partial"},"timezone":{"type":"string","description":"Timezone used to send Progress Photo."},"created_at":{"type":"string","format":"date-time","description":"Creation date of Progress Photo in ISO8601 format","example":"2019-02-15T13:00:04+00:00"}}},"minItems":1,"maxItems":1}}}}}},"400":{"$ref":"#/paths/~1v2~1logs/post/responses/400"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"description":"Forbidden: the requester does not have the `project-automations_view` permission on the project given in `config.project_exid`.\n","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}},"404":{"description":"Not found: no project matches `config.project_exid`.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}}}}},"/v2/progress-photos/{id}":{"parameters":[{"name":"id","in":"path","description":"The ID of the automation being requested.","required":true,"schema":{"type":"string"}}],"get":{"tags":["Automations"],"summary":"Get an Automation","description":"Returns the requested Automation details.","operationId":"getProgressPhoto","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"progress_photos":{"type":"array","items":{"$ref":"#/paths/~1v2~1progress-photos/post/responses/201/content/application~1json/schema/properties/progress_photos/items"},"minItems":1,"maxItems":1}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"description":"Forbidden: the automation does not belong to the current user.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}},"404":{"description":"Automation not found","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}}}},"patch":{"tags":["Automations"],"summary":"Update an Automation","description":"Update an automation. As for scheduling and limitation it's the same as the creation with some caveats.\n\n**Caveats**\n  * If there's a running job for this automation it'll not be canceled.\n  * When updating an automation, the new configuration takes effect at the next run. Means currently running jobs are not affected.\n  * Pausing an automation will cancel future scheduled jobs.\n  * Resuming an automation by setting `is_paused` to `false` will reschedule a job for an automation.\n","operationId":"updateProgressPhotos","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1progress-photos/post/requestBody/content/application~1json/schema"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"progress_photos":{"type":"array","items":{"$ref":"#/paths/~1v2~1progress-photos/post/responses/201/content/application~1json/schema/properties/progress_photos/items"},"minItems":1,"maxItems":1}}}}}},"400":{"$ref":"#/paths/~1v2~1logs/post/responses/400"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"description":"Forbidden: the automation does not belong to the current user, or the requester does not have the `project-automations_view` permission on the project given in `config.project_exid`.\n","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}},"404":{"description":"Automation not found, or no project matches `config.project_exid`.\n","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}}}},"delete":{"tags":["Automations"],"summary":"Delete an Automation","description":"Delete an automation and cancel any scheduled job for this progress photo. The same as update, if there's a currently\nrunning job, it'll not be canceled.\n","operationId":"deleteProgressPhotos","responses":{"204":{"description":"Success, no body"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"description":"Forbidden: the automation does not belong to the current user.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}},"404":{"description":"Automation not found","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}}}}},"/v2/progress-photos/{id}/unsubscribe":{"patch":{"tags":["Automations"],"security":[{}],"summary":"Unsubscribe an email from an automation","description":"Remove an email address from the list of recipients of the specified automation. This is a public route (no authentication required). When a `token` is supplied it is used to authorize the unsubscribe; otherwise the request is authenticated via the standard session/API credentials.\n\nOnly automations whose delivery provider is `email` can be unsubscribed from.\n","operationId":"unsubscribeUserFromProgressPhotos","parameters":[{"name":"id","in":"path","description":"Automation exid.","required":true,"schema":{"type":"string","example":"my-progress-photo"}},{"name":"email","in":"query","description":"The recipient email address to unsubscribe.","required":true,"schema":{"type":"string","format":"email","example":"user@example.com"}},{"name":"token","in":"query","description":"Optional unsubscribe token. When present, the request is authorized via this token instead of session/API credentials.\n","required":false,"schema":{"type":"string"}}],"responses":{"204":{"description":"The email was unsubscribed. The response body is empty."},"400":{"description":"The automation's provider is not `email`.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}},"401":{"description":"Invalid or expired unsubscribe token.\n**Note:** this endpoint double-encodes the error. The controller passes an already JSON-encoded `%Evercam.Error{}` string to `render_error`, which the `ErrorView` then wraps in a `message` field. The emitted body is therefore a `{ \"message\": \"<json-string>\" }` object whose `message` value is itself a JSON-encoded error string. This is likely a backend bug — the error struct should be passed directly rather than pre-encoded.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"A JSON-encoded Evercam.Error string, e.g. {\"code\":\"INVALID_TOKEN\",\"message\":\"Invalid or expired token\"}","example":"{\"code\":\"INVALID_TOKEN\",\"message\":\"Invalid or expired token\"}"}}}}}},"404":{"description":"Automation not found.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}}}}},"/v2/projects/{project_exid}/media-hub":{"get":{"tags":["Media"],"summary":"Get all media","description":"Get all the media associated with the current user's cameras (owned and shared).\n","operationId":"getAllArchives","x-required-permission":"project-media_hub_view","parameters":[{"$ref":"#/paths/~1v2~1projects~1{project_exid}/parameters/0"},{"name":"date_range","in":"query","required":false,"description":"Date range to filter on, must be in the format [start_date, end_date]","schema":{"type":"array","items":{"type":"string","format":"date"}}},{"name":"camera_exid","in":"query","description":"Filter by camera exid (exact searching)","required":false,"example":"anoum-ilayd","schema":{"type":"string"}},{"name":"requester_email","in":"query","description":"Filter by requestor email","required":false,"example":"@evercam.io","schema":{"type":"string"}},{"name":"type","in":"query","description":"Filter by media type (contains searching)","required":false,"example":"dah","schema":{"type":"string"}},{"name":"title","in":"query","description":"Filter by media title.","required":false,"schema":{"type":"string"}},{"name":"notes","in":"query","description":"Filter by media notes.","required":false,"schema":{"type":"string"}},{"name":"category","in":"query","description":"Filter by media category.","required":false,"schema":{"type":"string"}},{"name":"exid","in":"query","description":"Filter by media exid.","required":false,"schema":{"type":"string"}},{"name":"is_urgent","in":"query","description":"Filter by urgency flag.","required":false,"schema":{"type":"boolean"}},{"name":"sort","in":"query","description":"Sort in the format `field|direction`, e.g. `created_at|desc`.","required":false,"schema":{"type":"string","example":"created_at|desc"}},{"name":"source_product","in":"query","required":false,"schema":{"type":"string"},"description":"The source product from which the media was created, e.g., 'camera', 'drone'."},{"name":"feature_type","in":"query","required":false,"schema":{"type":"string"},"description":"The feature type of the media, e.g., 'local_recording_clip', 'compare', 'x-ray'."},{"name":"status","in":"query","description":"Filter by status, can use (pending, completed, failed) ","required":false,"example":"processing","schema":{"type":"string"}},{"$ref":"#/paths/~1v2~1video-walls/get/parameters/7"},{"$ref":"#/paths/~1v2~1video-walls/get/parameters/8"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"from":{"$ref":"#/paths/~1v2~1widgets/get/responses/200/content/application~1json/schema/properties/from"},"to":{"$ref":"#/paths/~1v2~1widgets/get/responses/200/content/application~1json/schema/properties/to"},"page":{"$ref":"#/paths/~1v2~1company~1kits/get/parameters/0/schema"},"limit":{"$ref":"#/paths/~1v2~1company~1kits/get/parameters/1/schema"},"total":{"$ref":"#/paths/~1v2~1widgets/get/responses/200/content/application~1json/schema/properties/total"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"exid":{"type":"string","description":"media's exid","example":"sdfzd-fertf"},"title":{"type":"string"},"from_date":{"type":"string","format":"date-time"},"to_date":{"type":"string","format":"date-time"},"public":{"type":"boolean"},"status":{"type":"string"},"type":{"type":"string"},"format":{"type":"string","description":"Media file format (currently always 'mp4').","example":"mp4"},"embed_code":{"type":"string"},"file_name":{"type":"string"},"frames":{"type":"integer"},"url":{"type":"string","description":"Thumbnail/media URL derived from the media type.\n"},"created_at":{"type":"string","format":"date-time","example":"2020-01-05T15:00:00Z"},"camera_id":{"type":"integer","nullable":true},"camera_exid":{"type":"string","nullable":true,"example":"fded-zsdcv"},"camera_name":{"type":"string","nullable":true,"example":"Camera 1"},"camera_timezone":{"type":"string","nullable":true,"example":"Europe/Dublin"},"requester_email":{"type":"string"},"requester_name":{"type":"string"},"project_id":{"type":"integer"},"project_exid":{"type":"string"},"notes":{"type":"string","nullable":true},"category":{"type":"string","nullable":true},"is_urgent":{"type":"boolean"},"bucket":{"type":"string","nullable":true},"source_product":{"type":"string","nullable":true,"description":"The source product from which the media was created, e.g., 'camera', 'drone'.\n"},"feature_type":{"type":"string","nullable":true,"description":"The feature type of the media, e.g., 'local_recording_clip', 'compare', 'x-ray'.\n"}}}}}}}}},"400":{"$ref":"#/paths/~1v2~1logs/post/responses/400"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"Project does not exist.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}}}},"post":{"tags":["Media"],"summary":"Create media","description":"Create new media for the specified camera.\n\nWe distinguish 5 types of media as follows:\n\n### Url\n\nThe simplest media type is `url` which only contains the URL of an outside resource that can be played in Evercam Dashboard.\n\n### Edit\n\nThe `edit` media is created when editing a snapshot with the edit tool.\n\n### File\n\nThis media is created by uploading files directly via multipart form upload. The file is uploaded and saved in the media store immediately.\n\n### Clip\n\nA clip media is a video created from the snapshots stored in our snapshot store with a rate of 6 fps, it's like a mini-timelapse.\n\nSuppose we have snapshots stored each 5 seconds, a total of 720 snapshot per hour. If we create an media using one hour snapshots, \nwe'll have a video of 720 / 6 = 2 minutes.\n\n### Local Clip\n\nA local clip media is a video downloaded from the NVR on site directly. This is an experimental feature and does not support all \nthe NVRs we're using.\n\nIt's also subject to the following limits:\n  * You can only request a video of up to 1 hour\n  * You can only request 20 video in a day per camera. (the day starts at 00:00:00 UTC)\n  * You cannot request a video if you have only read-only camera rights and camera under NDA project.\n  * You cannot request a video for decommissioned camera.\n","operationId":"createArchive","x-required-permission":"project-media_hub_view","parameters":[{"$ref":"#/paths/~1v2~1projects~1{project_exid}/parameters/0"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","description":"media's title","example":"The media"},"camera_exid":{"type":"string","description":"Unique id of a camera","example":"anoum-ilayd"},"from_date":{"type":"string","format":"date-time","example":"2021-05-01T01:00:00Z"},"to_date":{"type":"string","format":"date-time","example":"2021-05-01T01:00:00Z"},"url":{"type":"string","format":"url"},"content":{"type":"string","format":"byte","description":"Base64-encoded JPEG image data (data URI or raw base64)."},"file_extension":{"type":"string","enum":["png","jpeg","pdf","mp4"]},"type":{"type":"string","enum":["url","file","edit","clip","local_clip","x-ray"],"description":"Media's type","example":"clip"},"store_as_type":{"type":"string","enum":["url","edit","clip","local_clip","x-ray","mobile-asset"],"description":"If type is file this would be saved as this value instead (will be still processed as a file), for example we can upload a local clip and be processed as a file but save it as local_clip","example":"local_clip"},"source_product":{"type":"string","description":"The source product from which the media was created, e.g., 'camera', 'drone'."},"feature_type":{"type":"string","description":"The feature type of the media, e.g., 'local_recording_clip', 'compare', 'x-ray'."}},"required":["title"]}},"multipart/form-data":{"schema":{"type":"object","description":"Use this content type when uploading files (type 'file')","properties":{"title":{"type":"string","description":"media's title","example":"The media"},"camera_exid":{"type":"string","description":"Unique id of a camera","example":"anoum-ilayd"},"from_date":{"type":"string","format":"date-time","example":"2021-05-01T01:00:00Z"},"to_date":{"type":"string","format":"date-time","example":"2021-05-01T01:00:00Z"},"file":{"type":"string","format":"binary","description":"The file to upload"},"file_extension":{"type":"string","enum":["png","jpg","jpeg","pdf","mp4"],"description":"File extension of the uploaded file"},"type":{"type":"string","enum":["file"],"description":"Must be 'file' when using multipart upload","example":"file"},"store_as_type":{"type":"string","enum":["url","edit","clip","local_clip","x-ray","mobile-asset"],"description":"If type is file this would be saved as this value instead","example":"local_clip"},"source_product":{"type":"string","description":"The source product from which the media was created, e.g., 'camera', 'drone'."},"feature_type":{"type":"string","description":"The feature type of the media, e.g., 'local_recording_clip', 'compare', 'x-ray'."}},"required":["title","file","file_extension","type"]}}}},"responses":{"201":{"description":"Media created. Renders the created media as a single Archive object (`archive.json`).","content":{"application/json":{"schema":{"title":"Archive","type":"object","properties":{"id":{"type":"integer","description":"Unique identifier of archive"},"exid":{"type":"string","description":"Unique identifier of archive"},"camera_exid":{"type":"string","nullable":true,"description":"Camera unique identifier. Null when the archive is not tied to a camera.","example":"sadsa-sda45"},"title":{"type":"string","description":"Archive title.","example":"The great archive"},"from_date":{"type":"string","format":"date-time","example":"2019-02-18T09:00:00.000+00:00"},"to_date":{"type":"string","format":"date-time","example":"2019-02-18T09:00:00.000+00:00"},"created_at":{"type":"string","format":"date-time","example":"2019-02-18T09:00:00.000+00:00"},"status":{"type":"string","enum":["Pending","Failed","Processing","Completed"]},"requester_email":{"type":"string","example":"Archive requester email."},"requester_name":{"type":"string","example":"Archive requester full name."},"embed_code":{"type":"string","example":"Archive shareable embed code."},"embed_time":{"type":"boolean","description":"Embaed timestamp on the archive or not."},"frames":{"type":"integer","description":"Total number of frames in the created archive."},"public":{"type":"boolean","description":"Is publicly available."},"thumbnail_url":{"type":"string","example":"Archive thumbnail URL."},"type":{"type":"string","description":"Media type (e.g. url, file, clip, edit, local_clip, x-ray).","example":"clip"},"file_name":{"type":"string","description":"Stored file name of the archive."},"media_url":{"type":"string","description":"URL of the archive media (the archive's `url` field)."},"notes":{"type":"string","nullable":true},"category":{"type":"string","nullable":true},"is_urgent":{"type":"boolean"},"bucket":{"type":"string","nullable":true},"source_product":{"type":"string","description":"The source product from which the media was created, e.g., 'camera', 'drone'."},"feature_type":{"type":"string","description":"The feature type of the media, e.g., 'local_recording_clip', 'compare', 'x-ray'."}},"description":""}}}},"400":{"$ref":"#/paths/~1v2~1widgets/get/responses/400"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"Project does not exist.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}}}}},"/v2/projects/{project_exid}/media-hub/{id}":{"parameters":[{"$ref":"#/paths/~1v2~1projects~1{project_exid}/parameters/0"},{"name":"id","in":"path","description":"media's id","required":true,"schema":{"type":"string"}}],"get":{"tags":["Media"],"summary":"Get a media","description":"Returns the details of a media.\n\nRequest will return Forbidden if requester have only read-only camera rights and camera under NDA project.\n\n**Required permission:** `project-media_hub_view`\n","operationId":"getArchive","x-required-permission":"project-media_hub_view","security":[{},{"Bearer-Token":[]}],"parameters":[{"name":"download","in":"query","description":"When the media id includes a file extension (e.g. `.mp4`, `.gif`), set to `true` to force a download response instead of inline playback.\n","required":false,"schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"When the media id has no file extension, the media metadata is returned as JSON (an Archive, Compare, or Timelapse object). When the id includes a file extension, the raw media file is streamed (content type depends on the extension).\n","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/paths/~1v2~1projects~1{project_exid}~1media-hub/post/responses/201/content/application~1json/schema"},{"$ref":"#/paths/~1v2~1projects~1{project_exid}~1media-hub~1compares/post/responses/201/content/application~1json/schema"},{"$ref":"#/paths/~1v2~1projects~1{project_exid}~1media-hub~1timelapses~1{id}/patch/responses/200/content/application~1json/schema"}]}},"image/gif":{"schema":{"type":"string","format":"binary"}},"video/mp4":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Invalid file extension.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"description":"Access denied: the media is not public and you lack access.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}},"404":{"description":"Project does not exist or media not found.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}}}},"patch":{"tags":["Media"],"summary":"Update a media","description":"Updates full or partial data for an existing media.\n\n**Required permission:** `project-media_hub_manage`\n","operationId":"updateArchive","x-required-permission":"project-media_hub_manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","example":"Updated title"},"status":{"type":"integer","description":"media's status","minimum":0,"maximum":3},"public":{"type":"boolean"},"url":{"description":"media url, only for media of type url","type":"string"}}}}}},"responses":{"200":{"description":"The updated media object.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1projects~1{project_exid}~1media-hub/post/responses/201/content/application~1json/schema"}}}},"400":{"description":"Bad Request: Unable to update archive.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"Project does not exist or media not found.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}}}},"delete":{"tags":["Media"],"summary":"Delete a media.","description":"**Required permission:** `project-media_hub_manage`","operationId":"deleteArchive","x-required-permission":"project-media_hub_manage","responses":{"204":{"description":"Success, no body."},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"Project does not exist or media not found.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}}}}},"/v2/projects/{project_exid}/media-hub/{id}/retry":{"parameters":[{"$ref":"#/paths/~1v2~1projects~1{project_exid}/parameters/0"},{"name":"id","in":"path","description":"media's id (exid, optionally with a file extension)","required":true,"schema":{"type":"string"}}],"post":{"tags":["Media"],"summary":"Retry a failed media","description":"Re-triggers processing for a failed media-hub item by re-enqueuing its background worker.\n\nOnly `clip`, `local_clip` and `timelapse` media can be retried, and only while\nthey are in the `Failed` state. Each media can be retried at most 3 times.\n\n**Required permission:** `project-media_hub_manage` (the media's author can always retry their own media)\n","operationId":"retryArchive","x-required-permission":"project-media_hub_manage","responses":{"200":{"description":"Retry successfully scheduled.","content":{"application/json":{"schema":{"type":"object","properties":{"exid":{"type":"string","description":"Unique id of the media being retried."},"retry_count":{"type":"integer","description":"Number of times this media has been retried (1-3)."},"message":{"type":"string","example":"Retry successfully scheduled."}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"description":"Access denied: You do not have permission to retry this media"},"404":{"description":"Project does not exist or media not found"},"409":{"description":"The media cannot be retried in its current state:\n  * Only failed media can be retried (media is pending/processing/completed).\n  * Maximum number of retries reached.\n"},"422":{"description":"This media type cannot be retried (e.g. url, edit, x-ray, file)."}}}},"/v2/cameras/{camera_exid}/battery-readings":{"get":{"summary":"Get battery readings","description":"Get battery readings\n\n**Required permission:** `Any role on the camera or project`\n","operationId":"getBatteryReadings","x-required-permission":"Any role on the camera or project","tags":["Battery"],"parameters":[{"name":"camera_exid","in":"path","required":true,"schema":{"type":"string"}},{"name":"from_date","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"name":"to_date","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"name":"sort","in":"query","required":false,"description":"Sort expression on a battery reading field (e.g. `datetime` or `datetime|desc`).","schema":{"type":"string","example":"datetime|desc"}},{"name":"page","in":"query","required":false,"description":"Page number for pagination (1-based).","schema":{"type":"integer","default":1,"example":1}},{"name":"limit","in":"query","required":false,"description":"Number of items per page.","schema":{"type":"integer","default":50,"example":50}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"from":{"$ref":"#/paths/~1v2~1widgets/get/responses/200/content/application~1json/schema/properties/from"},"to":{"$ref":"#/paths/~1v2~1widgets/get/responses/200/content/application~1json/schema/properties/to"},"page":{"$ref":"#/paths/~1v2~1company~1kits/get/parameters/0/schema"},"limit":{"$ref":"#/paths/~1v2~1company~1kits/get/parameters/1/schema"},"total":{"$ref":"#/paths/~1v2~1widgets/get/responses/200/content/application~1json/schema/properties/total"},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"voltage":{"type":"integer"},"datetime":{"type":"string","format":"date-time"},"serial_no":{"type":"string"},"i_value":{"type":"integer"},"vpv_value":{"type":"integer"},"ppv_value":{"type":"integer"},"cs_value":{"type":"integer"},"err_value":{"type":"integer"},"h19_value":{"type":"integer"},"h20_value":{"type":"integer"},"h21_value":{"type":"integer"},"h22_value":{"type":"integer"},"h23_value":{"type":"integer"},"il_value":{"type":"integer"},"mppt_value":{"type":"integer"},"load_value":{"type":"integer"},"p_value":{"type":"integer"},"consumed_amphours":{"type":"integer"},"soc_value":{"type":"integer"},"time_to_go":{"type":"integer"},"alarm":{"type":"string"},"relay":{"type":"string"},"ar_value":{"type":"integer"},"bmv_value":{"type":"integer"},"h1_value":{"type":"integer"},"h2_value":{"type":"integer"},"h3_value":{"type":"integer"},"h4_value":{"type":"integer"},"h5_value":{"type":"integer"},"h6_value":{"type":"integer"},"h7_value":{"type":"integer"},"h8_value":{"type":"integer"},"h9_value":{"type":"integer"},"h10_value":{"type":"integer"},"h11_value":{"type":"integer"}}}}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"}}}},"/v2/cameras/{camera_exid}/battery-readings/voltage-summary":{"get":{"summary":"Get battery voltages","description":"Get battery voltages summary\n\n**Required permission:** `Any role on the camera or project`\n","operationId":"getBatteryVoltagesSummary","x-required-permission":"Any role on the camera or project","tags":["Battery"],"parameters":[{"name":"camera_exid","in":"path","required":true,"schema":{"type":"string"}},{"name":"from_date","in":"query","required":true,"schema":{"type":"string","format":"date"}},{"name":"to_date","in":"query","required":true,"schema":{"type":"string","format":"date"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","format":"date"},"max_value":{"type":"integer"},"min_value":{"type":"integer"}}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"}}}},"/v2/projects/{project_exid}/media-hub/users":{"get":{"tags":["Media"],"summary":"List media users.","description":"List all distinct users who requested at least one media item (archive, timelapse or compare) in the specified project.\n**Required permission:** `project-media_hub_view` (project owner always bypasses the check).\n","operationId":"getUsersWhoRequestedCameraArchive","x-required-permission":"project-media_hub_view","parameters":[{"$ref":"#/paths/~1v2~1projects~1{project_exid}/parameters/0"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"The requesting user's id (the media's `requested_by`).","example":4521},"email":{"type":"string","description":"The requesting user's email (`requester_email`).","example":"jane@example.com"},"name":{"type":"string","description":"The requesting user's full name (`requester_name`).","example":"Jane Doe"}}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"}}}},"/v2/projects/{project_exid}/media-hub/{id}/thumbnail":{"get":{"tags":["Media"],"summary":"Get media's thumbnail","description":"Returns the jpeg thumbnail of the given media.\n\nIf the media has no stored thumbnail, a default placeholder jpeg is returned\nwith a 200 status (the response is always an image, never an error, when the\nmedia exists).\n\nThis is a public endpoint (no `ensure_requester`); it only requires a valid\nproject. Access to non-public media is still gated by `maybe_authz`\n(`project-media_hub_view`), so a 403 is returned for restricted media when\nthe requester is not the project owner, the media author, or lacks the\npermission.\n\n**Required permission:** `project-media_hub_view`\n","operationId":"getArchiveThumbnail","x-required-permission":"project-media_hub_view","security":[{},{"Bearer-Token":[]}],"parameters":[{"$ref":"#/paths/~1v2~1projects~1{project_exid}/parameters/0"},{"name":"id","in":"path","description":"Unique identifier (exid) for the media.","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"The media's jpeg thumbnail (or a default placeholder jpeg).","content":{"image/jpeg":{"schema":{"type":"string","format":"binary"}}}},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"Project does not exist or the media was not found.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}}}}},"/v2/cameras/{camera_exid}/users/resend-invite":{"post":{"operationId":"resendCameraInvite","tags":["Project Shares"],"summary":"Resend camera invite","description":"Resend an invite for a camera to a specific email address. Rate limited to one resend per day.\n\n**Required permissions:** `project-settings_invite_users` (project-level) AND `camera-share` (camera-level).\n\nAvailable to both project admins and members with Advanced access on this camera.\n","x-required-permission":"project-settings_invite_users, camera-share","parameters":[{"$ref":"#/paths/~1v2~1cameras~1{camera_exid}/parameters/0"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","description":"The email address to resend the invite to."}},"required":["email"]}}}},"responses":{"200":{"description":"Invite resent successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Invite resent successfully"}}}}}},"400":{"description":"Bad Request - can only resend pending invites, or the resend changeset failed validation.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"}}},"examples":{"invalid_status":{"value":{"error":"Can only resend pending invites"}},"validation_error":{"value":{"error":"Failed to resend invite: [details]"}}}}}},"403":{"description":"Forbidden - Insufficient permissions to resend invites."},"404":{"description":"Not Found - Camera or pending invite not found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"No pending invite found for email@example.com for this camera"}}}}}},"429":{"description":"Too Many Requests - Invite was already sent today.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Invite was already sent today. Please wait until tomorrow to resend."}}}}}}}}},"/v2/projects/{project_exid}/media-hub/compares":{"post":{"tags":["Compares"],"summary":"Create a compare","description":"Create new compare.\n\n**Required permission:** `project-media_hub_view`\n","operationId":"createCompare","x-required-permission":"project-media_hub_view","parameters":[{"$ref":"#/paths/~1v2~1projects~1{project_exid}/parameters/0"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"compare_exid":{"type":"string","description":"Compare id"},"name":{"type":"string","description":"Compare's name"},"before_date":{"type":"string","format":"date-time"},"after_date":{"type":"string","format":"date-time"},"camera_exid":{"type":"string","description":"Unique id of a camera"},"embed":{"type":"string","description":"Optional shareable embed code. Stored as an empty string when omitted or null."},"bim":{"type":"boolean","description":"BIM integration flag","example":false},"custom":{"type":"boolean","description":"Custom comparison flag","example":false},"options":{"type":"object","description":"Additional options for the comparison","properties":{"type":{"type":"string","description":"Type of comparison"},"before_snap":{"type":"string","format":"byte","description":"Base64 encoded image data (JPEG) for the before snapshot"},"after_snap":{"type":"string","format":"byte","description":"Base64 encoded image data (JPEG) for the after snapshot"}}},"create_animation":{"type":"boolean"},"evercam_watermark":{"type":"boolean"},"logo":{"type":"object","description":"Properties for the logo.","properties":{"id":{"type":"integer","description":"Unique identifier for the logo"},"x":{"type":"number","minimum":0,"maximum":1,"description":"Normalized x-coordinate for the logo position (0 = left, 1 = right)"},"y":{"type":"number","minimum":0,"maximum":1,"description":"Normalized y-coordinate for the logo position (0 = top, 1 = bottom)"},"width":{"type":"number","minimum":0.01,"maximum":1,"description":"Normalized width of the logo (relative to image width, up to full width)"},"height":{"type":"number","minimum":0.01,"maximum":1,"description":"Normalized height of the logo (relative to image height, up to full height)"}},"required":["id","x","y","width","height"]}},"required":["compare_exid","name","before_date","after_date"]}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"title":"Compare","type":"object","properties":{"id":{"type":"integer","description":"Unique identifier of compare"},"exid":{"type":"string","description":"Unique identifier of compare"},"camera_exid":{"type":"string","nullable":true,"description":"Camera unique identifier. Null when the compare is not tied to a camera.","example":"sadsa-sda45"},"title":{"type":"string","description":"Compare title.","example":"The great compare"},"from_date":{"type":"string","format":"date-time","example":"2019-02-18T09:00:00.000+00:00"},"to_date":{"type":"string","format":"date-time","example":"2019-02-18T09:00:00.000+00:00"},"created_at":{"type":"string","format":"date-time","example":"2019-02-18T09:00:00.000+00:00"},"status":{"type":"string","enum":["Failed","Processing","Completed"]},"requester_email":{"type":"string","description":"Compare requester email."},"requester_name":{"type":"string","description":"Compare requester full name."},"embed_code":{"type":"string","description":"Compare shareable embed code. Empty string when none was provided."},"public":{"type":"boolean","description":"Is publicly available."},"notes":{"type":"string","nullable":true,"description":"Free-text notes attached to the compare. Not present for BIM compare exports."},"category":{"type":"string","nullable":true,"description":"Category of the compare. Not present for BIM compare exports."},"is_urgent":{"type":"boolean","description":"Whether the compare was flagged as urgent. Not present for BIM compare exports."}},"description":""}}}},"400":{"description":"Validation failed. The body contains the field-level changeset errors keyed by field name.\n","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string"}},"description":"Map of field name to a list of error messages.","example":{"name":["can't be blank"]}}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"Project does not exist.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}},"422":{"description":"The referenced logo could not be found.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Logo not found"}}}}}},"500":{"description":"Compare creation failed unexpectedly.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Compare creation failed"}}}}}}}}},"/v2/projects/{project_exid}/media-hub/compares/{id}":{"parameters":[{"$ref":"#/paths/~1v2~1projects~1{project_exid}/parameters/0"},{"name":"id","in":"path","description":"The compare exid. For the GET endpoint an optional file extension may be appended\n(e.g. `my-compare.gif`, `my-compare.mp4`) to download the rendered media instead of the JSON metadata.\n","required":true,"schema":{"type":"string","example":"cmpr-abcde"}}],"get":{"tags":["Compares"],"summary":"Returns the single compare.","description":"Returns the compare metadata as JSON, or — when the `{id}` includes a file extension —\nthe rendered media file (gif/mp4) as a download.\n\nThis endpoint is publicly accessible for compares that are marked `public`; private compares\nrequire the `project-media_hub_view` permission (or being the requester / project owner).\n\n**Required permission:** `project-media_hub_view` (skipped for public compares)\n","operationId":"getCompare","x-required-permission":"project-media_hub_view","security":[{},{"Bearer-Token":[]}],"parameters":[{"name":"download","in":"query","description":"When `true` (and a file extension is present in `{id}`), serve the media as an attachment.","required":false,"explode":false,"schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"Compare metadata (JSON) or the rendered media file (binary) when an extension is present.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1projects~1{project_exid}~1media-hub~1compares/post/responses/201/content/application~1json/schema"}},"image/gif":{"schema":{"type":"string","format":"binary"}},"video/mp4":{"schema":{"type":"string","format":"binary"}}}},"301":{"description":"Redirect to the externally hosted media file."},"400":{"description":"Invalid file extension in the requested path.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"Project does not exist or the compare was not found.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}}}},"patch":{"tags":["Compares"],"summary":"Update a compare.","description":"Update a compare. Only the `name` is updatable.\n\n**Required permission:** `project-media_hub_manage` (skipped for the compare requester / project owner)\n","operationId":"updateCompare","x-required-permission":"project-media_hub_manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"New name for the compare."}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1projects~1{project_exid}~1media-hub~1compares/post/responses/201/content/application~1json/schema"}}}},"400":{"description":"Unable to update the compare.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"Project does not exist or the compare was not found.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}}}},"delete":{"tags":["Compares"],"summary":"Delete compare","description":"Delete a compare and all its associated files.\n\n**Required permission:** `project-media_hub_manage` (skipped for the compare requester / project owner)\n","operationId":"deleteCompare","x-required-permission":"project-media_hub_manage","responses":{"204":{"description":"Success, no body"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"Project does not exist or the compare was not found.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}}}}},"/v2/projects/{project_exid}/media-hub/compares/bim-compares":{"post":{"tags":["Compares"],"summary":"Create a bim compare","description":"Create new bim compare.\n\n**Required permission:** `One of: project-media_hub_view, project-bim_view_view, or project-bim_view_manage`\n","operationId":"createBimCompare","x-required-permission":"One of: project-media_hub_view, project-bim_view_view, or project-bim_view_manage","parameters":[{"$ref":"#/paths/~1v2~1projects~1{project_exid}/parameters/0"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"camera_exid":{"type":"string","description":"Unique id of a camera"},"exid":{"type":"string","description":"Compare id"},"name":{"type":"string","description":"Compare's name"},"snapshot_date":{"type":"string","format":"date-time"},"bim_date":{"type":"string","format":"date-time"},"create_animation":{"type":"boolean"},"layer_id":{"type":"integer"},"bim_transparency":{"type":"integer","minimum":0,"maximum":100},"mask_id":{"type":"integer"},"model":{"type":"string"},"embed":{"type":"string","description":"Optional shareable embed code. Stored as an empty string when omitted or null."},"evercam_watermark":{"type":"boolean"},"logo":{"type":"object","description":"Properties for the logo.","properties":{"id":{"type":"integer","description":"Unique identifier for the logo"},"x":{"type":"number","minimum":0,"maximum":1,"description":"Normalized x-coordinate for the logo position (0 = left, 1 = right)"},"y":{"type":"number","minimum":0,"maximum":1,"description":"Normalized y-coordinate for the logo position (0 = top, 1 = bottom)"},"width":{"type":"number","minimum":0.01,"maximum":1,"description":"Normalized width of the logo (relative to image width, up to full width)"},"height":{"type":"number","minimum":0.01,"maximum":1,"description":"Normalized height of the logo (relative to image height, up to full height)"}},"required":["id","x","y","width","height"]}},"required":["camera_exid","exid","name","snapshot_date","bim_date","layer_id","mask_id","model","bim_transparency"]}}}},"responses":{"201":{"description":"BIM compare created (`show.json`).","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1projects~1{project_exid}~1media-hub~1compares/post/responses/201/content/application~1json/schema"}}}},"400":{"description":"Invalid request. Either an invalid layer/mask (`{\"error\": {\"code\": \"BAD_ARGUMENT\", \"message\": \"Invalid layer.\"}}`) or changeset validation errors (`{\"errors\": {...}}`).\n","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","description":"Present when the supplied layer or mask is invalid.","properties":{"code":{"type":"string","example":"BAD_ARGUMENT"},"message":{"type":"string","example":"Invalid layer."}}},"errors":{"type":"object","description":"Field-keyed changeset validation errors.","additionalProperties":true,"example":{"camera_exid":["can't be blank"]}}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"Project does not exist.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}},"422":{"description":"The supplied logo id does not exist.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Logo not found"}}}}}},"500":{"description":"BIM compare creation failed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"BIM compare creation failed"}}}}}}}}},"/v2/cameras/{camera_exid}/bim":{"parameters":[{"$ref":"#/paths/~1v2~1cameras~1{camera_exid}/parameters/0"}],"get":{"tags":["BIM"],"summary":"Get BIM info","description":"Return the BIM (Building Information Model) overlay info for a camera. If no\n`model` is supplied (or the supplied model does not exist for the camera),\nthe first available model is used. The response is the model's decoded shape\ndefinition enriched with the list of available models, the selected model\nname, the layer id, its dates, and — when no `dates` are present — a signed\n`image_url` for the rendered final view.\n\n**Required permission:** `project-bim_view_view`\n","operationId":"getCameraBim","x-required-permission":"project-bim_view_view","parameters":[{"name":"model","in":"query","description":"Name of the BIM model to return. Falls back to the first available model if omitted or unknown.","required":false,"schema":{"type":"string","example":"navisworks-model-1"}},{"name":"timestamp","in":"query","description":"Optional layer timestamp used to select a specific BIM layer version.","required":false,"schema":{"type":"string","example":"1704067200"}}],"responses":{"200":{"description":"BIM info for the selected model.","content":{"application/json":{"schema":{"type":"object","description":"Decoded BIM layer shape definition merged with model metadata. Shape keys vary by model, so additional properties are permitted.","additionalProperties":true,"properties":{"id":{"type":"integer","description":"Layer id of the selected BIM model.","example":1234},"model":{"type":"string","description":"Display name (or key) of the selected model.","example":"navisworks-model-1"},"models":{"type":"array","description":"All BIM model names available for the camera.","items":{"type":"string"},"example":["navisworks-model-1","synchro-model-2"]},"dates":{"type":"array","nullable":true,"description":"Available BIM dates for the model, when present.","items":{"type":"string"}},"image_url":{"type":"string","format":"uri","description":"Signed URL of the rendered final view. Present only when the model has no `dates`."}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"No BIM model, layer or file found for the camera.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}}}},"post":{"tags":["BIM"],"summary":"Create a BIM integration","description":"Queue a background job that processes and uploads BIM images to storage for\nthe camera. Returns immediately with a plain-text acknowledgement.\n\n**Required permission:** `project-bim_view_manage`\n","operationId":"createBim","x-required-permission":"project-bim_view_manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"file_url":{"type":"string","description":"URL of the BIM source file to process.","example":"https://example.com/models/model.nwd"},"title":{"type":"string","description":"Title of the BIM integration.","example":"Ground floor model"},"model":{"type":"string","description":"Model name/key.","example":"navisworks-model-1"},"requestor":{"type":"string","description":"Identifier of the user/system requesting the integration."},"software":{"type":"string","description":"Source authoring software.","enum":["navisworks","synchro"],"example":"navisworks"},"final_view":{"type":"boolean","description":"Whether to generate a final view. Defaults to `false`.","default":false},"enable_distortion":{"type":"boolean","description":"Whether to apply lens distortion. Defaults to `true`.","default":true},"start_at":{"type":"string","format":"date-time","description":"Start timestamp for the BIM layer."},"display_name":{"type":"string","description":"Human-friendly display name for the model (trimmed)."}},"required":["file_url","title"]}}}},"responses":{"200":{"description":"The BIM integration job was queued.","content":{"text/plain":{"schema":{"type":"string","example":"Creating BIM integration"}}}},"400":{"$ref":"#/paths/~1v2~1widgets/get/responses/400"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"}}}},"/v2/cameras/{camera_exid}/bim/pending":{"parameters":[{"$ref":"#/paths/~1v2~1cameras~1{camera_exid}/parameters/0"}],"get":{"tags":["BIM"],"summary":"List pending BIM images for a camera model","description":"Return the pending (not-yet-dated) BIM images for the requested camera and\nmodel, each with a presigned download URL.\n\n**Required permission:** `project-bim_view_view`\n","operationId":"getBimPendingImages","x-required-permission":"project-bim_view_view","parameters":[{"name":"model","in":"query","description":"The BIM model name.","required":true,"schema":{"type":"string","example":"navisworks-model"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"Presigned download URL for the pending image."},"key":{"type":"string","description":"The pending image file name.","example":"000123.png"}}}}}}},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"BIM layer not found for the camera and model.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}}}},"post":{"tags":["BIM"],"summary":"Process pending BIM images","description":"Assign the supplied dates to the pending BIM images of the requested camera\nand model and kick off asynchronous processing. Returns immediately once\nprocessing has started.\n\n**Required permission:** `project-bim_view_manage`\n","operationId":"processBimPendingImages","x-required-permission":"project-bim_view_manage","parameters":[{"name":"model","in":"query","description":"The BIM model name.","required":true,"schema":{"type":"string","example":"navisworks-model"}},{"name":"names","in":"query","description":"New BIM dates for the associated pending images.","required":true,"explode":false,"schema":{"type":"array","items":{"type":"string"}}},{"name":"enable_distortion","in":"query","description":"Whether to apply lens distortion when processing (defaults to true).","required":false,"schema":{"type":"boolean","default":true}}],"responses":{"200":{"description":"Processing of the pending images has started.","content":{"text/plain":{"schema":{"type":"string","example":"Processing pending images"}}}},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"BIM layer not found, or no pending images exist for the camera.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}}}}},"/v2/cameras/{camera_exid}/bim/{timestamp}":{"get":{"tags":["BIM"],"summary":"Get the BIM overlay image at a timestamp","description":"Return a presigned URL for the BIM overlay image of the requested camera\nand model at the given `timestamp`.\n\n**Required permission:** `project-bim_view_view`\n","operationId":"getBimSnapshot","x-required-permission":"project-bim_view_view","parameters":[{"$ref":"#/paths/~1v2~1cameras~1{camera_exid}/parameters/0"},{"name":"timestamp","in":"path","description":"The snapshot timestamp used to locate the overlay image.","required":true,"style":"simple","explode":false,"schema":{"type":"string","format":"date-time"}},{"name":"model","in":"query","description":"The BIM model name.","required":true,"schema":{"type":"string","example":"navisworks-model"}},{"name":"layer_timestamp","in":"query","description":"The timestamp identifying the BIM layer version to read from.","required":true,"schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"image_url":{"type":"string","format":"uri"}}}}}},"400":{"$ref":"#/paths/~1v2~1widgets/get/responses/400"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"BIM layer not found, or a presigned URL could not be generated.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}}}}},"/v2/cameras/{camera_exid}/bim/camera-parameters":{"parameters":[{"$ref":"#/paths/~1v2~1cameras~1{camera_exid}/parameters/0"}],"get":{"tags":["BIM"],"summary":"Get camera calibration parameters","description":"Return the stored camera calibration parameters (distortion / FOV / focal\nlength / principal point) used for the BIM model overlay. The response is\nthe opaque `info.json` object previously saved for the camera.\n\n**Required permission:** `project-bim_view_view`\n","operationId":"getCameraParameters","x-required-permission":"project-bim_view_view","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"distortion_coeffs":{"type":"array","items":{"type":"array","items":{"type":"number"}}},"horizontal_FOV":{"type":"number"},"vertical_FOV":{"type":"number"},"focal_length1":{"type":"number"},"focal_length2":{"type":"number"},"centerX":{"type":"number"},"centerY":{"type":"number"}}}}}},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"Camera calibration info not found, or the camera could not be resolved.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}}}},"post":{"tags":["BIM"],"summary":"Set camera calibration parameters","description":"Store the camera calibration parameters (distortion / FOV / focal length /\nprincipal point) used for the BIM model overlay. The saved object is\nreturned in the response.\n\n**Required permission:** `project-bim_view_manage`\n","operationId":"setCameraParameters","x-required-permission":"project-bim_view_manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"distortion_coeffs":{"type":"array","items":{"type":"array","items":{"type":"number"}}},"horizontal_fov":{"type":"number","description":"Horizontal field of view (stored as `horizontal_FOV`)."},"vertical_fov":{"type":"number","description":"Vertical field of view (stored as `vertical_FOV`)."},"focal_length1":{"type":"number"},"focal_length2":{"type":"number"},"center_x":{"type":"number","description":"Principal point X (stored as `centerX`)."},"center_y":{"type":"number","description":"Principal point Y (stored as `centerY`)."}}}}}},"responses":{"200":{"description":"Success. Returns the stored calibration parameters.","content":{"application/json":{"schema":{"type":"object","properties":{"distortion_coeffs":{"type":"array","items":{"type":"array","items":{"type":"number"}}},"horizontal_FOV":{"type":"number"},"vertical_FOV":{"type":"number"},"focal_length1":{"type":"number"},"focal_length2":{"type":"number"},"centerX":{"type":"number"},"centerY":{"type":"number"}}}}}},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"The camera could not be resolved.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}}}}},"/v2/cameras/{camera_exid}/ptz/status":{"get":{"tags":["ONVIF"],"summary":"Returns ptz status of the given camera.","description":"**Required permission:** `camera-ptz_manage`","operationId":"getCameraPTZStatus","x-required-permission":"camera-ptz_manage","parameters":[{"$ref":"#/paths/~1v2~1cameras~1{camera_exid}/parameters/0"}],"responses":{"200":{"description":"Success"},"401":{"description":"Invalid API keys"}}}},"/v2/cameras/{camera_exid}/ptz/nodes":{"get":{"tags":["ONVIF"],"summary":"Returns ptz nodes of the given camera.","description":"**Required permission:** `camera-ptz_manage`","operationId":"getCameraPTZNodes","x-required-permission":"camera-ptz_manage","parameters":[{"$ref":"#/paths/~1v2~1cameras~1{camera_exid}/parameters/0"}],"responses":{"200":{"description":"Success"},"401":{"description":"Invalid API keys"}}}},"/v2/cameras/{camera_exid}/ptz/configurations":{"get":{"tags":["ONVIF"],"summary":"Returns ptz configurations of the given camera.","description":"**Required permission:** `camera-ptz_manage`","operationId":"getCameraPTZConfigurations","x-required-permission":"camera-ptz_manage","parameters":[{"$ref":"#/paths/~1v2~1cameras~1{camera_exid}/parameters/0"}],"responses":{"200":{"description":"Success"},"401":{"description":"Invalid API keys"}}}},"/v2/cameras/{camera_exid}/ptz/presets":{"get":{"tags":["ONVIF"],"summary":"Returns all ptz presets of the given camera.","description":"**Required permission:** `camera-ptz_manage`","operationId":"getCameraPTZPresets","x-required-permission":"camera-ptz_manage","parameters":[{"$ref":"#/paths/~1v2~1cameras~1{camera_exid}/parameters/0"}],"responses":{"200":{"description":"Success"},"401":{"description":"Invalid API keys"}}}},"/v2/cameras/{camera_exid}/ptz/continuous/stop":{"post":{"tags":["ONVIF"],"summary":"Stop the ptz of the given camera.","description":"**Required permission:** `camera-ptz_manage`","operationId":"stopCameraPTZ","x-required-permission":"camera-ptz_manage","parameters":[{"$ref":"#/paths/~1v2~1cameras~1{camera_exid}/parameters/0"}],"responses":{"201":{"description":"Success"},"401":{"description":"Invalid API keys"}}}},"/v2/cameras/{camera_exid}/ptz/home":{"post":{"tags":["ONVIF"],"summary":"Move the given camera to its PTZ home position.","description":"**Required permission:** `camera-ptz_manage`","operationId":"gotoCameraPTZHome","x-required-permission":"camera-ptz_manage","parameters":[{"$ref":"#/paths/~1v2~1cameras~1{camera_exid}/parameters/0"}],"responses":{"201":{"description":"Camera moved to its home position."},"401":{"description":"Invalid API keys"}}}},"/v2/cameras/{camera_exid}/ptz/home/set":{"post":{"tags":["ONVIF"],"summary":"Set ptz home of the given camera.","description":"**Required permission:** `camera-ptz_manage`","operationId":"setCameraPTZHome","x-required-permission":"camera-ptz_manage","parameters":[{"$ref":"#/paths/~1v2~1cameras~1{camera_exid}/parameters/0"}],"responses":{"201":{"description":"Success"},"401":{"description":"Invalid API keys"}}}},"/v2/cameras/{camera_exid}/ptz/presets/create":{"post":{"tags":["ONVIF"],"summary":"Create new ptz preset of given camera.","description":"**Required permission:** `camera-ptz_manage`","operationId":"createCameraPTZpreset","x-required-permission":"camera-ptz_manage","parameters":[{"$ref":"#/paths/~1v2~1cameras~1{camera_exid}/parameters/0"},{"name":"preset_name","in":"query","required":true,"description":"Name of the PTZ preset to create.","style":"form","explode":true,"schema":{"type":"string","example":"Entrance"}}],"responses":{"201":{"description":"Preset created successfully."},"401":{"description":"Invalid API keys"}}}},"/v2/cameras/{camera_exid}/ptz/presets/{preset_token}/set":{"post":{"tags":["ONVIF"],"summary":"Save the camera's current view as the preset at the given token.","description":"Stores the camera's current PTZ position as a preset at the given token, using the supplied preset name.\n\n**Required permission:** `camera-ptz_manage`","operationId":"setCameraPTZPreset","x-required-permission":"camera-ptz_manage","parameters":[{"$ref":"#/paths/~1v2~1cameras~1{camera_exid}/parameters/0"},{"name":"preset_token","in":"path","description":"Unique token number of the preset.","required":true,"style":"simple","explode":false,"schema":{"type":"integer"}},{"name":"preset_name","in":"query","description":"Name to assign to the preset stored at the given token.","required":true,"style":"form","explode":true,"schema":{"type":"string"},"example":"Front Gate"}],"responses":{"201":{"description":"Success"},"401":{"description":"Invalid API keys"}}}},"/v2/cameras/{camera_exid}/ptz/presets/go/{preset_token}":{"post":{"tags":["ONVIF"],"summary":"Go to specific preset of given camera.","description":"**Required permission:** `camera-ptz_manage`","operationId":"goToCameraPreset","x-required-permission":"camera-ptz_manage","parameters":[{"$ref":"#/paths/~1v2~1cameras~1{camera_exid}/parameters/0"},{"name":"preset_token","in":"path","description":"Unique token number of the preset.","required":true,"style":"simple","explode":false,"schema":{"type":"integer"}}],"responses":{"201":{"description":"Success"},"401":{"description":"Invalid API keys"}}}},"/v2/cameras/{camera_exid}/ptz/continuous/start/{direction}":{"post":{"tags":["ONVIF"],"summary":"Move the camera to given direction.","description":"**Required permission:** `camera-ptz_manage`","operationId":"moveToDirectionContinuously","x-required-permission":"camera-ptz_manage","parameters":[{"$ref":"#/paths/~1v2~1cameras~1{camera_exid}/parameters/0"},{"name":"direction","in":"path","required":true,"style":"simple","explode":false,"schema":{"type":"string","enum":["left","right","up","down"]}}],"responses":{"201":{"description":"Success"},"401":{"description":"Invalid API keys"}}}},"/v2/cameras/{camera_exid}/ptz/continuous/zoom/{mode}":{"post":{"tags":["ONVIF"],"summary":"Zoom in/out of the camera.","description":"**Required permission:** `camera-ptz_manage`","operationId":"zoomCameraContinuously","x-required-permission":"camera-ptz_manage","parameters":[{"$ref":"#/paths/~1v2~1cameras~1{camera_exid}/parameters/0"},{"name":"mode","in":"path","required":true,"style":"simple","explode":false,"schema":{"type":"string","enum":["in","out"]}}],"responses":{"201":{"description":"Success"},"401":{"description":"Invalid API keys"}}}},"/v2/cameras/{camera_exid}/ptz/relative":{"post":{"tags":["ONVIF"],"summary":"Relative move of the camera.","description":"**Required permission:** `camera-ptz_manage`","operationId":"moveCameraRelatively","x-required-permission":"camera-ptz_manage","parameters":[{"$ref":"#/paths/~1v2~1cameras~1{camera_exid}/parameters/0"},{"name":"left","in":"query","description":"Left move, for example 4","required":false,"style":"form","explode":true,"schema":{"type":"integer"}},{"name":"right","in":"query","description":"Right move, for example 4","required":false,"style":"form","explode":true,"schema":{"type":"integer"}},{"name":"up","in":"query","description":"Up move, for example 4","required":false,"style":"form","explode":true,"schema":{"type":"integer"}},{"name":"down","in":"query","description":"Down move, for example 4","required":false,"style":"form","explode":true,"schema":{"type":"integer"}},{"name":"zoom","in":"query","description":"Zoom, for example 1","required":false,"style":"form","explode":true,"schema":{"type":"integer"}}],"responses":{"201":{"description":"Success"},"401":{"description":"Invalid API keys"}}}},"/v2/cameras/{camera_exid}/ptz/presets/{preset_token}/remove":{"delete":{"summary":"Remove PTZ preset","description":"Removes a saved PTZ preset position from a camera via ONVIF.\n\n**Required permission:** `camera-ptz_manage`\n","operationId":"removePtzPreset","x-required-permission":"camera-ptz_manage","tags":["Cameras"],"parameters":[{"name":"camera_exid","in":"path","required":true,"schema":{"type":"string"}},{"name":"preset_token","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"201":{"description":"Preset removed"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"$ref":"#/paths/~1v2~1api-keys~1{id}/patch/responses/404"}}}},"/v2/onvif/v20/{service}/{operation}":{"get":{"tags":["ONVIF"],"summary":"Execute an ONVIF ver20 operation on a camera.","description":"Generic ONVIF passthrough. Builds a SOAP request for `{service}` /\n`{operation}` (adding the resolved `ProfileToken`) and forwards any extra\nquery parameters as SOAP body elements to the target camera. Reserved\nquery keys are stripped and never forwarded: `id`, `url`, `recording_url`,\n`auth`, `channel`, `api_id`, `api_key`.\n\nThe response body is the raw decoded ONVIF result and is therefore\nschemaless (shape depends on the requested operation). On an ONVIF error\nthe upstream status code is mirrored back to the caller.\n\n**Required permission:** `camera-ptz_manage` on the target camera.\n","operationId":"invokeOnvifOperation","x-required-permission":"camera-ptz_manage","parameters":[{"name":"service","in":"path","required":true,"description":"ONVIF service name (e.g. `ptz_service`, `services`).","schema":{"type":"string"},"example":"ptz_service"},{"name":"operation","in":"path","required":true,"description":"ONVIF operation to execute (e.g. `GetPresets`, `GetStatus`).","schema":{"type":"string"},"example":"GetPresets"},{"name":"id","in":"query","required":true,"description":"Unique exid of the target camera. Resolved by the `EnsureCamera` plug (`param_name: \"id\"`); the request is rejected with 404 if no matching camera exists.","schema":{"type":"string"},"example":"aoizr-dsze"}],"responses":{"200":{"description":"Success. The body is the raw decoded ONVIF response for the requested operation (schemaless)."},"401":{"description":"Invalid API id / key or JWT token"},"404":{"description":"The camera `id` does not exist, or the requester lacks the `camera-ptz_manage` permission on it. Body `{ \"message\": \"Not found.\" }`.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}},"default":{"description":"On an ONVIF/transport error the upstream status code is mirrored back with the raw ONVIF error body."}}}},"/v2/projects":{"get":{"tags":["Projects"],"summary":"Get all projects","description":"Returns all projects of the connected user.\nThese projects are obtained based on the cameras owned by the user and those shared with him.\n","operationId":"getAllProjects","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"Project's id.","example":3565},"exid":{"type":"string","description":"Project's exid.","example":"dfdf-ersdf"},"name":{"type":"string","description":"Project's name.","example":"The Great Project"},"owner":{"type":"object","description":"Project owner information","properties":{"id":{"type":"integer","description":"Owner's user id","example":4848},"name":{"type":"string","description":"Owner's name","example":"user name"},"email":{"type":"string","format":"email","description":"Owner's email","example":"john@evercam.io"}}},"status":{"type":"string","description":"Project's status.","example":"In Progress"},"started_at":{"type":"string","format":"date-time","description":"Project start date in ISO8601 format.","example":"2021-09-23T00:00:00.000000"},"inserted_at":{"type":"string","format":"date-time","description":"Creation date of project in ISO8601 format.","example":"2021-09-02T21:24:04.000000Z"},"end_date":{"type":"string","format":"date","nullable":true,"description":"Project end date","example":"2024-02-22"},"timezone":{"type":"string","nullable":true,"description":"Project's timezone","example":"America/New_York"},"geographic_bounds":{"allOf":[{"$ref":"#/paths/~1v2~1projects/post/requestBody/content/application~1json/schema/properties/geographic_bounds"}],"description":"Geographic bounding box defining the project area (may be null)."},"feature_flags":{"description":"Project's feature flags","type":"array","items":{"type":"string"},"example":["gate_report","drone_view","360_view"]},"archive_tier":{"type":"string","nullable":true,"description":"Project's archive tier","example":"Scheduled for Deletion"},"company_id":{"type":"integer","nullable":true,"description":"Associated company id","example":4437},"cameras_count":{"type":"integer","description":"The number of cameras owned or shared with the user within the project.","example":2},"cameras_restriction_type":{"type":"string","nullable":true,"enum":["full","partial"],"description":"The restriction type for cameras in the project: `full` when every camera is access-restricted, `partial` when only some are, and `null` when none are (or the project has no cameras).","example":"full"}}}}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"}}},"post":{"summary":"Create a project","description":"Creates a project owned by the connected user. If `owner_email` is supplied and matches an existing account, that user becomes the owner; otherwise the requester owns the project. The `status` and `archive_tier` fields are ignored on creation (dropped by the controller).\n","operationId":"createProject","tags":["Projects"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","example":"project name"},"owner_email":{"type":"string","format":"email","description":"Email of the account to own the project. Falls back to the requester when omitted or when no matching account is found.\n","example":"john@evercam.io"},"timezone":{"type":"string","nullable":true,"example":"America/New_York"},"feature_flags":{"type":"array","items":{"type":"string"},"example":["gate_report","drone_view"]},"company_id":{"type":"integer","nullable":true,"example":4437},"start_date":{"type":"string","format":"date","description":"Project start date.","example":"2023-09-01"},"end_date":{"type":"string","format":"date","description":"Project end date.","example":"2023-10-01"},"geographic_bounds":{"oneOf":[{"type":"object","description":"GeoJSON Polygon object","properties":{"type":{"type":"string","enum":["Polygon"],"description":"GeoJSON geometry type","example":"Polygon"},"coordinates":{"type":"array","description":"Array of linear ring coordinate arrays. First ring is exterior boundary.","items":{"type":"array","description":"Linear ring of coordinates (first and last point must be identical to close the polygon)","items":{"type":"array","description":"Coordinate pair in [longitude, latitude] format","minItems":2,"maxItems":2,"items":{"type":"number","format":"float"}},"minItems":4}}},"required":["type","coordinates"],"example":{"type":"Polygon","coordinates":[[[-122.4194,37.7849],[-122.4194,37.7749],[-122.4094,37.7749],[-122.4094,37.7849],[-122.4194,37.7849]]]}},{"type":"string","description":"GeoJSON Polygon as JSON string","format":"json","example":"{\"type\":\"Polygon\",\"coordinates\":[[[-122.4194,37.7849],[-122.4194,37.7749],[-122.4094,37.7749],[-122.4094,37.7849],[-122.4194,37.7849]]]}"}]}},"required":["name"]}}}},"responses":{"200":{"description":"The project was created. Returns the created project.","content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"object","description":"Project response object","properties":{"id":{"type":"integer","description":"Project ID","example":123},"exid":{"type":"string","description":"Project external ID","example":"downt-poxgr"},"name":{"type":"string","description":"Project name","example":"Downtown Construction Project"},"user_id":{"type":"integer","description":"Owner user ID","example":456},"zoho_id":{"type":"string","nullable":true,"description":"Zoho CRM ID","example":4587787787989892},"geographic_bounds":{"allOf":[{"$ref":"#/paths/~1v2~1projects/post/requestBody/content/application~1json/schema/properties/geographic_bounds"}],"description":"Geographic bounding box for the project area (may be null)."}}}}}}}},"400":{"$ref":"#/paths/~1v2~1logs/post/responses/400"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"}}}},"/v2/projects/{project_exid}":{"parameters":[{"name":"project_exid","description":"Unique id of a project","in":"path","required":true,"schema":{"type":"string"},"example":"aoizr-dsze"}],"get":{"summary":"Get a project","description":"Returns a single project by its exid.\n\n**Required permission:** `Any role on the project`\n","operationId":"getProject","x-required-permission":"Any role on the project","tags":["Projects"],"responses":{"200":{"description":"Project found.","content":{"application/json":{"schema":{"type":"object","properties":{"project":{"type":"object","properties":{"id":{"type":"integer","example":3565},"exid":{"type":"string","example":"dfdf-ersdf"},"name":{"type":"string","example":"The Great Project"},"status":{"type":"string","nullable":true,"example":"In Progress"},"timezone":{"type":"string","nullable":true,"example":"America/New_York"},"feature_flags":{"type":"array","items":{"type":"string"},"example":["gate_report","drone_view"]},"archive_tier":{"type":"string","nullable":true,"example":"Scheduled for Deletion"},"inserted_at":{"type":"string","format":"date-time","example":"2021-09-02T21:24:04.000000Z"},"end_date":{"type":"string","format":"date","nullable":true,"example":"2024-02-22"},"company_id":{"type":"integer","nullable":true,"example":4437},"geographic_bounds":{"allOf":[{"$ref":"#/paths/~1v2~1projects/post/requestBody/content/application~1json/schema/properties/geographic_bounds"}],"description":"Geographic bounding box for the project area (may be null)."},"started_at":{"type":"string","format":"date","nullable":true,"description":"Project start date, falls back to inserted_at if not set.","example":"2021-09-23"},"cameras_count":{"type":"integer","example":4},"owner":{"type":"object","properties":{"id":{"type":"integer","example":4848},"name":{"type":"string","example":"John Doe"},"email":{"type":"string","format":"email","example":"john@evercam.io"}}},"cameras_restriction_type":{"type":"string","nullable":true,"description":"'full', 'partial', or null","example":"full"}}}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"Project not found.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"},"example":{"message":"Not found."}}}}}}},"/v2/projects/{project_exid}/battery-readings":{"get":{"tags":["Projects"],"summary":"Get battery readings.","description":"Returns the latest battery/solar voltage reading for every battery-, solar-\nor generator-powered camera in the project. Cameras whose latest voltage is\nunknown are omitted from the result.\n\n**Required permission:** `Any role on the project`\n","operationId":"getProjectBatteryReadings","x-required-permission":"Any role on the project","parameters":[{"$ref":"#/paths/~1v2~1projects~1{project_exid}/parameters/0"},{"name":"camera_exid","description":"Return only the reading for the camera with this exact exid.","in":"query","required":false,"schema":{"type":"string","example":"anoum-ilayd"}}],"responses":{"200":{"description":"Project cameras battery readings","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"exid":{"type":"string","description":"Camera unique exid.","example":"anoum-ilayd"},"voltage":{"type":"number","description":"Latest battery/solar voltage reading.","example":12.8},"last_seen":{"type":"string","format":"date-time","description":"Timestamp of the latest voltage reading.","example":"2019-02-18T09:00:00.000+00:00"}}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"}}}},"/v2/projects/{project_exid}/camera_refs":{"get":{"summary":"List all project camera refs","description":"Retrieve names and Ids of all cameras associated with a specific project\n\n**Required permission:** `Any role on the project`\n","tags":["Projects"],"operationId":"listProjectCameraRefs","x-required-permission":"Any role on the project","parameters":[{"$ref":"#/paths/~1v2~1projects~1{project_exid}/parameters/0"}],"responses":{"200":{"description":"The cameras associated with the specified project.","content":{"application/json":{"schema":{"type":"object","properties":{"cameras":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","example":1234},"exid":{"type":"string","example":"abcd-efgh-ijkl"},"name":{"type":"string","example":"Camera 1"}}}}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"Project not found.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}}}}},"/v2/projects/{project_exid}/thumbnail":{"get":{"tags":["Projects"],"summary":"Get thumbnail.","description":"It returns the thumbnail of the camera within the project that is owned by or shared with the current user. The thumbnail is from the most recently online camera, previously selected, or the custom thumbnail if one has been uploaded. The response can either be a raw image or JSON data with additional thumbnail information.\n**Required permission:** `Any role on the project`\n","operationId":"getProjectThumbnail","x-required-permission":"Any role on the project","parameters":[{"$ref":"#/paths/~1v2~1projects~1{project_exid}/parameters/0"},{"name":"include_data","in":"query","schema":{"type":"boolean"},"description":"When `true`, the response is a JSON object with thumbnail metadata (`camera_exid`, `custom`, `image`). When omitted or `false`, the raw JPEG image is returned as `image/jpeg`.\n"}],"responses":{"200":{"description":"Project thumbnail. Returned as a raw JPEG image by default, or as a JSON object when `include_data=true`.\n","content":{"image/jpeg":{"schema":{"type":"string","format":"binary"}},"application/json":{"schema":{"type":"object","properties":{"camera_exid":{"type":"string","nullable":true,"description":"Exid of the camera the thumbnail belongs to; null for a custom (uploaded) thumbnail."},"custom":{"type":"boolean","description":"Whether the thumbnail is a custom uploaded image."},"image":{"type":"string","description":"The thumbnail image as a `data:image/jpeg;base64,` data URI.","example":"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ..."}}}}}},"400":{"description":"Invalid parameters, or an invalid combination of camera and custom thumbnail values.\n","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Invalid parameters."}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"No thumbnail exists for the project, or no usable thumbnail could be resolved for the current user.\n","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"No thumbnail found."}}}}}}}},"put":{"tags":["Projects"],"summary":"Update thumbnail.","description":"It updates the thumbnail of the project  by seleting a camera within the project that is owned by or shared with the current user.\n**Required permission:** `project-settings_manage_project`\n","operationId":"updateProjectThumbnail","x-required-permission":"project-settings_manage_project","parameters":[{"$ref":"#/paths/~1v2~1projects~1{project_exid}/parameters/0"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"camera_exid":{"type":"string","description":"Exid of the camera within the project to use as the thumbnail source.","example":"evercam-remembrance-camera"}},"required":["camera_exid"]}}}},"responses":{"201":{"description":"Thumbnail updated successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Thumbnail updated successfully"}}}}}},"400":{"description":"Unable to update the thumbnail, or invalid/missing parameters.\n","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Bad Request: Unable to update the thumbnail"}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"The referenced camera was not found, or no thumbnail exists for the project.\n","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Camera not found"}}}}}}}},"post":{"tags":["Projects"],"summary":"Create Custom thumbnail.","description":"It creates a thumbnail of a project by uploading it to S3.\n**Required permission:** `project-settings_manage_project`\n","operationId":"createProjectThumbnail","x-required-permission":"project-settings_manage_project","parameters":[{"$ref":"#/paths/~1v2~1projects~1{project_exid}/parameters/0"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"thumbnail":{"type":"string","description":"Base64-encoded JPEG image to store as the project's custom thumbnail."}},"required":["thumbnail"]}}}},"responses":{"201":{"description":"Thumbnail saved successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Thumbnail saved successfully"}}}}}},"400":{"description":"Failed to save the thumbnail, or invalid/missing parameters.\n","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Failed to save the thumbnail"},"reason":{"description":"Details about the failure. Present only for storage failures."}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"}}}},"/v2/projects/{project_exid}/thumbnail/reset":{"put":{"tags":["Projects"],"summary":"Reset thumbnail.","description":"Rolls back the project thumbnail to its default settings (sets `custom` to `false` and clears the associated `camera_id`).\n**Required permission:** `project-settings_manage_project`\n","operationId":"resetProjectThumbnail","x-required-permission":"project-settings_manage_project","parameters":[{"$ref":"#/paths/~1v2~1projects~1{project_exid}/parameters/0"}],"responses":{"201":{"description":"Thumbnail reset successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Thumbnail reset successfully"}}}}}},"400":{"description":"Bad Request: Unable to reset the thumbnail.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Bad Request: Unable to reset the thumbnail"}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"No thumbnail exists for the project.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Thumbnail does not exists for the project 123"}}}}}}}}},"/v2/projects/{project_exid}/logos":{"parameters":[{"$ref":"#/paths/~1v2~1projects~1{project_exid}/parameters/0"}],"get":{"summary":"Get logos","description":"Get project logos\n\n**Required permission:** `Any role on the project`\n","operationId":"getProjectLogos","x-required-permission":"Any role on the project","tags":["Projects"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/paths/~1v2~1projects~1{project_exid}~1logos/post/responses/201/content/application~1json/schema"}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"Project not found","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}}}},"post":{"summary":"Add logo","description":"Add a new project logo.\n\nThe project logo must be uploaded as multipart/form-data. Duplication is not checked: if a logo with the same name already exists it will be overwritten by the newly uploaded logo.\n**Required permission:** `project-settings_manage_project`\n","operationId":"createProjectLogo","x-required-permission":"project-settings_manage_project","tags":["Projects"],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Logo name.","example":"Acme Corp"},"logo":{"type":"string","format":"binary","description":"The logo image file (jpeg or png)."}},"required":["name","logo"]}}}},"responses":{"201":{"description":"Logo created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","description":"Logo id","example":42},"project_id":{"type":"integer","nullable":true,"description":"Id of the project the logo belongs to. `null` for shared logos that are not scoped to a single project.\n","example":17},"name":{"type":"string","description":"Logo name","example":"Acme Corp"},"url":{"type":"string","format":"uri","description":"Logo presigned AWS url"}}}}}},"400":{"$ref":"#/paths/~1v2~1widgets/get/responses/400"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"Project not found","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}}}}},"/v2/projects/{project_exid}/logos/{id}":{"parameters":[{"$ref":"#/paths/~1v2~1projects~1{project_exid}/parameters/0"},{"name":"id","in":"path","required":true,"description":"Numeric primary key of the logo.","schema":{"type":"integer","example":42}}],"patch":{"summary":"Update logo","description":"Update logo name.\n\nNote that we don't check if the new name is already taken, if it is the case, then the old logo\nwill be replaced.\n**Required permission:** `project-settings_manage_project`\n","operationId":"updateProjectLogoName","x-required-permission":"project-settings_manage_project","tags":["Projects"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1projects~1{project_exid}~1logos/post/responses/201/content/application~1json/schema"}}}},"400":{"$ref":"#/paths/~1v2~1widgets/get/responses/400"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"Project or logo not found","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}}}},"delete":{"summary":"Delete logo","description":"Delete logo\n\n**Required permission:** `project-settings_manage_project`\n","operationId":"deleteProjectLogo","x-required-permission":"project-settings_manage_project","tags":["Projects"],"responses":{"204":{"description":"No content"},"400":{"$ref":"#/paths/~1v2~1widgets/get/responses/400"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"Project or logo not found","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}}}}},"/v2/projects/{project_exid}/weather/current":{"get":{"tags":["Weather"],"summary":"Current & forecast weather","description":"Current weather for the project, optionally including forecast data.\n\nThe returned result is a list of weather data with a 1-hour step.\n\n**Required permission:** `project-weather_view`\n","operationId":"forecastWeather","x-required-permission":"project-weather_view","parameters":[{"$ref":"#/paths/~1v2~1projects~1{project_exid}/parameters/0"},{"name":"include_forecast","in":"query","required":false,"description":"If `true`, include forecast data. Defaults to `false`.","schema":{"type":"boolean","default":false}},{"name":"forecast_days","in":"query","required":false,"description":"Number of forecast days to return. Defaults to `2`.","schema":{"type":"integer","default":2}},{"name":"provider","in":"query","required":false,"description":"The weather data provider to use.","schema":{"type":"string","enum":["weather_stack","xweather"],"default":"weather_stack"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/paths/~1v2~1projects~1{project_exid}~1weather/get/responses/200/content/application~1json/schema/items"}}}}},"400":{"$ref":"#/paths/~1v2~1widgets/get/responses/400"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"500":{"description":"The weather data could not be retrieved from the provider.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1users/post/responses/400/content/application~1json/schema"}}}}}}},"/v2/projects/{project_exid}/weather":{"get":{"tags":["Weather"],"summary":"Get historical weather","description":"Get weather details for a project by day.\n\nThe returned result is a list of weather data with a 1-hour step.\n\n**Note**: The longitude/latitude used to get weather data are picked randomly from one of the project's cameras with a non-empty location.\n\n**Required permission:** `project-weather_view`\n","operationId":"getWeather","x-required-permission":"project-weather_view","parameters":[{"$ref":"#/paths/~1v2~1projects~1{project_exid}/parameters/0"},{"name":"day","in":"query","required":true,"description":"The day to fetch historical weather for (yyyy-mm-dd).","schema":{"type":"string","format":"date"}},{"name":"provider","in":"query","required":false,"description":"The weather data provider to use.","schema":{"type":"string","enum":["weather_stack","xweather"],"default":"weather_stack"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"hour":{"type":"string","format":"date-time","example":"2022-10-18T15:00:00Z"},"temp":{"type":"number","description":"Temperature in Celsius"},"feels_like":{"type":"number","description":"This temperature parameter accounts for the human perception of weather"},"pressure":{"type":"integer","description":"Atmospheric pressure (on the sea level, if there is no sea_level or grnd_level data)"},"humidity":{"type":"integer"},"wind_speed":{"type":"number","description":"Wind speed (meter/s)"},"wind_deg":{"type":"integer","description":"Wind direcation, in degree"},"clouds":{"type":"integer","description":"Cloudiness in %"},"rain":{"type":"object","properties":{"1h":{"type":"number","description":"Rain volume for the last 1 hour"},"3h":{"type":"number","description":"Rain volume for the last 3 hours"}}},"snow":{"type":"object","properties":{"1h":{"type":"number","description":"Snow volume for the last 1 hour"},"3h":{"type":"number","description":"Snow volume for the last 3 hours"}}},"weather":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer"},"main":{"type":"string","description":"Group of weather parameters (Rain, Snow, Extreme etc.)"},"description":{"type":"string","description":"Weather condition within the group"},"icon":{"type":"string"}}}}}}}}}},"400":{"$ref":"#/paths/~1v2~1widgets/get/responses/400"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"No weather data available for the requested day.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"},"example":{"message":"data are not available"}}}},"500":{"description":"The weather data could not be retrieved from the provider.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1users/post/responses/400/content/application~1json/schema"}}}}}}},"/v2/projects/{project_exid}/weather/filters":{"get":{"tags":["Weather"],"summary":"Filter weather data","description":"**Required permission:** `project-weather_view`\n\nRetrieve filtered weather data. You can specify filters for hourly or daily data using a wide range of parameters.\n\n- For `scope=daily`, filter fields like average temperature and UV index.\n- For `scope=hourly`, filter fields like temperature, precipitation, and more.\n- DF means daily filtering\n- HF means hourly filtering\n\n**Required permission:** `project-weather_view`\n","operationId":"filterWeatherData","x-required-permission":"project-weather_view","parameters":[{"$ref":"#/paths/~1v2~1projects~1{project_exid}/parameters/0"},{"name":"scope","in":"query","description":"Specifies whether to fetch hourly or daily data. Use `hourly` or `daily`. The default value is `hourly`.","required":false,"schema":{"type":"string","enum":["hourly","daily"],"default":"hourly"}},{"name":"include_recent","in":"query","description":"Retrieve weather data for yesterday and the day before from the provider API and include them in the results (for DF & HF).","required":false,"schema":{"type":"boolean"}},{"name":"start_date","in":"query","description":"Start date for DF results (yyyy-mm-dd format).","required":false,"schema":{"type":"string","format":"date"}},{"name":"end_date","in":"query","description":"End date for DF results (yyyy-mm-dd format).","required":false,"schema":{"type":"string","format":"date"}},{"name":"start_hour","in":"query","description":"Start hour for HF data (e.g. `2024-12-10 00:00:00`).","required":false,"schema":{"type":"string"}},{"name":"end_hour","in":"query","description":"End hour for HF data (e.g. `2024-12-20 00:00:00`).","required":false,"schema":{"type":"string"}},{"name":"min_temp","in":"query","description":"Minimum temperature for DF & HF.","required":false,"schema":{"type":"number"}},{"name":"max_temp","in":"query","description":"Maximum temperature for DF & HF.","required":false,"schema":{"type":"number"}},{"name":"min_min_temp","in":"query","description":"Filters results where the minimum temperature (`min_temp`) is greater than or equal to this value. Used for DF.","required":false,"schema":{"type":"number"}},{"name":"max_min_temp","in":"query","description":"Filters results where the minimum temperature (`min_temp`) is less than or equal to this value. Used for DF.","required":false,"schema":{"type":"number"}},{"name":"min_max_temp","in":"query","description":"Filters results where the maximum temperature (`max_temp`) is greater than or equal to this value. Used for DF.","required":false,"schema":{"type":"number"}},{"name":"max_max_temp","in":"query","description":"Filters results where the maximum temperature (`max_temp`) is less than or equal to this value. Used for DF.","required":false,"schema":{"type":"number"}},{"name":"min_sunhour","in":"query","description":"Minimum sunshine hours for DF.","required":false,"schema":{"type":"number"}},{"name":"max_sunhour","in":"query","description":"Maximum sunshine hours for DF.","required":false,"schema":{"type":"number"}},{"name":"min_totalsnow","in":"query","description":"Minimum total snow depth for DF.","required":false,"schema":{"type":"number"}},{"name":"max_totalsnow","in":"query","description":"Maximum total snow depth for DF.","required":false,"schema":{"type":"number"}},{"name":"min_min_feels_like","in":"query","description":"Minimum of the minimum feels like value for DF.","required":false,"schema":{"type":"number"}},{"name":"max_min_feels_like","in":"query","description":"Maximum of the minimum feels like value for DF.","required":false,"schema":{"type":"number"}},{"name":"min_max_feels_like","in":"query","description":"Minimum of the maximum feels like value for DF.","required":false,"schema":{"type":"number"}},{"name":"max_max_feels_like","in":"query","description":"Maximum of the maximum feels like value for DF.","required":false,"schema":{"type":"number"}},{"name":"min_min_humidity","in":"query","description":"Minimum of the minimum humidity for DF.","required":false,"schema":{"type":"number"}},{"name":"max_min_humidity","in":"query","description":"Maximum of the minimum humidity for DF.","required":false,"schema":{"type":"number"}},{"name":"min_max_humidity","in":"query","description":"Minimum of the maximum humidity for DF.","required":false,"schema":{"type":"number"}},{"name":"max_max_humidity","in":"query","description":"Maximum of the maximum humidity for DF.","required":false,"schema":{"type":"number"}},{"name":"min_min_pressure","in":"query","description":"Minimum of the minimum pressure for DF.","required":false,"schema":{"type":"number"}},{"name":"max_min_pressure","in":"query","description":"Maximum of the minimum pressure for DF.","required":false,"schema":{"type":"number"}},{"name":"min_max_pressure","in":"query","description":"Minimum of the maximum pressure for DF.","required":false,"schema":{"type":"number"}},{"name":"max_max_pressure","in":"query","description":"Maximum of the maximum pressure for DF.","required":false,"schema":{"type":"number"}},{"name":"min_min_clouds","in":"query","description":"Minimum of the minimum cloud coverage for DF.","required":false,"schema":{"type":"number"}},{"name":"max_min_clouds","in":"query","description":"Maximum of the minimum cloud coverage for DF.","required":false,"schema":{"type":"number"}},{"name":"min_max_clouds","in":"query","description":"Minimum of the maximum cloud coverage for DF.","required":false,"schema":{"type":"number"}},{"name":"max_max_clouds","in":"query","description":"Maximum of the maximum cloud coverage for DF.","required":false,"schema":{"type":"number"}},{"name":"min_min_wind_speed","in":"query","description":"Minimum of the minimum wind speed for DF.","required":false,"schema":{"type":"number"}},{"name":"max_min_wind_speed","in":"query","description":"Maximum of the minimum wind speed for DF.","required":false,"schema":{"type":"number"}},{"name":"min_max_wind_speed","in":"query","description":"Minimum of the maximum wind speed for DF.","required":false,"schema":{"type":"number"}},{"name":"max_max_wind_speed","in":"query","description":"Maximum of the maximum wind speed for DF.","required":false,"schema":{"type":"number"}},{"name":"min_min_wind_degree","in":"query","description":"Minimum of the minimum wind degree for DF.","required":false,"schema":{"type":"number"}},{"name":"max_min_wind_degree","in":"query","description":"Maximum of the minimum wind degree for DF.","required":false,"schema":{"type":"number"}},{"name":"min_max_wind_degree","in":"query","description":"Minimum of the maximum wind degree for DF.","required":false,"schema":{"type":"number"}},{"name":"max_max_wind_degree","in":"query","description":"Maximum of the maximum wind degree for DF.","required":false,"schema":{"type":"number"}},{"name":"min_min_windchill","in":"query","description":"Minimum of the minimum wind chill for DF.","required":false,"schema":{"type":"number"}},{"name":"max_min_windchill","in":"query","description":"Maximum of the minimum wind chill for DF.","required":false,"schema":{"type":"number"}},{"name":"min_max_windchill","in":"query","description":"Minimum of the maximum wind chill for DF.","required":false,"schema":{"type":"number"}},{"name":"max_max_windchill","in":"query","description":"Maximum of the maximum wind chill for DF.","required":false,"schema":{"type":"number"}},{"name":"min_min_windgust","in":"query","description":"Minimum of the minimum wind gust for DF.","required":false,"schema":{"type":"number"}},{"name":"max_min_windgust","in":"query","description":"Maximum of the minimum wind gust for DF.","required":false,"schema":{"type":"number"}},{"name":"min_max_windgust","in":"query","description":"Minimum of the maximum wind gust for DF.","required":false,"schema":{"type":"number"}},{"name":"max_max_windgust","in":"query","description":"Maximum of the maximum wind gust for DF.","required":false,"schema":{"type":"number"}},{"name":"min_min_precip","in":"query","description":"Minimum of the minimum precipitation for DF.","required":false,"schema":{"type":"number"}},{"name":"max_min_precip","in":"query","description":"Maximum of the minimum precipitation for DF.","required":false,"schema":{"type":"number"}},{"name":"min_max_precip","in":"query","description":"Minimum of the maximum precipitation for DF.","required":false,"schema":{"type":"number"}},{"name":"max_max_precip","in":"query","description":"Maximum of the maximum precipitation for DF.","required":false,"schema":{"type":"number"}},{"name":"min_min_dewpoint","in":"query","description":"Minimum of the minimum dew point for DF.","required":false,"schema":{"type":"number"}},{"name":"max_min_dewpoint","in":"query","description":"Maximum of the minimum dew point for DF.","required":false,"schema":{"type":"number"}},{"name":"min_max_dewpoint","in":"query","description":"Minimum of the maximum dew point for DF.","required":false,"schema":{"type":"number"}},{"name":"max_max_dewpoint","in":"query","description":"Maximum of the maximum dew point for DF.","required":false,"schema":{"type":"number"}},{"name":"min_min_heatindex","in":"query","description":"Minimum of the minimum heat index for DF.","required":false,"schema":{"type":"number"}},{"name":"max_min_heatindex","in":"query","description":"Maximum of the minimum heat index for DF.","required":false,"schema":{"type":"number"}},{"name":"min_max_heatindex","in":"query","description":"Minimum of the maximum heat index for DF.","required":false,"schema":{"type":"number"}},{"name":"max_max_heatindex","in":"query","description":"Maximum of the maximum heat index for DF.","required":false,"schema":{"type":"number"}},{"name":"min_min_uv_index","in":"query","description":"Minimum of the minimum UV index for DF.","required":false,"schema":{"type":"number"}},{"name":"max_min_uv_index","in":"query","description":"Maximum of the minimum UV index for DF.","required":false,"schema":{"type":"number"}},{"name":"min_max_uv_index","in":"query","description":"Minimum of the maximum UV index for DF.","required":false,"schema":{"type":"number"}},{"name":"max_max_uv_index","in":"query","description":"Maximum of the maximum UV index for DF.","required":false,"schema":{"type":"number"}},{"name":"min_feels_like","in":"query","description":"Minimum 'feels like' temperature for HF.","required":false,"schema":{"type":"number"}},{"name":"max_feels_like","in":"query","description":"Maximum 'feels like' temperature for HF.","required":false,"schema":{"type":"number"}},{"name":"min_pressure","in":"query","description":"Minimum atmospheric pressure for HF.","required":false,"schema":{"type":"number"}},{"name":"max_pressure","in":"query","description":"Maximum atmospheric pressure for HF.","required":false,"schema":{"type":"number"}},{"name":"min_humidity","in":"query","description":"Minimum humidity percentage for HF.","required":false,"schema":{"type":"number"}},{"name":"max_humidity","in":"query","description":"Maximum humidity percentage for HF.","required":false,"schema":{"type":"number"}},{"name":"min_clouds","in":"query","description":"Minimum cloud cover percentage for HF.","required":false,"schema":{"type":"number"}},{"name":"max_clouds","in":"query","description":"Maximum cloud cover percentage for HF.","required":false,"schema":{"type":"number"}},{"name":"min_wind_speed","in":"query","description":"Minimum wind speed for HF.","required":false,"schema":{"type":"number"}},{"name":"max_wind_speed","in":"query","description":"Maximum wind speed for HF.","required":false,"schema":{"type":"number"}},{"name":"min_precip","in":"query","description":"Minimum precipitation for HF.","required":false,"schema":{"type":"number"}},{"name":"max_precip","in":"query","description":"Maximum precipitation for HF.","required":false,"schema":{"type":"number"}},{"name":"min_heatindex","in":"query","description":"Minimum heat index for HF.","required":false,"schema":{"type":"number"}},{"name":"max_heatindex","in":"query","description":"Maximum heat index for HF.","required":false,"schema":{"type":"number"}},{"name":"min_dewpoint","in":"query","description":"Minimum dew point for HF.","required":false,"schema":{"type":"number"}},{"name":"max_dewpoint","in":"query","description":"Maximum dew point for HF.","required":false,"schema":{"type":"number"}},{"name":"min_chanceofrain","in":"query","description":"Minimum chance of rain percentage for HF.","required":false,"schema":{"type":"number"}},{"name":"max_chanceofrain","in":"query","description":"Maximum chance of rain percentage for HF.","required":false,"schema":{"type":"number"}},{"name":"min_chanceofsnow","in":"query","description":"Minimum chance of snow percentage for HF.","required":false,"schema":{"type":"number"}},{"name":"max_chanceofsnow","in":"query","description":"Maximum chance of snow percentage for HF.","required":false,"schema":{"type":"number"}},{"name":"min_chanceofremdry","in":"query","description":"Minimum chance of remaining dry percentage for HF.","required":false,"schema":{"type":"number"}},{"name":"max_chanceofremdry","in":"query","description":"Maximum chance of remaining dry percentage for HF.","required":false,"schema":{"type":"number"}},{"name":"min_chanceofwindy","in":"query","description":"Minimum chance of windy conditions percentage for HF.","required":false,"schema":{"type":"number"}},{"name":"max_chanceofwindy","in":"query","description":"Maximum chance of windy conditions percentage for HF.","required":false,"schema":{"type":"number"}},{"name":"min_chanceofovercast","in":"query","description":"Minimum chance of overcast conditions percentage for HF.","required":false,"schema":{"type":"number"}},{"name":"max_chanceofovercast","in":"query","description":"Maximum chance of overcast conditions percentage for HF.","required":false,"schema":{"type":"number"}},{"name":"min_chanceofsunshine","in":"query","description":"Minimum chance of sunshine percentage for HF.","required":false,"schema":{"type":"number"}},{"name":"max_chanceofsunshine","in":"query","description":"Maximum chance of sunshine percentage for HF.","required":false,"schema":{"type":"number"}},{"name":"min_chanceoffrost","in":"query","description":"Minimum chance of frost percentage for HF.","required":false,"schema":{"type":"number"}},{"name":"max_chanceoffrost","in":"query","description":"Maximum chance of frost percentage for HF.","required":false,"schema":{"type":"number"}},{"name":"min_chanceofhightemp","in":"query","description":"Minimum chance of high temperature percentage for HF.","required":false,"schema":{"type":"number"}},{"name":"max_chanceofhightemp","in":"query","description":"Maximum chance of high temperature percentage for HF.","required":false,"schema":{"type":"number"}},{"name":"min_chanceoffog","in":"query","description":"Minimum chance of fog percentage for HF.","required":false,"schema":{"type":"number"}},{"name":"max_chanceoffog","in":"query","description":"Maximum chance of fog percentage for HF.","required":false,"schema":{"type":"number"}},{"name":"min_chanceofthunder","in":"query","description":"Minimum chance of thunder percentage for HF.","required":false,"schema":{"type":"number"}},{"name":"max_chanceofthunder","in":"query","description":"Maximum chance of thunder percentage for HF.","required":false,"schema":{"type":"number"}},{"name":"min_uv_index","in":"query","description":"Minimum UV index for DF & HF.","required":false,"schema":{"type":"number"}},{"name":"max_uv_index","in":"query","description":"Maximum UV index for DF & HF.","required":false,"schema":{"type":"number"}},{"name":"weather_condition_ids","in":"query","description":"Weather condition description IDs (e.g. `[113, 116, 176 ...]`). It can be used only for DF.","required":false,"schema":{"type":"array","items":{"type":"integer"}}},{"name":"weather_description","in":"query","description":"Weather condition description (e.g., Overcast, Clear). It can be used only for HF.","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success. The response is an object with a `data` array. Each item is an hourly record when `scope=hourly` (default) or a daily record when `scope=daily`.\n","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","description":"The weather data corresponding to the selected scope.","items":{"oneOf":[{"type":"object","description":"Hourly weather data structure (for `scope=hourly`).","properties":{"project_id":{"type":"integer"},"hour":{"type":"string","format":"date-time"},"temp":{"type":"number"},"feels_like":{"type":"number"},"pressure":{"type":"number"},"humidity":{"type":"number"},"clouds":{"type":"number"},"wind_speed":{"type":"number"},"wind_degree":{"type":"number"},"wind_dir":{"type":"string"},"windchill":{"type":"number"},"windgust":{"type":"number"},"weather":{"type":"object","properties":{"id":{"type":"integer"},"description":{"type":"string"},"icon":{"type":"string"}}},"precip":{"type":"number"},"heatindex":{"type":"number"},"dewpoint":{"type":"number"},"chanceofrain":{"type":"number"},"chanceofsnow":{"type":"number"},"chanceofremdry":{"type":"number"},"chanceofwindy":{"type":"number"},"chanceofovercast":{"type":"number"},"chanceofsunshine":{"type":"number"},"chanceoffrost":{"type":"number"},"chanceofhightemp":{"type":"number"},"chanceoffog":{"type":"number"},"chanceofthunder":{"type":"number"},"uv_index":{"type":"number"},"source":{"type":"string","description":"The provider that supplied the data."}}},{"type":"object","description":"Daily weather data structure (for `scope=daily`).","properties":{"project_id":{"type":"integer"},"date":{"type":"string","format":"date"},"min_temp":{"type":"number"},"max_temp":{"type":"number"},"avgtemp":{"type":"number"},"totalsnow":{"type":"number"},"sunhour":{"type":"number"},"uv_index":{"type":"number"},"astro":{"type":"object","properties":{"moon_illumination":{"type":"number"},"moon_phase":{"type":"string"},"moonrise":{"type":"string"},"moonset":{"type":"string"},"sunrise":{"type":"string"},"sunset":{"type":"string"}}},"min_feels_like":{"type":"number"},"max_feels_like":{"type":"number"},"min_humidity":{"type":"number"},"max_humidity":{"type":"number"},"min_pressure":{"type":"number"},"max_pressure":{"type":"number"},"min_clouds":{"type":"number"},"max_clouds":{"type":"number"},"min_wind_speed":{"type":"number"},"max_wind_speed":{"type":"number"},"min_wind_degree":{"type":"number"},"max_wind_degree":{"type":"number"},"min_windchill":{"type":"number"},"max_windchill":{"type":"number"},"min_windgust":{"type":"number"},"max_windgust":{"type":"number"},"min_precip":{"type":"number"},"max_precip":{"type":"number"},"min_dewpoint":{"type":"number"},"max_dewpoint":{"type":"number"},"weather":{"type":"array","items":{"type":"object","properties":{"description":{"type":"string"},"icon":{"type":"string"},"id":{"type":"integer"}}}},"min_heatindex":{"type":"number"},"max_heatindex":{"type":"number"},"min_uv_index":{"type":"number"},"max_uv_index":{"type":"number"},"source":{"type":"string","description":"The provider that supplied the data."}}}]}}}}}}},"400":{"$ref":"#/paths/~1v2~1widgets/get/responses/400"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"}}}},"/v2/projects/{project_exid}/shares/cameras":{"patch":{"summary":"Restrict a specific user from accessing all cameras in the project","description":"Allows the project owner to enable or disable shared access to cameras for a specific user.","tags":["Project Shares"],"parameters":[{"$ref":"#/paths/~1v2~1projects~1{project_exid}/parameters/0"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","description":"The email of the user whose camera shares should be modified."},"is_user_access_restricted":{"type":"boolean","description":"Indicates whether the specified user, except the project owner, is restricted from accessing all cameras in the project."}},"required":["email","is_user_access_restricted"]}}}},"responses":{"200":{"description":"Camera shares successfully updated.","content":{"text/plain":{"schema":{"type":"string","example":"Camera shares updated successfully"}}}},"400":{"$ref":"#/paths/~1v2~1widgets/get/responses/400"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"description":"Forbidden - User does not have permission to disable shares.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Permission denied."}}}}}},"404":{"description":"Not Found - The user does not exist or the camera was not shared with them.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"User with email 'user@evercam.com' not found."}}}}}}}}},"/v2/projects/{project_exid}/waiting-camera-placeholder":{"get":{"summary":"Get the waiting for activation camera placeholder","description":"Returns the project's custom \"waiting for activation camera\" placeholder image.\n\nBy default the image is returned as JSON containing a base64 `data:` URL. Pass `show=true` to receive the raw JPEG binary instead.\n\n**Required permission:** `Any role on the project`\n","operationId":"getWaitingCameraPlaceholder","x-required-permission":"Any role on the project","tags":["Projects"],"parameters":[{"$ref":"#/paths/~1v2~1projects~1{project_exid}/parameters/0"},{"name":"show","in":"query","description":"If `true`, returns the raw JPEG image (`image/jpeg`); otherwise returns JSON with a base64 `data:` URL.","required":false,"schema":{"type":"string","enum":["true","false"],"default":"false"}}],"responses":{"200":{"description":"Successfully retrieved the placeholder","content":{"application/json":{"schema":{"type":"object","properties":{"placeholder":{"type":"string","description":"Base64 encoded JPEG image as a `data:` URL.","example":"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ..."}}}},"image/jpeg":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"The project has no custom placeholder, or it could not be loaded.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"},"examples":{"noPlaceholder":{"value":{"message":"The project doesn't contain a custom waiting for activation camera placeholder."}},"notFound":{"value":{"message":"No placeholder found."}}}}}}}},"post":{"summary":"Upload a custom waiting for activation camera placeholder","description":"Uploads a custom \"waiting for activation camera\" placeholder image for the project.\nThe image must be provided as a base64 `data:` URL (JPEG, JPG or PNG, max 10MB).\n\n**Required permission:** `project-settings_manage_project`\n","operationId":"createWaitingCameraPlaceholder","x-required-permission":"project-settings_manage_project","tags":["Projects"],"parameters":[{"$ref":"#/paths/~1v2~1projects~1{project_exid}/parameters/0"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["placeholder"],"properties":{"placeholder":{"type":"string","description":"Base64 encoded image as a `data:` URL (e.g. `data:image/jpeg;base64,...`).","example":"data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ..."}}}}}},"responses":{"201":{"description":"Placeholder saved successfully","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Placeholder saved successfully"}}}}}},"400":{"description":"Invalid request. Possible causes: missing `placeholder` parameter, unsupported image format, invalid base64 encoding, or file too large.\n","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"}}},"delete":{"summary":"Delete the custom waiting for activation camera placeholder","description":"**Required permission:** `project-settings_manage_project`","operationId":"deleteWaitingCameraPlaceholder","x-required-permission":"project-settings_manage_project","tags":["Projects"],"parameters":[{"$ref":"#/paths/~1v2~1projects~1{project_exid}/parameters/0"}],"responses":{"200":{"description":"Successfully deleted the placeholder","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Waiting for activation camera placeholder deleted successfully"}}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"The project doesn't contain a custom placeholder to delete.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"},"example":{"message":"The project doesn't contain a custom waiting for activation camera placeholder."}}}}}}},"/v2/projects/{project_exid}/comments":{"get":{"tags":["Comments"],"summary":"Get all comments","description":"Returns all comments for the project (not paginated).\n\n**Required permission:** `project-comments_view`\n","operationId":"getAllComments","x-required-permission":"project-comments_view","parameters":[{"$ref":"#/paths/~1v2~1projects~1{project_exid}/parameters/0"},{"name":"archived","in":"query","required":false,"description":"Filter by archive state. `true` returns only the requester's own archived comments;\n`false` returns only active (non-archived) comments. Omit to return all comments.\n","schema":{"type":"string","enum":["true","false"]}},{"name":"scope","in":"query","required":false,"description":"Filter comments by their exact scope value.","schema":{"type":"string","example":"recordings"}}],"responses":{"200":{"description":"List of comments","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/paths/~1v2~1projects~1{project_exid}~1comments/post/responses/201/content/application~1json/schema"}}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"Project does not exist.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}}}},"post":{"summary":"Create comment","description":"Add a new comment to the project.\n\n**Required permission:** `project-comments_view`\n","operationId":"createProjectComment","x-required-permission":"project-comments_view","tags":["Comments"],"parameters":[{"$ref":"#/paths/~1v2~1projects~1{project_exid}/parameters/0"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"camera_exid":{"type":"string","description":"Camera unique identifier (resolved to the internal camera; ignored if it does not match a camera).","example":"sadsa-sda45"},"content":{"type":"string","description":"Comment content."},"scope":{"type":"string","enum":["recordings","project","360","drone","bim"],"description":"Comment scope."},"visibility":{"type":"array","items":{"type":"string","enum":["recordings","360","drone","bim"]},"description":"Where the comment is visible."},"timestamp":{"type":"string","format":"date-time","example":"2019-02-18T09:00:00.000+00:00","description":"Snapshot timestamp where the comment is related."},"from_timestamp":{"type":"string","format":"date-time","example":"2019-02-18T09:00:00.000+00:00","description":"Comments range from timestamp."},"to_timestamp":{"type":"string","format":"date-time","example":"2019-02-18T09:00:00.000+00:00","description":"Comments range to timestamp."},"label":{"type":"string","example":"info","description":"Comment label (info/danger/restricted/hyperlink)."},"position2d":{"type":"array","items":{"type":"number"},"example":[10,20],"description":"Comment position in 2D."},"position3d":{"type":"array","items":{"type":"number"},"example":[10,20,30],"description":"Comment position in 3D."},"context":{"type":"object","description":"Comment context for specific scope."}}}}}},"responses":{"201":{"description":"Success","content":{"application/json":{"schema":{"title":"Comment","type":"object","properties":{"id":{"type":"integer","description":"Unique identifier of comment"},"camera_exid":{"type":"string","description":"Camera unique identifier","example":"sadsa-sda45"},"content":{"type":"string","description":"Comment content."},"scope":{"type":"string","enum":["recordings","project","360","drone","bim"],"description":"Comment scope."},"visibility":{"type":"array","items":{"type":"string","enum":["recordings","360","drone","bim"]},"description":"Where the comment is visible."},"timestamp":{"type":"string","format":"date-time","example":"2019-02-18T09:00:00.000+00:00","description":"Snapshot timestamp where the comment is related."},"from_timestamp":{"type":"string","format":"date-time","example":"2019-02-18T09:00:00.000+00:00","description":"Comments range from timestamp."},"to_timestamp":{"type":"string","format":"date-time","example":"2019-02-18T09:00:00.000+00:00","description":"Comments range to timestamp."},"label":{"type":"string","example":"info","description":"Comment label (info/danger/restricted/hyperlink)."},"position2d":{"type":"array","items":{"type":"number"},"example":[10,20],"description":"Comment position in 2D."},"position3d":{"type":"array","items":{"type":"number"},"example":[10,20,30],"description":"Comment position in 3D."},"created_at":{"type":"string","format":"date-time","example":"2019-02-18T09:00:00.000+00:00"},"archived_at":{"type":"string","format":"date-time","example":"2019-02-18T09:00:00.000+00:00","description":"Comment archived date if null, the comment is active."},"creator_email":{"type":"string","description":"Comment creator email."},"creator_name":{"type":"string","description":"Comment creator full name."},"context":{"type":"object","description":"Comment context for specific scope."}},"description":""}}}},"400":{"$ref":"#/paths/~1v2~1widgets/get/responses/400"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"Project does not exist.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}}}}},"/v2/projects/{project_exid}/comments/{id}":{"parameters":[{"$ref":"#/paths/~1v2~1projects~1{project_exid}/parameters/0"},{"name":"id","in":"path","description":"The comment's numeric id.","required":true,"schema":{"type":"integer","example":42}}],"get":{"tags":["Comments"],"summary":"Get a comment","description":"Returns a comment\n\n**Required permission:** `project-comments_view`\n","operationId":"getComment","x-required-permission":"project-comments_view","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1projects~1{project_exid}~1comments/post/responses/201/content/application~1json/schema"}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"Project does not exist or comment not found.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}}}},"patch":{"tags":["Comments"],"summary":"Update a comment","description":"Updates full or partial data for an existing comment.\n\nWhen `content` changes, users newly mentioned in it are notified by email and in-app\nnotification, attributed to the comment's author. Users already mentioned are not notified again.\n\n**Required permission:** `project-comments_manage`\n","operationId":"updateComment","x-required-permission":"project-comments_manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","description":"Comment content."},"scope":{"type":"string","enum":["recordings","project","360","drone","bim"],"description":"Comment scope."},"visibility":{"type":"array","items":{"type":"string","enum":["recordings","360","drone","bim"]},"description":"Where the comment is visible."},"timestamp":{"type":"string","format":"date-time","example":"2019-02-18T09:00:00.000+00:00","description":"Snapshot timestamp where the comment is related."},"from_timestamp":{"type":"string","format":"date-time","example":"2019-02-18T09:00:00.000+00:00","description":"Comments range from timestamp."},"to_timestamp":{"type":"string","format":"date-time","example":"2019-02-18T09:00:00.000+00:00","description":"Comments range to timestamp."},"label":{"type":"string","example":"info","description":"Comment label(info/danger/restricted/hyperlink)."},"archive":{"type":"string","enum":["true","false"],"description":"Convenience flag to archive/unarchive the comment. `\"true\"` sets `archived_at`\nto the current time; `\"false\"` clears it.\n"},"position2d":{"type":"array","items":{"type":"number"},"example":[10,20],"description":"Comment position in 2D."},"position3d":{"type":"array","items":{"type":"number"},"example":[10,20,30],"description":"Comment position in 3D."},"context":{"type":"object","description":"Comment context for specific scope."}}}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1projects~1{project_exid}~1comments/post/responses/201/content/application~1json/schema"}}}},"400":{"$ref":"#/paths/~1v2~1widgets/get/responses/400"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"Project does not exist or comment not found.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}}}},"delete":{"tags":["Comments"],"summary":"Delete a comment.","description":"**Required permission:** `project-comments_manage`","operationId":"deleteComment","x-required-permission":"project-comments_manage","responses":{"204":{"description":"Success"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"Project does not exist or comment not found.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}}}}},"/v2/projects/{project_exid}/roles":{"get":{"tags":["Projects"],"summary":"Get all roles for a project","description":"Retrieve a list of all roles associated with a specific project, including predefined project roles.\n\n**Required permission:** `Any role on the project`\n","operationId":"listProjectRoles","x-required-permission":"Any role on the project","parameters":[{"$ref":"#/paths/~1v2~1projects~1{project_exid}/parameters/0"}],"responses":{"200":{"description":"A list of roles for the specified project.","content":{"application/json":{"schema":{"type":"object","properties":{"roles":{"type":"array","items":{"$ref":"#/paths/~1v2~1projects~1{project_exid}~1roles/post/responses/201/content/application~1json/schema/properties/role"}}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"}}},"post":{"tags":["Projects"],"summary":"Create a new role for a project","description":"Create a new role within a specific project.\n\n**Required permission:** `project-settings_manage_roles`\n","operationId":"createProjectRole","x-required-permission":"project-settings_manage_roles","parameters":[{"$ref":"#/paths/~1v2~1projects~1{project_exid}/parameters/0"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"title":"Project Role Payload","type":"object","required":["name"],"properties":{"name":{"type":"string","description":"The name of the role.","example":"Project Manager"},"description":{"type":"string","description":"An optional human-readable description of the role.","example":"Manages project settings, users and cameras"},"permissions":{"type":"array","items":{"type":"string"},"description":"A list of permissions associated with the role. formatted as feature-action, e.g., 'project-settings_manage_project', 'camera-recordings_view'."},"sub_roles":{"type":"array","items":{"type":"object","properties":{"role_id":{"type":"integer","description":"The unique identifier of the sub role."},"resource_id":{"type":"string","description":"Camera exid."}}},"description":"A list of sub roles, used for hierarchical roles like project role having camera roles auto granted within its assignments."}}}}}},"responses":{"201":{"description":"The created role.","content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"object","properties":{"id":{"type":"integer","description":"The unique identifier of the role."},"name":{"type":"string","description":"The name of the role.","example":"Project Manager"},"description":{"type":"string","description":"An optional human-readable description of the role.","example":"Manages project settings, users and cameras"},"resource_type":{"type":"string","description":"The type of resource the role is associated with, e.g., 'app', 'project', 'camera'.","default":"app","example":"project"},"resource":{"type":"string","description":"To allow users to create new roles within a project, resource identify the project exid so the roles will only be available within this project.","example":"evercam"},"sub_roles":{"type":"array","items":{"type":"object","properties":{"role_id":{"type":"integer","description":"The unique identifier of the sub role.","example":456},"resource_id":{"type":"string","example":"camera-123","description":"Camera exid"}}},"description":"A list of sub roles, used for hierarchical roles like project role having camera roles auto granted within its assignments.","example":[{"role_id":456,"resource_id":"camera-123"},{"role_id":456,"resource_id":"camera-124"}]},"permissions":{"type":"array","items":{"type":"string"},"description":"A list of permissions associated with the role. formatted as resource-action, e.g., 'project-settings_manage_project', 'camera-recordings_view'."},"creator_email":{"type":"string","description":"The email of the user who created the role.","example":"user@example.com"}}}}}}}},"400":{"description":"Invalid role parameters (validation errors).","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"object","description":"Map of field names to validation error messages.","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"}}}},"/v2/projects/{project_exid}/roles/{id}":{"patch":{"tags":["Projects"],"summary":"Update a role for a project","description":"Update an existing role within a specific project. Only the `name`,\n`description`, `permissions` and `sub_roles` fields are updated.\n\n**Required permission:** `project-settings_manage_roles`\n","operationId":"updateProjectRole","x-required-permission":"project-settings_manage_roles","parameters":[{"$ref":"#/paths/~1v2~1projects~1{project_exid}/parameters/0"},{"name":"id","in":"path","description":"The unique identifier of the role to update.","required":true,"schema":{"type":"integer"},"example":456}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1projects~1{project_exid}~1roles/post/requestBody/content/application~1json/schema"}}}},"responses":{"200":{"description":"The updated role.","content":{"application/json":{"schema":{"type":"object","properties":{"role":{"$ref":"#/paths/~1v2~1projects~1{project_exid}~1roles/post/responses/201/content/application~1json/schema/properties/role"}}}}}},"400":{"description":"Invalid role parameters (validation errors).","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"object","description":"Map of field names to validation error messages.","additionalProperties":{"type":"array","items":{"type":"string"}}}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"Role not found.","content":{"text/plain":{"schema":{"type":"string","example":"Role not found"}}}}}},"delete":{"tags":["Projects"],"summary":"Delete a role from a project","description":"Remove an existing role from a specific project.\n\n**Required permission:** `project-settings_manage_roles`\n","operationId":"deleteProjectRole","x-required-permission":"project-settings_manage_roles","parameters":[{"$ref":"#/paths/~1v2~1projects~1{project_exid}/parameters/0"},{"name":"id","in":"path","description":"The unique identifier of the role to delete.","required":true,"schema":{"type":"integer"},"example":456}],"responses":{"204":{"description":"Role deleted successfully (empty body)."},"400":{"description":"The role could not be deleted (for example it is still in use).","content":{"text/plain":{"schema":{"type":"string"}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"Role not found.","content":{"text/plain":{"schema":{"type":"string","example":"Role not found"}}}}}}},"/v2/projects/{project_exid}/roles/{id}/permissions":{"post":{"tags":["Projects"],"summary":"Grant permission to role","description":"Add a new permission to the role's permissions list.\n\n**NOTE:** The route is registered in the project router\n(`POST /roles/:id/permissions` → `ProjectRoleController.grant_permission`)\nbut the `grant_permission` action is not currently implemented in the\ncontroller, so calling this endpoint results in a `500` error. Documented\nhere to reflect the intended contract.\n\n**Required permission:** `project-settings_manage_roles`\n","operationId":"grantProjectRolePermission","x-required-permission":"project-settings_manage_roles","x-implementation-status":"not-implemented","parameters":[{"$ref":"#/paths/~1v2~1projects~1{project_exid}/parameters/0"},{"name":"id","in":"path","description":"The unique identifier of the role to update.","required":true,"schema":{"type":"integer"},"example":456},{"name":"permission","in":"query","description":"The permission to add, formatted as feature-action, e.g., 'project-settings_manage_project', 'camera-recordings_view'.","required":true,"schema":{"type":"string"},"example":"project-media_hub_view"}],"responses":{"204":{"description":"Permission added successfully."},"400":{"description":"Bad Request - Invalid input or permission already exists."},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"Not Found - Role or project not found."},"500":{"description":"Internal Server Error - the `grant_permission` action is not implemented."}}},"delete":{"tags":["Projects"],"summary":"Revoke permission from role","description":"Remove a permission from the role's permissions list.\n\n**NOTE:** The route is registered in the project router\n(`DELETE /roles/:id/permissions` → `ProjectRoleController.revoke_permission`)\nbut the `revoke_permission` action is not currently implemented in the\ncontroller, so calling this endpoint results in a `500` error. Documented\nhere to reflect the intended contract.\n\n**Required permission:** `project-settings_manage_roles`\n","operationId":"revokeProjectRolePermission","x-required-permission":"project-settings_manage_roles","x-implementation-status":"not-implemented","parameters":[{"$ref":"#/paths/~1v2~1projects~1{project_exid}/parameters/0"},{"name":"id","in":"path","description":"The unique identifier of the role to update.","required":true,"schema":{"type":"integer"},"example":456},{"name":"permission","in":"query","description":"The permission to remove, formatted as feature-action, e.g., 'project-settings_manage_project', 'camera-recordings_view'.","required":true,"schema":{"type":"string"},"example":"project-media_hub_view"}],"responses":{"204":{"description":"Permission removed successfully."},"400":{"description":"Bad Request - Invalid input or permission does not exist."},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"Not Found - Role or project not found."},"500":{"description":"Internal Server Error - the `revoke_permission` action is not implemented."}}}},"/v2/projects/{project_exid}/users":{"get":{"operationId":"listProjectUsers","summary":"List project members and pending invites","description":"Retrieve the active members and pending invites of a specific project.\n\n**Required permission:** `project-settings_invite_users`\n\nAvailable to both project admins and members (members have this permission).\n","x-required-permission":"project-settings_invite_users","tags":["Projects"],"parameters":[{"$ref":"#/paths/~1v2~1projects~1{project_exid}/parameters/0"}],"responses":{"200":{"description":"The project's members, pending invites, and any errors.","content":{"application/json":{"schema":{"type":"object","description":"Combined listing of a project's active members, pending invites, per-email\nassignment errors, and any invite emails that failed to send. Rendered by\n`ProjectUserView.render(\"index.json\", ...)`.\n","properties":{"users":{"type":"array","description":"Active project members.","items":{"type":"object","properties":{"id":{"type":"integer","description":"The unique identifier of the user.","example":42},"email":{"type":"string","format":"email","example":"jane@example.com"},"fullname":{"type":"string","example":"Jane Doe"},"last_seen_at":{"type":"string","format":"date-time","nullable":true,"description":"Timestamp of the user's last recorded activity."},"role":{"type":"object","properties":{"id":{"type":"integer","example":3},"name":{"type":"string","example":"Admin"}}},"permissions":{"type":"array","description":"Effective permissions for the member (role + any override).","items":{"type":"string"},"example":["project-settings_invite_users"]},"sub_roles":{"type":"array","description":"Effective per-camera (sub-resource) role assignments.","items":{"type":"object"}},"company":{"description":"The member's associated company, or null."},"telephone":{"type":"string","nullable":true,"example":"+353871234567"},"persona":{"type":"string","nullable":true,"example":"contractor"}}}},"invites":{"type":"array","description":"Pending invites for the project (status 0), excluding active members.","items":{"type":"object","properties":{"id":{"type":"integer","example":17},"email":{"type":"string","format":"email","example":"newuser@example.com"},"role":{"type":"object","properties":{"id":{"type":"integer","example":3},"name":{"type":"string","example":"Admin"}}},"permissions":{"type":"array","items":{"type":"string"}},"sub_roles":{"type":"array","items":{"type":"object"}}}}},"errors":{"type":"array","description":"Per-email role-assignment failures (changeset validation errors).","items":{"type":"object","properties":{"email":{"type":"string","format":"email","example":"bad@example.com"},"error":{"type":"object","description":"Traversed Ecto changeset errors, keyed by field.","additionalProperties":true}}}},"email_failures":{"type":"array","description":"Emails for which the invitation notification email failed to send.","items":{"type":"string","format":"email"}}}}}}},"401":{"description":"Unauthorized - Missing or invalid authentication."},"403":{"description":"Forbidden - Missing `project-settings_invite_users` permission."},"404":{"description":"Not Found - Project not found."}}},"post":{"operationId":"assignProjectUsers","summary":"Assign a project role to one or more users","description":"Assign a role to one or more users within a project by email. Existing users are\nadded directly; unknown emails receive a pending invite. Each user is first\nunassigned from any prior role on the project, then re-assigned to the given role.\n\n**Required permission:** `project-settings_invite_users`\n\nAvailable to both project admins and members (members have this permission).\n\nWhen the request includes `override_role.sub_roles` with per-camera access, the\nassigner must have `camera-share` permission on each referenced camera, and cannot\ngrant permissions they do not themselves hold. Returns `403` otherwise.\n","x-required-permission":"project-settings_invite_users","tags":["Projects"],"parameters":[{"$ref":"#/paths/~1v2~1projects~1{project_exid}/parameters/0"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["emails","role_id"],"properties":{"emails":{"type":"array","description":"Email addresses to assign the role to (whitespace is trimmed).","items":{"type":"string","format":"email"},"example":["jane@example.com"]},"role_id":{"type":"integer","description":"The ID of the role to assign.","example":3},"override_role":{"type":"object","description":"Optional per-assignment role override. May contain a `permissions`\narray and/or a `sub_roles` array (per-camera `{role_id, resource_id}`).\n","nullable":true},"message":{"type":"string","nullable":true,"description":"Optional message included in the invitation email."}}}}}},"responses":{"200":{"description":"Assignment result: created members, created invites, per-email errors, and\nany invitation emails that failed to send.\n","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1projects~1{project_exid}~1users/get/responses/200/content/application~1json/schema"}}}},"401":{"description":"Unauthorized - Missing or invalid authentication."},"403":{"description":"Forbidden - Missing `project-settings_invite_users` permission, attempt to grant\npermissions the assigner does not hold, or missing `camera-share` permission on a\ncamera referenced in `override_role.sub_roles`.\n","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","example":"You don't have share permission on cameras: abcde-12345"}}},{"type":"object","properties":{"message":{"type":"string","example":"Forbidden."}}}]}}}},"404":{"description":"Not Found - Role or Project not found."}}},"delete":{"operationId":"removeProjectUsers","summary":"Remove members or invites from a project","description":"Remove one or more users or pending invites from a project by email. Each email is\nunassigned from all of its project roles.\n\n**Required permission:** `project-settings_manage_roles`\n\nOnly users with role-management permission can remove members. If any email fails to\nbe removed, a `400` with per-email errors is returned; otherwise `204`.\n","x-required-permission":"project-settings_manage_roles","tags":["Projects"],"parameters":[{"$ref":"#/paths/~1v2~1projects~1{project_exid}/parameters/0"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["emails"],"properties":{"emails":{"type":"array","description":"Email addresses of members or invites to remove (whitespace is trimmed).","items":{"type":"string","format":"email"},"example":["jane@example.com"]}}}}}},"responses":{"204":{"description":"All users/invites successfully removed (no content)."},"400":{"description":"Bad Request - One or more emails could not be removed.","content":{"application/json":{"schema":{"type":"object","properties":{"errors":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string","format":"email"},"error":{"description":"The failure reason for this email."}}}}}}}}},"401":{"description":"Unauthorized - Missing or invalid authentication."},"403":{"description":"Forbidden - Missing `project-settings_manage_roles` permission.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Forbidden."}}}}}}}},"patch":{"operationId":"updateProjectUsers","summary":"Update the role of project members or invites","description":"Change the role assigned to one or more users (or pending invites) within a project.\nEach email is unassigned from its prior role and re-assigned to the given role.\n\n**Required permission:** `project-settings_manage_roles`\n\nWhen the request includes `override_role.sub_roles` with per-camera access, the\nassigner must have `camera-share` permission on each referenced camera, and cannot\ngrant permissions they do not themselves hold. Returns `403` otherwise.\n","x-required-permission":"project-settings_manage_roles","tags":["Projects"],"parameters":[{"$ref":"#/paths/~1v2~1projects~1{project_exid}/parameters/0"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["emails","role_id"],"properties":{"emails":{"type":"array","description":"Email addresses whose role should be updated (whitespace is trimmed).","items":{"type":"string","format":"email"},"example":["jane@example.com"]},"role_id":{"type":"integer","description":"The ID of the new role to assign.","example":3},"override_role":{"type":"object","nullable":true,"description":"Optional per-assignment role override (`permissions` array and/or\n`sub_roles` array of per-camera `{role_id, resource_id}`).\n"}}}}}},"responses":{"200":{"description":"Update result: updated members, updated invites, and per-email errors.\n","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1projects~1{project_exid}~1users/get/responses/200/content/application~1json/schema"}}}},"401":{"description":"Unauthorized - Missing or invalid authentication."},"403":{"description":"Forbidden - Missing `project-settings_manage_roles` permission, attempt to grant\npermissions the assigner does not hold, or missing `camera-share` permission on a\ncamera referenced in `override_role.sub_roles`.\n","content":{"application/json":{"schema":{"oneOf":[{"type":"object","properties":{"error":{"type":"string","example":"You cannot grant permissions you don't have: project-settings_manage_roles"}}},{"type":"object","properties":{"message":{"type":"string","example":"Forbidden."}}}]}}}},"404":{"description":"Not Found - Role or Project not found."}}}},"/v2/projects/{project_exid}/users/mentionable":{"get":{"tags":["Comments"],"summary":"Get mentionable users for a project or camera","description":"Returns a list of users that can be @mentioned in a comment within this project.\n\nWhen `camera_exid` is provided, only users who have a role assignment on that specific\ncamera are returned — users with project access but no access to that camera are excluded.\n\nPermissions are the user's effective project permissions: when their role assignment carries\nan `override_role` permission list, that list replaces the role's permissions.\n\nUsers are ordered by first name, then last name.\n\n**Required permission:** `project-comments_view`\n","x-required-permission":"project-comments_view","parameters":[{"$ref":"#/paths/~1v2~1projects~1{project_exid}/parameters/0"},{"name":"camera_exid","in":"query","required":false,"description":"Filter results to users who have access to this specific camera.\nWhen omitted, all project members are returned.\n","schema":{"type":"string"},"example":"construction-site-cam-1"},{"name":"scope","in":"query","required":false,"description":"Filter results to users with a specific view permission.\nSupported values: `drone` (requires `project-drone_view_view`),\n`360` (requires `project-360_view_view`), `bim` (requires `project-bim_view_view`).\nWhen omitted, all users with `project-comments_view` are returned.\n","schema":{"type":"string","enum":["drone","360","bim"]}}],"responses":{"200":{"description":"List of mentionable users, ordered by first name, then last name.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"The unique identifier of the user."},"email":{"type":"string","format":"email","description":"The email address of the user."},"fullname":{"type":"string","description":"The full name of the user."}}}}}}},"403":{"description":"Forbidden - Insufficient permissions to view mentionable users."},"404":{"description":"Not Found - Project not found."}}}},"/v2/projects/{project_exid}/users/resend-invite":{"post":{"operationId":"resendProjectInvite","summary":"Resend a pending project invite","description":"Resend the invitation email for a pending project invite identified by email address.\nRate limited to one resend per day.\n\n**Required permission:** `project-settings_invite_users`\n\nAvailable to both project admins and members.\n","x-required-permission":"project-settings_invite_users","tags":["Projects"],"parameters":[{"$ref":"#/paths/~1v2~1projects~1{project_exid}/parameters/0"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email"],"properties":{"email":{"type":"string","format":"email","description":"The email address of the pending invite to resend.","example":"newuser@example.com"}}}}}},"responses":{"200":{"description":"Invite resent successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Invite resent successfully"}}}}}},"400":{"description":"Bad Request - Invite is not pending, or resend failed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"One of: \"Can only resend pending invites\" (invite not pending) or\n\"Failed to resend invite\" (validation failure).\n","example":"Can only resend pending invites"}}}}}},"401":{"description":"Unauthorized - Missing or invalid authentication."},"403":{"description":"Forbidden - Missing `project-settings_invite_users` permission."},"404":{"description":"Not Found - No pending invite found for the given email in this project.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"No pending invite found for newuser@example.com in this project"}}}}}},"429":{"description":"Too Many Requests - The invite was already sent today.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Invite was already sent today. Please wait until tomorrow to resend."}}}}}}}}},"/v2/projects/{project_exid}/users/cancel-invite/{invite_id}":{"delete":{"operationId":"cancelProjectInvite","summary":"Cancel a pending project invite","description":"Cancel a pending invite by its ID. The invite must belong to this project and be in a\npending state.\n\n**Required permission:** `project-settings_manage_roles`\n","x-required-permission":"project-settings_manage_roles","tags":["Projects"],"parameters":[{"$ref":"#/paths/~1v2~1projects~1{project_exid}/parameters/0"},{"name":"invite_id","in":"path","required":true,"schema":{"type":"integer"},"description":"The ID of the invite to cancel.","example":17}],"responses":{"204":{"description":"Invite cancelled successfully (no content)."},"400":{"description":"Bad Request - Invite is not pending, or cancellation failed.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","description":"One of: \"Can only cancel pending invites\" (invite not pending) or\n\"Failed to cancel invite\" (validation failure).\n","example":"Can only cancel pending invites"}}}}}},"401":{"description":"Unauthorized - Missing or invalid authentication."},"403":{"description":"Forbidden - Missing `project-settings_manage_roles` permission."},"404":{"description":"Not Found - Invite not found or does not belong to this project.","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string","example":"Invite not found"}}}}}}}}},"/v2/cameras/{camera_exid}/nvr/snapshots/extract/{id}":{"delete":{"tags":["NVR"],"summary":"Delete an extraction","description":"**Required permission:** `camera-recordings_view`","operationId":"deleteExtraction","x-required-permission":"camera-recordings_view","parameters":[{"$ref":"#/paths/~1v2~1cameras~1{camera_exid}/parameters/0"},{"name":"id","in":"path","description":"Extraction id","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1users~1{id}~1password/patch/responses/200/content/application~1json/schema"}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"}}}},"/v2/users/auth/autodesk/revoke":{"post":{"tags":["Autodesk"],"summary":"Revoke the Autodesk connection","description":"Revokes the authenticated user's stored Autodesk OAuth token (and any per-viewer tokens), then deletes the persisted connection. Requires a valid Evercam session with an existing Autodesk connection.","operationId":"revokeAutodeskToken","responses":{"200":{"description":"The Autodesk connection was revoked. The response body is empty."},"401":{"description":"No Autodesk connection exists for the user (from the `ensure_autodesk_token` plug), or the request is unauthenticated.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}},"500":{"description":"Autodesk rejected the revocation, or the integration failed (`INTEGRATION_ERROR`). Expired-token errors also surface here.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1users/post/responses/400/content/application~1json/schema"}}}}}}},"/v2/autodesk/hubs":{"get":{"tags":["Autodesk"],"summary":"List Autodesk hubs","description":"List the Autodesk (Forge) hubs the connected user has access to.\n\nRequires a stored Autodesk OAuth token for the authenticated user (the\n`ensure_autodesk_token` plug returns `401` when the user is not\nauthenticated or has not connected an Autodesk account). If the stored token\nis expired it is deleted and a `500` integration error is returned — the\ncaller should re-run the Autodesk OAuth connect flow.\n","operationId":"listAutodeskHubs","security":[{"Bearer-Token":[]}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","description":"Hubs mapped to `{ value, text }` option objects (`value` is the Autodesk hub id, `text` is `\"<name> - <region>\"`).\n","items":{"type":"object","properties":{"value":{"type":"string","description":"Autodesk hub id.","example":"b.a1b2c3d4-1234-5678-9abc-def012345678"},"text":{"type":"string","description":"Human-readable hub label (\"<name> - <region>\").","example":"Evercam - US"}}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"500":{"description":"Autodesk integration error (including an expired stored token, which is deleted server-side). Body is an `%Evercam.Error{}` JSON object.\n","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1users/post/responses/400/content/application~1json/schema"}}}}}}},"/v2/autodesk/hubs/{hub_id}/projects":{"get":{"tags":["Autodesk"],"summary":"List Autodesk projects for a hub","description":"List the Autodesk (Forge) projects within a hub for the connected user.\n\nRequires a stored Autodesk OAuth token for the authenticated user (the\n`ensure_autodesk_token` plug returns `401` when the user is not\nauthenticated or has not connected an Autodesk account). If the stored token\nis expired it is deleted and a `500` integration error is returned.\n","operationId":"listAutodeskHubProjects","security":[{"Bearer-Token":[]}],"parameters":[{"name":"hub_id","in":"path","description":"The Autodesk hub id (passed through to the Autodesk API).","required":true,"example":"b.a1b2c3d4-1234-5678-9abc-def012345678","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","description":"Projects mapped to `{ value, text }` option objects (`value` is the Autodesk project id, `text` is the project name).\n","items":{"type":"object","properties":{"value":{"type":"string","description":"Autodesk project id.","example":"b.99887766-5544-3322-1100-aabbccddeeff"},"text":{"type":"string","description":"Autodesk project name.","example":"Downtown Tower"}}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"500":{"description":"Autodesk integration error (including an expired stored token, which is deleted server-side). Body is an `%Evercam.Error{}` JSON object.\n","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1users/post/responses/400/content/application~1json/schema"}}}}}}},"/v2/autodesk/hubs/{hub_id}/projects/{project_id}/folders":{"get":{"tags":["Autodesk"],"summary":"List top-level project folders","description":"List the top-level folders of an Autodesk project for the given hub.\n\nThe response is an opaque passthrough of the Autodesk Forge Data Management\nAPI folder listing (the backend forwards the upstream JSON unchanged), so\nthe exact structure is defined by Autodesk, not by Evercam.\n\n**Authentication:** Requires a connected Autodesk OAuth token for the\ncurrent user (the `autodesk` provider token). No Evercam project permission\nis enforced on this listing action.\n","operationId":"listAutodeskProjectFolders","parameters":[{"name":"hub_id","in":"path","description":"The Autodesk hub id (opaque upstream identifier).","required":true,"schema":{"type":"string","example":"b.1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d"}},{"name":"project_id","in":"path","description":"The Autodesk project id (opaque upstream identifier; passed to the route param `autodesk_project_id`).","required":true,"schema":{"type":"string","example":"b.9f8e7d6c-5b4a-3210-fedc-ba9876543210"}}],"responses":{"200":{"description":"Success. Opaque Autodesk Forge folder listing forwarded unchanged from\nthe upstream Data Management API.\n","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Opaque Autodesk Forge folder listing."}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"default":{"description":"Autodesk integration error. An expired stored token (which is also\ndeleted server-side) or any other upstream failure is surfaced via the\nfallback controller using the upstream HTTP status when available\n(defaults to 500).\n","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1users/post/responses/400/content/application~1json/schema"}}}}}}},"/v2/autodesk/projects/{project_id}/folders/{parent_folder_id}/subfolders":{"get":{"tags":["Autodesk"],"summary":"List sub-folders of a folder","description":"List the sub-folders (contents) of an Autodesk parent folder for the given\nproject.\n\nThe response is an opaque passthrough of the Autodesk Forge Data Management\nAPI folder-contents listing (the backend forwards the upstream JSON\nunchanged), so the exact structure is defined by Autodesk, not by Evercam.\n\n**Authentication:** Requires a connected Autodesk OAuth token for the\ncurrent user (the `autodesk` provider token). No Evercam project permission\nis enforced on this listing action.\n","operationId":"listAutodeskSubFolders","parameters":[{"name":"project_id","in":"path","description":"The Autodesk project id (opaque upstream identifier; passed to the route param `autodesk_project_id`).","required":true,"schema":{"type":"string","example":"b.9f8e7d6c-5b4a-3210-fedc-ba9876543210"}},{"name":"parent_folder_id","in":"path","description":"The Autodesk parent folder id (opaque upstream identifier).","required":true,"schema":{"type":"string","example":"urn:adsk.wipprod:fs.folder:co.AbCdEfGh1234"}},{"name":"get_derivatives","in":"query","description":"Whether the upstream folder-contents query should include item derivatives. Read from the query string and forwarded to the Autodesk Data Management API; the action pattern-matches on it, so it must be present.","required":true,"schema":{"type":"string","example":"false"}}],"responses":{"200":{"description":"Success. Opaque Autodesk Forge folder-contents listing forwarded\nunchanged from the upstream Data Management API.\n","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Opaque Autodesk Forge folder-contents listing."}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"default":{"description":"Autodesk integration error. An expired stored token (which is also\ndeleted server-side) or any other upstream failure is surfaced via the\nfallback controller using the upstream HTTP status when available\n(defaults to 500).\n","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1users/post/responses/400/content/application~1json/schema"}}}}}}},"/v2/autodesk/projects/{project_id}/folders/{folder_id}":{"get":{"tags":["Autodesk"],"summary":"Get folder details","description":"Fetch the details of a single Autodesk folder for the given project.\n\nThe response is an opaque passthrough of the Autodesk Forge Data Management\nAPI folder resource (the backend forwards the upstream JSON unchanged), so\nthe exact structure is defined by Autodesk, not by Evercam.\n\n**Authentication:** Requires a connected Autodesk OAuth token for the\ncurrent user (the `autodesk` provider token). No Evercam project permission\nis enforced on this action.\n","operationId":"getAutodeskFolder","parameters":[{"name":"project_id","in":"path","description":"The Autodesk project id (opaque upstream identifier; passed to the route param `autodesk_project_id`).","required":true,"schema":{"type":"string","example":"b.9f8e7d6c-5b4a-3210-fedc-ba9876543210"}},{"name":"folder_id","in":"path","description":"The Autodesk folder id (opaque upstream identifier).","required":true,"schema":{"type":"string","example":"urn:adsk.wipprod:fs.folder:co.AbCdEfGh1234"}}],"responses":{"200":{"description":"Success. Opaque Autodesk Forge folder resource forwarded unchanged from\nthe upstream Data Management API.\n","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"description":"Opaque Autodesk Forge folder resource."}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"default":{"description":"Autodesk integration error. An expired stored token (which is also\ndeleted server-side) or any other upstream failure is surfaced via the\nfallback controller using the upstream HTTP status when available\n(defaults to 500).\n","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1users/post/responses/400/content/application~1json/schema"}}}}}}},"/v2/autodesk/upload-snapshot":{"post":{"tags":["Autodesk"],"summary":"Upload an edited snapshot to Autodesk","description":"Upload a client-provided (base64 encoded) snapshot for an Evercam project\ninto an Autodesk (BIM 360 / ACC) folder.\n\n**Authentication:** Requires a valid Evercam session (password / SSO /\nimpersonation) and a connected Autodesk OAuth token. The current user must\nhold the `project-connectors_view` permission on the Evercam project\nidentified by `project_exid`.\n","operationId":"uploadSnapshotToAutodesk","x-required-permission":"project-connectors_view","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["project_id","folder_id","acc_file_type","acc_folder_type","project_exid","snapshot"],"properties":{"project_id":{"type":"string","description":"The Autodesk project id.","example":"b.9f8e7d6c-5b4a-3210-fedc-ba9876543210"},"folder_id":{"type":"string","description":"The Autodesk folder id the snapshot is uploaded into.","example":"urn:adsk.wipprod:fs.folder:co.AbCdEfGh1234"},"acc_file_type":{"type":"string","description":"The selected Autodesk folder's allowed file format (e.g. `file.autodesk.bim360:File`, `file.autodesk.core:File`).","example":"file.autodesk.bim360:File"},"acc_folder_type":{"type":"string","description":"The selected Autodesk folder's allowed folder format (e.g. `folder.autodesk.bim360:Folder`, `folder.autodesk.core:Folder`).","example":"folder.autodesk.bim360:Folder"},"project_exid":{"type":"string","description":"The Evercam project exid.","example":"my-site"},"snapshot":{"type":"string","format":"byte","description":"A base64 encoded JPEG snapshot."}}}}}},"responses":{"201":{"description":"Snapshot uploaded to Autodesk. The response body is empty."},"400":{"$ref":"#/paths/~1v2~1widgets/get/responses/400"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"default":{"description":"Autodesk integration error, an unresolvable Evercam `project_exid`, or\nany other failure. An expired Autodesk token is deleted server-side.\nThe upstream HTTP status is mirrored when available (defaults to 500).\n","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1users/post/responses/400/content/application~1json/schema"}}}}}}},"/v2/autodesk/{exid}/token/viewer":{"get":{"tags":["Autodesk"],"summary":"Get viewer token","description":"Get the Autodesk viewer token for a project. If the token is expired it is automatically refreshed.\nIf the refresh fails the stored token is deleted and a 404 is returned.\n\n**Required permission:** `project-connectors_view`\n","operationId":"getAutodeskViewerToken","x-required-permission":"project-connectors_view","security":[{"Bearer-Token":[]}],"parameters":[{"name":"exid","in":"path","description":"The project exid. Resolved to a project by the `EnsureProject` plug (a `404` is returned when no project matches).\n","required":true,"example":"my-construction-site","schema":{"type":"string"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","required":["token","expires_at","login"],"properties":{"token":{"type":"string","description":"Autodesk viewer access token","example":"<autodesk-viewer-access-token>"},"expires_at":{"type":"string","format":"date-time","description":"Token expiry datetime","example":"2026-07-06T12:34:56Z"},"login":{"type":"string","description":"Autodesk login identifier","example":"user@example.com"}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"Returned when no project matches `exid`, or no stored Autodesk viewer token exists for the project, or the token refresh failed (in which case the stored token is deleted). Body is `{ \"message\": \"Not found.\" }`.\n","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}}}}},"/v2/users/auth/procore/revoke":{"post":{"tags":["Procore"],"summary":"Revoke the Procore connection","description":"Revokes the authenticated user's stored Procore OAuth token, then deletes the persisted connection. Requires a valid Evercam session with an existing Procore connection.","operationId":"revokeProcoreToken","responses":{"204":{"description":"The Procore connection was revoked. The response body is empty."},"401":{"description":"No Procore connection exists for the user (from the `ensure_procore_token` plug), or the request is unauthenticated.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}},"500":{"description":"Procore rejected the revocation, or the integration failed (`INTEGRATION_ERROR`).","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1users/post/responses/400/content/application~1json/schema"}}}}}}},"/v2/procore/companies":{"get":{"tags":["Procore"],"summary":"Get companies","description":"List all Procore companies the authenticated user has access to.\n\nThis is a pass-through to the Procore API; the response is the decoded\nProcore JSON payload returned as-is.\n\n**Authentication:** Requires a valid Evercam session and a linked Procore\nOAuth token for the current user. No camera/project permission is checked.\n","operationId":"getCompanies","x-required-permission":"Authenticated user with a linked Procore token","responses":{"200":{"description":"List of Procore companies (pass-through Procore payload)","content":{"application/json":{"schema":{"type":"array","description":"Pass-through array of Procore company objects.","items":{"type":"object","additionalProperties":true,"description":"A Procore company object, forwarded from the Procore API."}},"example":[{"id":8089,"name":"Evercam Construction Cameras","is_active":true}]}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"default":{"description":"Procore integration error. The upstream Procore HTTP status is mirrored\nback to the client (defaults to 500 when no status is available).\n","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1users/post/responses/400/content/application~1json/schema"}}}}}}},"/v2/procore/companies/observation-types":{"get":{"tags":["Procore"],"summary":"List observation types","description":"List all observation types for a company/project in Procore.\n\nThis is a pass-through to the Procore API; the response is the decoded\nProcore JSON payload returned as-is.\n\n**Authentication:** Requires a valid Evercam session and a linked Procore\nOAuth token for the current user. No camera/project permission is checked.\n","operationId":"procoreListObservationTypes","x-required-permission":"Authenticated user with a linked Procore token","parameters":[{"name":"company_id","in":"query","required":true,"description":"Procore company ID.","schema":{"type":"integer","example":8089}},{"name":"project_id","in":"query","required":true,"description":"Procore project ID.","schema":{"type":"integer","example":123456}}],"responses":{"200":{"description":"List of observation types (pass-through Procore payload)","content":{"application/json":{"schema":{"type":"array","description":"Pass-through array of Procore observation-type objects.","items":{"type":"object","additionalProperties":true}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"default":{"description":"Procore integration error. The upstream Procore HTTP status is mirrored\nback to the client (defaults to 500 when no status is available).\n","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1users/post/responses/400/content/application~1json/schema"}}}}}}},"/v2/procore/companies/contributing-behaviors":{"get":{"tags":["Procore"],"summary":"List contributing behaviors","description":"List all contributing behaviors for a company in Procore.\n\nThis is a pass-through to the Procore API; the response is the decoded\nProcore JSON payload returned as-is.\n\n**Authentication:** Requires a valid Evercam session and a linked Procore\nOAuth token for the current user. No camera/project permission is checked.\n","operationId":"listContributingBehaviors","x-required-permission":"Authenticated user with a linked Procore token","parameters":[{"name":"company_id","in":"query","required":true,"description":"Procore company ID.","schema":{"type":"integer","example":8089}}],"responses":{"200":{"description":"List of contributing behaviors (pass-through Procore payload)","content":{"application/json":{"schema":{"type":"array","description":"Pass-through array of Procore contributing-behavior objects.","items":{"type":"object","additionalProperties":true}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"default":{"description":"Procore integration error. The upstream Procore HTTP status is mirrored\nback to the client (defaults to 500 when no status is available).\n","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1users/post/responses/400/content/application~1json/schema"}}}}}}},"/v2/procore/companies/contributing-conditions":{"get":{"tags":["Procore"],"summary":"List contributing conditions","description":"List all contributing conditions for a company in Procore.\n\nThis is a pass-through to the Procore API; the response is the decoded\nProcore JSON payload returned as-is.\n\n**Authentication:** Requires a valid Evercam session and a linked Procore\nOAuth token for the current user. No camera/project permission is checked.\n","operationId":"listContributingConditions","x-required-permission":"Authenticated user with a linked Procore token","parameters":[{"name":"company_id","in":"query","required":true,"description":"Procore company ID.","schema":{"type":"integer","example":8089}}],"responses":{"200":{"description":"List of contributing conditions (pass-through Procore payload)","content":{"application/json":{"schema":{"type":"array","description":"Pass-through array of Procore contributing-condition objects.","items":{"type":"object","additionalProperties":true}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"default":{"description":"Procore integration error. The upstream Procore HTTP status is mirrored\nback to the client (defaults to 500 when no status is available).\n","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1users/post/responses/400/content/application~1json/schema"}}}}}}},"/v2/procore/companies/hazards":{"get":{"tags":["Procore"],"summary":"List Hazards","description":"List all hazards for a company in Procore.\n\nThis is a pass-through to the Procore API; the response is the decoded\nProcore JSON payload returned as-is.\n\n**Authentication:** Requires a valid Evercam session and a linked Procore\nOAuth token for the current user. No camera/project permission is checked.\n","operationId":"listHazards","x-required-permission":"Authenticated user with a linked Procore token","parameters":[{"name":"company_id","in":"query","required":true,"description":"Procore company ID.","schema":{"type":"integer","example":8089}}],"responses":{"200":{"description":"List of hazards (pass-through Procore payload)","content":{"application/json":{"schema":{"type":"array","description":"Pass-through array of Procore hazard objects.","items":{"type":"object","additionalProperties":true}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"default":{"description":"Procore integration error. The upstream Procore HTTP status is mirrored\nback to the client (defaults to 500 when no status is available).\n","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1users/post/responses/400/content/application~1json/schema"}}}}}}},"/v2/procore/companies/trades":{"get":{"tags":["Procore"],"summary":"List Trades","description":"List all trades for a company in Procore.\n\nThis is a pass-through to the Procore API; the response is the decoded\nProcore JSON payload returned as-is.\n\n**Authentication:** Requires a valid Evercam session and a linked Procore\nOAuth token for the current user. No camera/project permission is checked.\n","operationId":"listTrades","x-required-permission":"Authenticated user with a linked Procore token","parameters":[{"name":"company_id","in":"query","required":true,"description":"Procore company ID.","schema":{"type":"integer","example":8089}}],"responses":{"200":{"description":"List of trades (pass-through Procore payload)","content":{"application/json":{"schema":{"type":"array","description":"Pass-through array of Procore trade objects.","items":{"type":"object","additionalProperties":true}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"default":{"description":"Procore integration error. The upstream Procore HTTP status is mirrored\nback to the client (defaults to 500 when no status is available).\n","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1users/post/responses/400/content/application~1json/schema"}}}}}}},"/v2/procore/observations":{"post":{"tags":["Procore"],"summary":"Create observation","description":"Create a new observation in Procore with an attachment.\n\n**Required permission:** `project-connectors_view`\n","operationId":"createObservation","x-required-permission":"project-connectors_view","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","properties":{"observation":{"type":"object","description":"Observation field values keyed by Procore field name. Validated against the observation type's field set.\n"},"project_id":{"type":"integer","description":"Procore project id."},"company_id":{"type":"integer","description":"Procore company id."},"attachment":{"type":"string","format":"binary","description":"Image file attached to the observation."},"project_exid":{"type":"string","description":"Evercam project exid used to resolve the project."},"type":{"type":"string","description":"Observation type (category field set) name."}},"required":["project_id","company_id","attachment","project_exid","type"]}}}},"responses":{"201":{"description":"Observation created (empty body)"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"default":{"$ref":"#/paths/~1v2~1logs/post/responses/400"}}}},"/v2/procore/observations/next-available-number":{"get":{"tags":["Procore"],"summary":"Get next available observation number","description":"Retrieve the next available observation number for a Procore project.\n\nThis is a pass-through to the Procore API; the response is the decoded\nProcore JSON payload returned as-is (a single object, not a list).\n\n**Authentication:** Requires a valid Evercam session and a linked Procore\nOAuth token for the current user. No camera/project permission is checked.\n","operationId":"getNextAvailableObservationNumber","x-required-permission":"Authenticated user with a linked Procore token","parameters":[{"name":"company_id","in":"query","required":true,"description":"Procore company ID.","schema":{"type":"integer","example":8089}},{"name":"project_id","in":"query","required":true,"description":"Procore project ID.","schema":{"type":"integer","example":123456}}],"responses":{"200":{"description":"The next available observation number (pass-through Procore payload,\na single object).\n","content":{"application/json":{"schema":{"type":"object","description":"Pass-through Procore payload.","additionalProperties":true,"properties":{"next_available_number":{"type":"string","description":"The next available observation number, as returned by Procore.","example":"2"}}}}}},"400":{"description":"Invalid request parameters. `company_id` and `project_id` are required\nand must be integers; a validation failure is rendered as an\n`EvercamError`.\n","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1users/post/responses/400/content/application~1json/schema"}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"default":{"description":"Procore integration error. The upstream Procore HTTP status is mirrored\nback to the client (defaults to 500 when no status is available).\n","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1users/post/responses/400/content/application~1json/schema"}}}}}}},"/v2/procore/observations/assignees":{"get":{"tags":["Procore"],"summary":"List observation assignees","description":"List all possible assignees for observations in a Procore project.\n\nThis is a pass-through to the Procore API; the response is the decoded\nProcore JSON payload returned as-is.\n\n**Authentication:** Requires a valid Evercam session and a linked Procore\nOAuth token for the current user. No camera/project permission is checked.\n","operationId":"procoreListObservationAssignees","x-required-permission":"Authenticated user with a linked Procore token","parameters":[{"name":"company_id","in":"query","required":true,"description":"Procore company ID.","schema":{"type":"integer","example":8089}},{"name":"project_id","in":"query","required":true,"description":"Procore project ID.","schema":{"type":"integer","example":123456}}],"responses":{"200":{"description":"List of assignees (pass-through Procore payload)","content":{"application/json":{"schema":{"type":"array","description":"Pass-through array of Procore assignee objects.","items":{"type":"object","additionalProperties":true}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"default":{"description":"Procore integration error. The upstream Procore HTTP status is mirrored\nback to the client (defaults to 500 when no status is available).\n","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1users/post/responses/400/content/application~1json/schema"}}}}}}},"/v2/procore/observations/form":{"get":{"tags":["Procore"],"summary":"Get observation form fields","description":"Retrieve the configurable form field definitions for creating a Procore\nobservation of a given type. This does NOT create an observation; it fetches\nthe field set (the fields configured for the given `observation_type`) so a\nclient can render the create form.\n\nThis is a pass-through to the Procore API; the response is the decoded\nProcore field-set payload (the `configurable_field_set.fields` object for the\nmatching category) returned as-is.\n\n**Authentication:** Requires a valid Evercam session and a linked Procore\nOAuth token for the current user. No camera/project permission is checked.\n","operationId":"getObservationForm","x-required-permission":"Authenticated user with a linked Procore token","parameters":[{"name":"company_id","in":"query","required":true,"description":"Procore company ID.","schema":{"type":"integer","example":8089}},{"name":"project_id","in":"query","required":true,"description":"Procore project ID.","schema":{"type":"integer","example":123456}},{"name":"observation_type","in":"query","required":true,"description":"The observation category key (matched against Procore's `category_key`)\nwhose configurable field set should be returned.\n","schema":{"type":"string","example":"quality"}}],"responses":{"200":{"description":"The configurable field-set for the requested observation type\n(pass-through Procore payload). Keyed by field name, each value describes\na form field (label, data type, whether it is required, etc.).\n","content":{"application/json":{"schema":{"type":"object","description":"Pass-through Procore observation field-set object.","additionalProperties":true}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"default":{"description":"Procore integration error (including when no field set matches the given\n`observation_type`). The upstream Procore HTTP status is mirrored back to\nthe client (defaults to 500 when no status is available).\n","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1users/post/responses/400/content/application~1json/schema"}}}}}}},"/v2/procore/observations/distribution-members":{"get":{"tags":["Procore"],"summary":"List potential distribution members","description":"List all potential distribution members for observations in a Procore\nproject.\n\nThis is a pass-through to the Procore API; the response is the decoded\nProcore JSON payload returned as-is.\n\n**Authentication:** Requires a valid Evercam session and a linked Procore\nOAuth token for the current user. No camera/project permission is checked.\n","operationId":"procoreListPotentialDistributionMembers","x-required-permission":"Authenticated user with a linked Procore token","parameters":[{"name":"company_id","in":"query","required":true,"description":"Procore company ID.","schema":{"type":"integer","example":8089}},{"name":"project_id","in":"query","required":true,"description":"Procore project ID.","schema":{"type":"integer","example":123456}}],"responses":{"200":{"description":"List of potential distribution members (pass-through Procore payload)","content":{"application/json":{"schema":{"type":"array","description":"Pass-through array of Procore distribution-member objects.","items":{"type":"object","additionalProperties":true}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"default":{"description":"Procore integration error. The upstream Procore HTTP status is mirrored\nback to the client (defaults to 500 when no status is available).\n","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1users/post/responses/400/content/application~1json/schema"}}}}}}},"/v2/procore/image-categories":{"get":{"tags":["Procore"],"summary":"List image categories","description":"List all image categories (albums) for a company/project in Procore.\n\nThis is a pass-through to the Procore API; the response is the decoded\nProcore JSON payload returned as-is.\n\n**Authentication:** Requires a valid Evercam session and a linked Procore\nOAuth token for the current user. No camera/project permission is checked.\n","operationId":"getImageCategories","x-required-permission":"Authenticated user with a linked Procore token","parameters":[{"name":"company_id","in":"query","required":true,"description":"Procore company ID.","schema":{"type":"integer","example":8089}},{"name":"project_id","in":"query","required":true,"description":"Procore project ID.","schema":{"type":"integer","example":123456}}],"responses":{"200":{"description":"List of image categories (pass-through Procore payload)","content":{"application/json":{"schema":{"type":"array","description":"Pass-through array of Procore image-category (album) objects.","items":{"type":"object","additionalProperties":true}}}}},"400":{"description":"Invalid parameters. Returned when `company_id` or `project_id` is\nmissing or not an integer.\n","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1users/post/responses/400/content/application~1json/schema"}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"default":{"description":"Procore integration error. The upstream Procore HTTP status is mirrored\nback to the client (defaults to 500 when no status is available).\n","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1users/post/responses/400/content/application~1json/schema"}}}}}}},"/v2/procore/projects":{"get":{"tags":["Procore"],"summary":"List company projects","description":"List all projects of a Procore company.\n\nThis is a pass-through to the Procore API; the response is the decoded\nProcore JSON payload returned as-is.\n\n**Authentication:** Requires a valid Evercam session and a linked Procore\nOAuth token for the current user. No camera/project permission is checked.\n","operationId":"getProjects","x-required-permission":"Authenticated user with a linked Procore token","parameters":[{"name":"company_id","in":"query","required":true,"description":"Procore company ID.","schema":{"type":"integer","example":8089}}],"responses":{"200":{"description":"List of company projects (pass-through Procore payload)","content":{"application/json":{"schema":{"type":"array","description":"Pass-through array of Procore project objects.","items":{"type":"object","additionalProperties":true}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"default":{"description":"Procore integration error. The upstream Procore HTTP status is mirrored\nback to the client (defaults to 500 when no status is available).\n","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1users/post/responses/400/content/application~1json/schema"}}}}}}},"/v2/procore/projects/locations":{"get":{"tags":["Procore"],"summary":"List project locations","description":"List all locations for a Procore project.\n\nThis is a pass-through to the Procore API; the response is the decoded\nProcore JSON payload returned as-is.\n\n**Authentication:** Requires a valid Evercam session and a linked Procore\nOAuth token for the current user. No camera/project permission is checked.\n","operationId":"listLocations","x-required-permission":"Authenticated user with a linked Procore token","parameters":[{"name":"company_id","in":"query","required":true,"description":"Procore company ID.","schema":{"type":"integer","example":8089}},{"name":"project_id","in":"query","required":true,"description":"Procore project ID.","schema":{"type":"integer","example":123456}}],"responses":{"200":{"description":"List of project locations (pass-through Procore payload)","content":{"application/json":{"schema":{"type":"array","description":"Pass-through array of Procore location objects.","items":{"type":"object","additionalProperties":true}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"default":{"description":"Procore integration error. The upstream Procore HTTP status is mirrored\nback to the client (defaults to 500 when no status is available).\n","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1users/post/responses/400/content/application~1json/schema"}}}}}}},"/v2/procore/upload-live-view":{"post":{"tags":["Procore"],"summary":"Upload live snapshot to Procore","description":"Fetch the latest live snapshot for the given camera and upload it to a\nProcore project's images album (image category). If no matching image\ncategory exists in Procore it is created automatically.\n\n**Authentication:** Requires a valid Evercam session and a linked Procore\nOAuth token for the current user. No camera/project permission is checked.\n","operationId":"uploadLiveView","x-required-permission":"Authenticated user with a linked Procore token","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["company_id","project_id","camera_exid"],"properties":{"company_id":{"type":"integer","description":"Procore company ID.","example":8089},"project_id":{"type":"integer","description":"Procore project ID.","example":123456},"camera_exid":{"type":"string","description":"Evercam camera exid whose latest snapshot is uploaded.","example":"gpo-cbxaf"}}}}}},"responses":{"201":{"description":"Snapshot uploaded to Procore. The response body is empty."},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"default":{"description":"Procore integration error. The upstream Procore HTTP status is mirrored\nback to the client (defaults to 500 when no status is available).\n","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1users/post/responses/400/content/application~1json/schema"}}}}}}},"/v2/procore/upload-recording":{"post":{"tags":["Procore"],"summary":"Upload a recorded snapshot to Procore","description":"Fetch the recorded snapshot for the given camera at the requested\ntimestamp and upload it to a Procore project's images album (image\ncategory). If no matching image category exists in Procore it is created\nautomatically.\n\n**Authentication:** Requires a valid Evercam session and a linked Procore\nOAuth token for the current user. No camera/project permission is checked.\n","operationId":"uploadRecording","x-required-permission":"Authenticated user with a linked Procore token","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["company_id","project_id","camera_exid","timestamp"],"properties":{"company_id":{"type":"integer","description":"Procore company ID.","example":8089},"project_id":{"type":"integer","description":"Procore project ID.","example":123456},"camera_exid":{"type":"string","description":"Evercam camera exid whose recorded snapshot is uploaded.","example":"gpo-cbxaf"},"timestamp":{"type":"string","format":"date-time","description":"UTC timestamp of the recorded snapshot to upload.","example":"2024-01-15T10:30:00Z"}}}}}},"responses":{"201":{"description":"Recorded snapshot uploaded to Procore. The response body is empty."},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"default":{"description":"Procore integration error. The upstream Procore HTTP status is mirrored\nback to the client (defaults to 500 when no status is available).\n","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1users/post/responses/400/content/application~1json/schema"}}}}}}},"/v2/procore/specification-sections":{"get":{"tags":["Procore"],"summary":"List Specification Sections","description":"List all Specification Sections for a Procore project.\n\nThis is a pass-through to the Procore API; the response is the decoded\nProcore JSON payload returned as-is.\n\n**Authentication:** Requires a valid Evercam session and a linked Procore\nOAuth token for the current user. No camera/project permission is checked.\n","operationId":"listSpecificationSections","x-required-permission":"Authenticated user with a linked Procore token","parameters":[{"name":"company_id","in":"query","required":true,"description":"Procore company ID.","schema":{"type":"integer","example":8089}},{"name":"project_id","in":"query","required":true,"description":"Procore project ID.","schema":{"type":"integer","example":123456}}],"responses":{"200":{"description":"List of Specification Sections (pass-through Procore payload)","content":{"application/json":{"schema":{"type":"array","description":"Pass-through array of Procore specification section objects.","items":{"type":"object","additionalProperties":true}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"default":{"description":"Procore integration error. The upstream Procore HTTP status is mirrored\nback to the client (defaults to 500 when no status is available).\n","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1users/post/responses/400/content/application~1json/schema"}}}}}}},"/v2/procore/custom-field-options":{"get":{"tags":["Procore"],"summary":"List Custom Field Options","description":"List all custom field options for a company in Procore, resolved from a\nProcore options URL.\n\nThis is a pass-through to the Procore API; the response is the decoded\nProcore JSON payload returned as-is.\n\n**Authentication:** Requires a valid Evercam session and a linked Procore\nOAuth token for the current user. No camera/project permission is checked.\n","operationId":"listCustomFieldOptions","x-required-permission":"Authenticated user with a linked Procore token","parameters":[{"name":"company_id","in":"query","required":true,"description":"Procore company ID.","schema":{"type":"integer","example":8089}},{"name":"options_url","in":"query","required":true,"description":"Procore custom-field options URL. Must be a valid `http`/`https` URL\nwhose host ends with an allowed Procore domain (default `procore.com`);\notherwise a `400` validation error is returned.\n","schema":{"type":"string","format":"uri","example":"https://api.procore.com/rest/v1.0/companies/8089/custom_field_options"}}],"responses":{"200":{"description":"List of custom field options (pass-through Procore payload)","content":{"application/json":{"schema":{"type":"array","description":"Pass-through array of Procore custom-field-option objects.","items":{"type":"object","additionalProperties":true}}}}},"400":{"description":"Invalid parameters. Returned when `company_id`/`options_url` are missing\nor `options_url` is not a valid `http`/`https` URL from an allowed\nProcore domain.\n","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1users/post/responses/400/content/application~1json/schema"}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"default":{"description":"Procore integration error. The upstream Procore HTTP status is mirrored\nback to the client (defaults to 500 when no status is available).\n","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1users/post/responses/400/content/application~1json/schema"}}}}}}},"/v2/procore/upload-snapshot":{"post":{"tags":["Procore"],"summary":"Upload an edited snapshot to Procore","description":"Upload a client-provided (base64 encoded) snapshot for an Evercam project\nto a Procore project's images album (image category). When `category_id` is\nomitted, the image category is looked up or created automatically in Procore.\n\n**Authentication:** Requires a valid Evercam session (password / SSO /\nimpersonation) and a linked Procore OAuth token. The current user must hold\nthe `project-connectors_view` permission on the Evercam project identified\nby `project_exid`.\n","operationId":"uploadSnapshotToProcore","x-required-permission":"project-connectors_view","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["company_id","project_id","project_exid","snapshot"],"properties":{"company_id":{"type":"integer","description":"Procore company ID.","example":8089},"project_id":{"type":"integer","description":"Procore project ID.","example":123456},"category_id":{"type":"integer","description":"Optional Procore image category (album) ID. When omitted, the\ncategory is looked up or created automatically.\n","example":987654},"project_exid":{"type":"string","description":"Evercam project exid.","example":"my-site"},"snapshot":{"type":"string","format":"byte","description":"A base64 encoded JPEG snapshot."}}}}}},"responses":{"201":{"description":"Snapshot uploaded to Procore. The response body is empty."},"400":{"$ref":"#/paths/~1v2~1widgets/get/responses/400"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"Evercam project not found for the given `project_exid`.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1users/post/responses/400/content/application~1json/schema"}}}},"default":{"description":"Procore integration error. The upstream Procore HTTP status is mirrored\nback to the client (defaults to 500 when no status is available).\n","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1users/post/responses/400/content/application~1json/schema"}}}}}}},"/v2/procore/projects/permissions":{"get":{"tags":["Procore"],"summary":"List project permissions","description":"List all permissions for a Procore project.\n\nThis is a pass-through to the Procore API; the response is the decoded\nProcore JSON payload returned as-is.\n\n**Authentication:** Requires a valid Evercam session and a linked Procore\nOAuth token for the current user. No camera/project permission is checked.\n","operationId":"listPermissions","x-required-permission":"Authenticated user with a linked Procore token","parameters":[{"name":"company_id","in":"query","required":true,"description":"Procore company ID.","schema":{"type":"integer","example":8089}},{"name":"project_id","in":"query","required":true,"description":"Procore project ID.","schema":{"type":"integer","example":123456}}],"responses":{"200":{"description":"List of project permissions (pass-through Procore payload)","content":{"application/json":{"schema":{"type":"array","description":"Pass-through array of Procore permission objects.","items":{"type":"object","additionalProperties":true}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"default":{"description":"Procore integration error. The upstream Procore HTTP status is mirrored\nback to the client (defaults to 500 when no status is available).\n","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1users/post/responses/400/content/application~1json/schema"}}}}}}},"/v2/aconex/projects":{"get":{"tags":["Aconex"],"summary":"Get Aconex user projects.","description":"Get the list of Aconex projects the connected user has access to. Requires a stored Aconex OAuth token (established via the callback); if none exists the request is rejected with 401. The response is parsed from the upstream Aconex projects XML API, so all fields are returned as strings except the boolean flags.","operationId":"getAconexUserProjects","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Aconex project id.","example":"1879048409"},"name":{"type":"string","description":"Aconex project name.","example":"Sample Construction Project"},"short_name":{"type":"string","description":"Aconex project short name.","example":"SCP"},"start_date":{"type":"string","description":"Aconex project start date (upstream string, may be empty).","example":"2023-01-01"},"end_date":{"type":"string","description":"Aconex project end/stop date (upstream string, may be empty).","example":"2024-12-31"},"active":{"type":"boolean","description":"Whether the Aconex project is active."},"hidden":{"type":"boolean","description":"Whether the Aconex project is hidden."}}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"500":{"description":"The upstream Aconex request failed (integration error), rendered as an Evercam error object. The status may mirror the upstream Aconex error status when one is provided.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1users/post/responses/400/content/application~1json/schema"}}}}}}},"/v2/aconex/projects/{project_id}/register/schema":{"get":{"tags":["Aconex"],"summary":"Get Aconex project register document schema.","description":"Get the document register creation schema for an Aconex project. Requires a stored Aconex OAuth token (established via the callback); if none exists the request is rejected with 401. The response merges the upstream Aconex multi-value and single-value schema fields into a single array. All values are parsed from the upstream Aconex XML schema and returned as strings.","operationId":"getAconexDocumentSchema","parameters":[{"name":"project_id","in":"path","description":"The Aconex project id.","required":true,"schema":{"type":"string","example":"1879048409"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"field_name":{"type":"string","description":"The field name."},"data_type":{"type":"string","description":"The data type of the field (upstream Aconex data type)."},"identifier":{"type":"string","description":"The field identifier."},"modified_field_name":{"type":"string","description":"The modified/normalised field name."},"mandatory_status":{"type":"string","description":"The mandatory status of the field."},"schema_values":{"type":"array","description":"The allowed values for the field. Present for multi-value fields; empty for single-value fields.","items":{"type":"object","properties":{"id":{"type":"string"},"value":{"type":"string"}}}}}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"500":{"description":"The upstream Aconex request failed (integration error), rendered as an Evercam error object. The status may mirror the upstream Aconex error status when one is provided.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1users/post/responses/400/content/application~1json/schema"}}}}}}},"/v2/aconex/projects/{project_id}/register/schema/{document_type_id}":{"get":{"tags":["Aconex"],"summary":"Get Aconex document type schema.","description":"Get the register schema for a specific document type within an Aconex project. Requires a stored Aconex OAuth token (established via the callback); if none exists the request is rejected with 401. The response is parsed from the upstream Aconex project document-type fields XML API; all values are returned as strings.","operationId":"getAconexDocumentTypeSchema","parameters":[{"name":"project_id","in":"path","description":"The Aconex project id.","required":true,"schema":{"type":"string","example":"1879048409"}},{"name":"document_type_id","in":"path","description":"The Aconex document type id.","required":true,"schema":{"type":"string","example":"7890"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"hint_text":{"type":"string","description":"The hint text of the field."},"data_type":{"type":"string","description":"The data type of the field (upstream Aconex field `type` attribute, e.g. DATE, BOOLEAN, SINGLE_LINE_TEXT)."},"mandatory_status":{"type":"string","description":"The mandatory status of the field."},"identifier":{"type":"string","description":"The field identifier."},"field_name":{"type":"string","description":"The field name (from the upstream field label)."},"specifications":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"The name of the specification."},"options":{"type":"array","items":{"type":"string"},"description":"The list of options for the specification."}}}}}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"500":{"description":"The upstream Aconex request failed (integration error), rendered as an Evercam error object. The status may mirror the upstream Aconex error status when one is provided.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1users/post/responses/400/content/application~1json/schema"}}}}}}},"/v2/aconex/projects/{project_id}/upload-snapshot":{"post":{"tags":["Aconex"],"summary":"Upload an edited snapshot to Aconex","description":"Upload a client-provided (base64 encoded) snapshot for an Evercam project\ninto the Aconex document register of the given Aconex project.\n\n**Authentication:** Requires a valid Evercam session (password / SSO /\nimpersonation) and a connected Aconex OAuth token. The current user must\nhold the `project-connectors_view` permission on the Evercam project\nidentified by `project_exid`.\n\nIn addition to the fixed fields below, the request body must carry the\nAconex document-register metadata fields for the target project. The set of\naccepted fields (and which are mandatory) is derived at request time from\nthe Aconex document schema of `project_id`; any mandatory schema field that\nis missing results in a `400`.\n\n**Required permission:** `project-connectors_view`\n","operationId":"uploadSnapshotToAconex","x-required-permission":"project-connectors_view","parameters":[{"name":"project_id","in":"path","description":"The Aconex project id (a numeric string used to look up the Aconex document schema).","required":true,"schema":{"type":"string","example":"268435456"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["project_exid","snapshot"],"properties":{"project_exid":{"type":"string","description":"The Evercam project exid used to resolve the target project.","example":"my-site"},"snapshot":{"type":"string","format":"byte","description":"A base64 encoded JPEG snapshot."}},"additionalProperties":{"type":"string","description":"Aconex document-register metadata field, keyed by the field name from the project's Aconex document schema. Mandatory schema fields must be supplied."}}}}},"responses":{"201":{"description":"Snapshot uploaded to Aconex. The response body is empty."},"400":{"$ref":"#/paths/~1v2~1widgets/get/responses/400"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"The Evercam project (`project_exid`) could not be resolved, or the upstream resource was not found.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}},"default":{"description":"Aconex integration error or any other failure. An expired Aconex token\nis deleted server-side. The upstream HTTP status is mirrored when\navailable (defaults to 500).\n","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1users/post/responses/400/content/application~1json/schema"}}}}}}},"/v2/aconex/auth/revoke":{"post":{"tags":["Aconex"],"summary":"Revoke Aconex token.","description":"Revoke (delete) the connected user's stored Aconex OAuth token. Requires an existing Aconex connection; if none exists the request is rejected with 401.","operationId":"revokeAconexToken","responses":{"204":{"description":"Aconex token successfully revoked. Empty body."},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"}}}},"/v2/users/auth/hammertech/connect":{"post":{"tags":["HammerTech"],"summary":"Connect to HammerTech","description":"Authenticate with HammerTech credentials and store the access token for the current user. Connections are scoped per user, so each user connects their own HammerTech account. Reconnecting replaces the user's existing HammerTech token in place — no explicit revoke is required first.","operationId":"connectHammerTech","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["email","password","tenant","region"],"properties":{"email":{"type":"string","format":"email","description":"HammerTech account email address.","example":"user@example.com"},"password":{"type":"string","format":"password","description":"HammerTech account password."},"tenant":{"type":"string","description":"HammerTech tenant identifier (first part of your HammerTech URL).","example":"evercam"},"region":{"type":"string","enum":["us","au","eu"],"description":"Geographic region of your HammerTech instance.","example":"us"}}}}}},"responses":{"204":{"description":"Successfully connected."},"400":{"$ref":"#/paths/~1v2~1widgets/get/responses/400"},"401":{"description":"Invalid HammerTech credentials. If your credentials are correct, verify the selected `region` matches where your HammerTech account is hosted — authenticating against the wrong region fails here."},"422":{"$ref":"#/paths/~1v2~1widgets/get/responses/400"}}}},"/v2/users/auth/hammertech/revoke":{"post":{"tags":["HammerTech"],"summary":"Revoke HammerTech token","description":"Delete the stored HammerTech access token and disconnect the integration.","operationId":"revokeHammerTechToken","responses":{"204":{"description":"Successfully disconnected."},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"}}}},"/v2/hammertech/projects":{"get":{"tags":["HammerTech"],"summary":"List HammerTech projects","description":"Retrieve the list of projects available in the connected HammerTech account.","operationId":"listHammerTechProjects","parameters":[{"name":"skip","in":"query","description":"Number of records to skip (pagination offset).","required":false,"schema":{"type":"integer","minimum":0,"default":0}},{"name":"take","in":"query","description":"Number of records to return (max 100).","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":100}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"HammerTech project ID."},"name":{"type":"string","description":"HammerTech project name."}}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"422":{"$ref":"#/paths/~1v2~1widgets/get/responses/400"}}}},"/v2/hammertech/issue-types":{"get":{"tags":["HammerTech"],"summary":"List HammerTech issue types","description":"Retrieve the list of available issue/observation types in HammerTech.","operationId":"listHammerTechIssueTypes","parameters":[{"name":"project_id","in":"query","description":"Filter issue types by HammerTech project UUID.","required":false,"schema":{"type":"string","format":"uuid"}},{"name":"skip","in":"query","description":"Number of records to skip (pagination offset).","required":false,"schema":{"type":"integer","minimum":0,"default":0}},{"name":"take","in":"query","description":"Number of records to return (max 100).","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":100}},{"name":"include_custom_field_forms","in":"query","description":"When true, each issue type includes its custom field form schema\n(`openIssueCustomFieldForms`). Required if you intend to submit\n`open_issue_custom_field_values` when creating an observation.\n","required":false,"schema":{"type":"boolean","default":false}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"HammerTech issue type ID."},"name":{"type":"string","description":"HammerTech issue type name."}}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"422":{"$ref":"#/paths/~1v2~1widgets/get/responses/400"}}}},"/v2/hammertech/locations":{"get":{"tags":["HammerTech"],"summary":"List HammerTech locations","description":"Retrieve the list of locations defined under a HammerTech project.\n\nLocations form a tree — each item carries a `parentId` pointing at its\nparent location (or `null` for top-level nodes). The response is a flat\narray; clients are expected to assemble the tree client-side using\n`id` / `parentId`.\n","operationId":"listHammerTechLocations","parameters":[{"name":"project_id","in":"query","description":"HammerTech project UUID to fetch locations for.","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"skip","in":"query","description":"Number of records to skip (pagination offset).","required":false,"schema":{"type":"integer","minimum":0,"default":0}},{"name":"take","in":"query","description":"Number of records to return (max 100).","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":100}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"HammerTech location ID."},"name":{"type":"string","description":"HammerTech location name."},"parentId":{"type":"string","format":"uuid","nullable":true,"description":"Parent location ID, or `null` when this is a top-level\nlocation. Use this to assemble the location tree.\n"}}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"422":{"$ref":"#/paths/~1v2~1widgets/get/responses/400"}}}},"/v2/hammertech/issues":{"post":{"tags":["HammerTech"],"summary":"Create a HammerTech observation","description":"Create a new Observation (Issue) in HammerTech with an Evercam snapshot\nattached as a base64-encoded image.\n\nThe snapshot is sent inline in HammerTech's `uploadedFiles` array as part\nof the `POST /Issues` request — no separate file-upload call is needed.\n","operationId":"createHammerTechIssue","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["project_id","issue_type_id","snapshot"],"properties":{"project_id":{"type":"string","format":"uuid","description":"The HammerTech project UUID to create the observation in."},"issue_type_id":{"type":"string","format":"uuid","description":"The HammerTech issue type UUID."},"snapshot":{"type":"string","format":"byte","description":"A base64-encoded JPEG snapshot image to attach to the observation."},"issue_date":{"type":"string","format":"date-time","description":"When the issue occurred. Defaults to the current UTC time if omitted.","example":"2026-05-21T14:00:00Z"},"description":{"type":"string","description":"Description of the observation.","example":"Worker near equipment — AI detection event at camera Gate East."},"priority":{"type":"string","enum":["Low","Medium","High","Critical"],"description":"Priority level of the observation.","example":"High"},"due_date":{"type":"string","format":"date-time","description":"Due date for resolving the observation.","example":"2026-05-28T14:00:00Z"},"classification":{"type":"string","enum":["Undefined","Positive","Negative","Neutral"],"description":"Classification of the observation.","example":"Negative"},"location_id":{"type":"string","format":"uuid","description":"UUID of a HammerTech location within the project."},"is_submitted":{"type":"boolean","description":"Whether to immediately submit the observation. Defaults to false.","default":false},"is_positive_observation":{"type":"boolean","description":"Whether this is a positive safety observation.","default":false},"open_issue_custom_field_form_id":{"type":"string","format":"uuid","description":"The custom field form UUID from the issue type schema\n(`openIssueCustomFieldForms[0].id`). Required when submitting\n`open_issue_custom_field_values`.\n"},"open_issue_custom_field_values":{"type":"array","description":"Custom field values for the observation. Fetch the field schema\nvia `GET /v2/hammertech/issue-types?include_custom_field_forms=true`.\nUse `internalName` (not `id`) to identify fields stably across\nform version changes — resolve the current `id` at submission time.\n","items":{"type":"object","required":["custom_field_id"],"description":"Each item must provide a `value`, a `stored_file_id`, or both (`SignatureWithName` fields send a typed name in `value` plus the signature image in `stored_file_id`).\n","properties":{"custom_field_id":{"type":"string","format":"uuid","description":"The field `id` from the issue type's custom field form (changes on form edits — resolve from current schema)."},"value":{"oneOf":[{"type":"string"},{"type":"boolean"},{"type":"number"},{"type":"array","items":{"type":"string"}}],"description":"The field value. Strings are passed through; booleans and numbers are converted to their string representation (`\"true\"`, `\"123\"`) before being sent to HammerTech as `value`. For multiselect dropdown fields (`MultipleSelectDropdown`), pass an array of strings — the selections are joined with newlines and sent as a single `value` string (e.g. `\"Option A\\nOption B\"`) to support multiple selections. The values must match the field's configured options. HammerTech parses the value according to the field's `customFieldType`.\n"},"stored_file_id":{"type":"string","format":"uuid","description":"For image/file/signature fields (`ImageUpload`, `FileUpload`, `Signature`, `SignatureWithName`), the `id` of a stored file previously created via `POST /v2/hammertech/stored-files`. It is forwarded to HammerTech as `storedFile: { id }`.\n"}}}}}}}}},"responses":{"201":{"description":"Observation created successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The newly created HammerTech issue ID."}}}}}},"400":{"$ref":"#/paths/~1v2~1widgets/get/responses/400"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"422":{"$ref":"#/paths/~1v2~1widgets/get/responses/400"}}}},"/v2/hammertech/stored-files":{"post":{"tags":["HammerTech"],"summary":"Create a HammerTech stored file","description":"Upload a file to HammerTech as a Stored File. The file content is sent\ninline as a base64-encoded string in the `POST /StoredFiles` request — no\nseparate multipart upload is needed.\n\nThe stored file `id` is a UUID. Supply your own to reference the file later\n(for example when attaching it to another record), or omit it to have one\ngenerated automatically. The generated/returned `id` is included in the\nresponse.\n","operationId":"createHammerTechStoredFile","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["base64_file_content"],"properties":{"base64_file_content":{"type":"string","format":"byte","description":"The base64-encoded file content to store."},"file_name":{"type":"string","description":"The name of the file, including its extension.","example":"site-photo.jpg"},"annotation":{"type":"string","description":"An optional annotation/description for the stored file."},"id":{"type":"string","format":"uuid","description":"Optional UUID for the stored file. If omitted, a UUID is generated\nserver-side. Must be a valid UUID when provided.\n"}}}}}},"responses":{"201":{"description":"Stored file created successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","format":"uuid","description":"The stored file UUID (generated if not supplied in the request)."}}}}}},"400":{"$ref":"#/paths/~1v2~1widgets/get/responses/400"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"422":{"$ref":"#/paths/~1v2~1widgets/get/responses/400"}}}},"/v2/oauth2-tokens/providers":{"get":{"tags":["Connected Accounts"],"summary":"OAuth providers","description":"Get the list of oauth providers of the connected user.","operationId":"listOauthProviders","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string"},"login":{"type":"string"},"hostname":{"type":"string"}}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"}}}},"/v2/cameras/{camera_exid}/layers":{"get":{"tags":["Layers"],"summary":"Get all layers","description":"Get all layers for a given camera\n\n**Required permission:** `project-bim_view_view`\n","operationId":"gettAllCameraLayers","x-required-permission":"project-bim_view_view","parameters":[{"$ref":"#/paths/~1v2~1cameras~1{camera_exid}/parameters/0"},{"name":"layer_type","in":"query","required":false,"description":"When provided together with `timestamp`, returns a single layer for the\ngiven type/timestamp instead of the full list.\n","schema":{"type":"string","enum":["mask","measuring_grid","bim_architectural","bim_structural","bim_4d","bim_mep","forge_bim_architectural","forge_bim_structural","forge_bim_4d","forge_bim_mep","bim_mask","recordings_tag","milestone"]}},{"name":"timestamp","description":"When provided together with `layer_type`, returns a single matching layer.\n","in":"query","required":false,"schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"Layer id","example":9620},"name":{"type":"string","description":"Layer name"},"layer_type":{"type":"string","enum":["mask","measuring_grid","bim_architectural","bim_structural","bim_4d","bim_mep","forge_bim_architectural","forge_bim_structural","forge_bim_4d","forge_bim_mep","bim_mask","recordings_tag","milestone"]},"display_name":{"type":"string","description":"Human-friendly display name for the layer","nullable":true},"start_at":{"type":"string","format":"date-time"},"inserted_at":{"type":"string","format":"date-time"},"updated_at":{"type":"string","format":"date-time"}}}},{"$ref":"#/paths/~1v2~1cameras~1{camera_exid}~1layers/post/responses/200/content/application~1json/schema"}]}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"404":{"description":"Camera not found"}}},"post":{"tags":["Layers"],"summary":"Create a layer","description":"Create a new layer\n\n**Required permission:** `project-bim_view_manage`\n","operationId":"createLayer","x-required-permission":"project-bim_view_manage","parameters":[{"$ref":"#/paths/~1v2~1cameras~1{camera_exid}/parameters/0"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","description":"Layer name"},"display_name":{"type":"string","description":"Human-friendly display name for the layer"},"layer_type":{"type":"string","enum":["mask","measuring_grid","bim_architectural","bim_structural","bim_4d","bim_mep","forge_bim_architectural","forge_bim_structural","forge_bim_4d","forge_bim_mep","bim_mask","recordings_tag","milestone"]},"shapes":{"type":"string","format":"binary"},"start_at":{"type":"string","format":"date-time"},"z_index":{"type":"integer","default":0}},"required":["shapes","start_at"]}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","allOf":[{"$ref":"#/paths/~1v2~1cameras~1{camera_exid}~1layers/get/responses/200/content/application~1json/schema/anyOf/0/items"},{"type":"object","properties":{"shapes":{"type":"string","format":"binary"}}}]}}}},"400":{"$ref":"#/paths/~1v2~1logs/post/responses/400"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"404":{"description":"Camera not found"}}}},"/v2/cameras/{camera_exid}/layers/{id}":{"parameters":[{"$ref":"#/paths/~1v2~1cameras~1{camera_exid}/parameters/0"},{"name":"id","in":"path","description":"Layer id","required":true,"schema":{"type":"integer"}}],"get":{"tags":["Layers"],"summary":"Get a layer","description":"Get Layer details\n\n**Required permission:** `project-bim_view_view`\n","operationId":"getLayer","x-required-permission":"project-bim_view_view","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1cameras~1{camera_exid}~1layers/post/responses/200/content/application~1json/schema"}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"404":{"description":"Not found"}}},"put":{"tags":["Layers"],"summary":"Update a layer","description":"Update a layer\n\n**Required permission:** `project-bim_view_manage`\n","operationId":"updateLayer","x-required-permission":"project-bim_view_manage","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1cameras~1{camera_exid}~1layers/post/requestBody/content/application~1json/schema"}}}},"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1cameras~1{camera_exid}~1layers/post/responses/200/content/application~1json/schema"}}}},"400":{"$ref":"#/paths/~1v2~1logs/post/responses/400"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"404":{"description":"Not found"}}},"delete":{"tags":["Layers"],"summary":"Delete a layer","description":"Delete a layer\n\n**Required permission:** `project-bim_view_manage`\n","operationId":"deleteLayer","x-required-permission":"project-bim_view_manage","responses":{"204":{"description":"No Content"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"404":{"description":"Not found"}}}},"/v2/cameras/{camera_exid}/calibrations/current/{timestamp}":{"get":{"tags":["Calibrations"],"summary":"Get current calibration","description":"Get current calibration for a given camera","operationId":"getCurrentCalibration","parameters":[{"$ref":"#/paths/~1v2~1cameras~1{camera_exid}/parameters/0"},{"name":"timestamp","in":"path","required":true,"schema":{"type":"string","format":"date-time"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1cameras~1{camera_exid}~1calibrations/post/responses/201/content/application~1json/schema"}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"404":{"description":"Not found"}}}},"/v2/cameras/{camera_exid}/calibrations":{"get":{"tags":["Calibrations"],"summary":"Get all calibrations","description":"Get all calibrations for a given camera","operationId":"getAllCameraCalibrations","parameters":[{"$ref":"#/paths/~1v2~1cameras~1{camera_exid}/parameters/0"}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/paths/~1v2~1cameras~1{camera_exid}~1calibrations/post/responses/201/content/application~1json/schema"}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"404":{"description":"Not found"}}},"post":{"tags":["Calibrations"],"summary":"Create a calibration","description":"Create a new calibration","operationId":"createCalibration","parameters":[{"$ref":"#/paths/~1v2~1cameras~1{camera_exid}/parameters/0"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"inv_homography":{"type":"array","items":{"type":"array","items":{"type":"number"}}},"camera_matrix":{"type":"array","items":{"type":"array","items":{"type":"number"}}},"dist_coeffs":{"type":"array","items":{"type":"array","items":{"type":"number"}}},"grid_coeffs":{"type":"array","items":{"type":"number"}},"start_at":{"type":"string","format":"date-time"}},"required":["inv_homography","camera_matrix","dist_coeffs","grid_coeffs","start_at"]}}}},"responses":{"201":{"description":"Calibration created","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer"},"inv_homography":{"type":"array","items":{"type":"array","items":{"type":"number"}}},"camera_matrix":{"type":"array","items":{"type":"array","items":{"type":"number"}}},"dist_coeffs":{"type":"array","items":{"type":"array","items":{"type":"number"}}},"grid_coeffs":{"type":"array","items":{"type":"number"}},"start_at":{"type":"string","format":"date-time"}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"404":{"description":"Not found"}}}},"/v2/cameras/{camera_exid}/calibrations/{id}":{"delete":{"tags":["Calibrations"],"summary":"Delete a calibration","description":"Delete a calibration","operationId":"deleteCalibration","parameters":[{"$ref":"#/paths/~1v2~1cameras~1{camera_exid}/parameters/0"},{"name":"id","in":"path","required":true,"schema":{"type":"integer"}}],"responses":{"204":{"description":"No Content"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"404":{"description":"Not found"}}}},"/v2/cameras/{camera_exid}/anpr/{eventid}/thumbnail":{"get":{"tags":["ANPR"],"summary":"Get an ANPR record thumbnail","description":"Get the plate thumbnail image (JPEG) captured for a single ANPR record,\nidentified by its numeric record id. The image is fetched from storage using\nthe record's capture time.\n\n**Required permission:** any role on the camera or its project.\n","operationId":"getCameraAnprRecordThumbnail","x-required-permission":"any_role_on_resource","parameters":[{"$ref":"#/paths/~1v2~1cameras~1{camera_exid}/parameters/0"},{"name":"eventid","in":"path","description":"Numeric id (primary key) of the ANPR record.","required":true,"schema":{"type":"integer"},"example":42}],"responses":{"200":{"description":"The ANPR plate thumbnail image.","content":{"image/jpeg":{"schema":{"type":"string","format":"binary"}}}},"400":{"$ref":"#/paths/~1v2~1widgets/get/responses/400"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"ANPR record or camera not found, or no thumbnail available for the record.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}}}}},"/v2/payments":{"post":{"tags":["Payment"],"summary":"Create payment intent","description":"Create a new payment intent.","operationId":"createPaymentIntent","security":[{}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"amount":{"type":"number","description":"The amount of money to charge, in the currency's major unit (e.g. euros, not cents). Must be a number greater than or equal to 10. It is rounded to 2 decimal places and converted to the smallest currency unit before creating the payment intent.","minimum":10,"example":250},"currency":{"type":"string","description":"The currency (case-insensitive; lowercased before validation).","enum":["eur","gbp","usd","aud"]}},"required":["amount","currency"]}}}},"responses":{"200":{"description":"Client secret","content":{"application/json":{"schema":{"type":"object","properties":{"clientSecret":{"type":"string"}}}}}},"400":{"$ref":"#/paths/~1v2~1logs/post/responses/400"}}}},"/v2/notifications":{"get":{"tags":["Notifications"],"summary":"Get list of notifications","description":"Returns a paginated list of the authenticated user's notifications, ordered by newest first (`inserted_at` descending).","operationId":"listNotifications","parameters":[{"name":"page","in":"query","required":false,"description":"Page number (1-based). Defaults to 1.","schema":{"type":"integer","default":1,"example":1}},{"name":"limit","in":"query","required":false,"description":"Number of items per page. Defaults to 50.","schema":{"type":"integer","default":50,"example":50}},{"name":"sort","in":"query","required":false,"description":"Sort expression in the form `field|direction`, where `direction` is `asc` or `desc`. Allowed fields: `initiator_email`, `target_email`, `type`, `read_timestamp`, `context`, `inserted_at`. Invalid values are ignored (the default order `inserted_at|desc` is kept).","schema":{"type":"string","example":"inserted_at|desc"}}],"responses":{"200":{"description":"Paginated list of notifications","content":{"application/json":{"schema":{"type":"object","required":["items","total","page","limit","from","to"],"properties":{"items":{"type":"array","items":{"$ref":"#/paths/~1v2~1notifications~1{id}/patch/responses/200/content/application~1json/schema"}},"total":{"$ref":"#/paths/~1v2~1widgets/get/responses/200/content/application~1json/schema/properties/total"},"page":{"$ref":"#/paths/~1v2~1company~1kits/get/parameters/0/schema"},"limit":{"$ref":"#/paths/~1v2~1company~1kits/get/parameters/1/schema"},"from":{"$ref":"#/paths/~1v2~1widgets/get/responses/200/content/application~1json/schema/properties/from"},"to":{"$ref":"#/paths/~1v2~1widgets/get/responses/200/content/application~1json/schema/properties/to"}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"}}}},"/v2/notifications/mark-as-read":{"post":{"tags":["Notifications"],"summary":"Mark user's unread notifications as read","description":"Mark all unread notifications of the authenticated user as read and return a message indicating the result.","operationId":"markUnreadNotificationsAsRead","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","description":"The result message indicating the number of notifications marked as read or if none were found.","example":"3 notifications marked as read."}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"}}}},"/v2/notifications/{id}":{"patch":{"tags":["Notifications"],"summary":"Update notification","description":"Update notification read timestamp of given id.","operationId":"updateNotification","parameters":[{"name":"id","in":"path","description":"Notification id","required":true,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","description":"Unique id of notification"},"inserted_at":{"type":"string","description":"Timestamp when notification issued","example":"2023-04-20T09:55:00.297446Z"},"read_timestamp":{"type":"string","example":"2023-04-20T09:55:00.297446Z"},"type":{"type":"string","description":"Notification type","enum":["camera_share","timelapse_created","timelapse_failed","camera_status_changed","drone_processing_done","three_sixty_done","compare_ready","compare_failed","clip_export_ready","clip_export_failed","nvr_clip_ready","nvr_clip_failed","smart_search_export_ready","smart_search_export_failed","ppe_export_ready","ppe_export_failed","gate_report_export_ready","gate_report_export_failed","weather_export_ready","weather_export_failed","upload_complete","upload_failed","storage_warning","comment_mention","other"]},"initiator_id":{"type":"integer","description":"Unique id of initiator"},"initiator_email":{"type":"string","description":"Email of initiator"},"initiator_fullname":{"type":"string","description":"Fullname of initiator"},"target_id":{"type":"integer","description":"Unique id of target"},"target_email":{"type":"string","description":"Email of target"},"target_fullname":{"type":"string","description":"Fullname of target"},"context":{"type":"object","description":"Shape varies by notification `type`. Fields below are the union of keys populated across notification types (e.g. `comment_id`, `content`, `scope`, `label`, `comment_context` and `timestamp` are only present for `comment_mention` notifications).\n","properties":{"camera_exid":{"type":"string"},"project_exid":{"type":"string"},"project_name":{"type":"string"},"camera_name":{"type":"string"},"comment_id":{"type":"integer","description":"Id of the comment that triggered a comment_mention notification"},"content":{"type":"string","description":"HTML content of the comment that triggered a comment_mention notification"},"scope":{"type":"string","description":"Scope of the comment that triggered a comment_mention notification"},"label":{"type":"string","description":"Label of the comment that triggered a comment_mention notification"},"comment_context":{"type":"string","description":"Context of the comment that triggered a comment_mention notification"},"timestamp":{"type":"string","description":"Timestamp of the comment that triggered a comment_mention notification"}}}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"404":{"description":"Notification not found","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}}}}},"/v2/mailing/unsubscribe":{"post":{"summary":"Unsubscribe an email from a mailing source","description":"Public, link-driven unsubscribe endpoint. The `key` is a server-signed token (`Phoenix.Token`) that encodes the email address and the mailing `source` to suppress. If the key is valid and the email is not already suppressed for that source, a suppression record is created.\n\nThe endpoint is idempotent and never leaks whether an email is already suppressed: an invalid/undecodable key OR an already-suppressed pair both return `200` with an empty body, while a newly created suppression returns `201`.","operationId":"unsubscribeMailing","tags":["Mailing"],"security":[{}],"parameters":[{"name":"key","in":"query","required":true,"description":"A `Phoenix.Token`-signed key encoding the `email` and `source` to unsubscribe from. Generated server-side and embedded in outgoing email links.","schema":{"type":"string"}}],"responses":{"200":{"description":"No-op: the key was missing/invalid, or the email is already suppressed for the given source. Body is empty.","content":{"text/plain":{"schema":{"type":"string","example":""}}}},"201":{"description":"A new suppression was created for the email/source pair.","content":{"text/plain":{"schema":{"type":"string","example":"Unsubscribed"}}}}}}},"/v2/projects/{project_exid}/connectors":{"get":{"tags":["Project Connectors"],"summary":"Get all project connectors","description":"Get all project connectors for the selected project.\n**Required permission:** `project-connectors_view`\n","operationId":"getAllProjectConnectors","x-required-permission":"project-connectors_view","parameters":[{"$ref":"#/paths/~1v2~1projects~1{project_exid}/parameters/0"},{"name":"provider","in":"query","required":false,"description":"Filter the returned connectors by connector type (exact match).","schema":{"type":"string","enum":["xweather"]}}],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/paths/~1v2~1projects~1{project_exid}~1xweather~1connect/post/responses/200/content/application~1json/schema"}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"Project not found","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}}}}},"/v2/projects/{project_exid}/snapshots/deliver/email":{"post":{"tags":["Snapshots"],"summary":"Send annotated image via email","description":"Sends an annotated snapshot as an email to the current user and any\nadditional recipients supplied in the request. The current user's own\nemail is always added to the recipient list, so the sender always\nreceives a copy. Recipient addresses are trimmed, blanks are dropped,\nand duplicates are removed.\n","operationId":"sendMarkupImageViaEmail","parameters":[{"name":"project_exid","in":"path","description":"The Evercam project exid.","required":true,"schema":{"type":"string","example":"evercam-construction"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"snapshot":{"type":"string","format":"byte","description":"Base64-encoded JPEG image. It may optionally include a `data:image/jpeg;base64,` or `data:image/jpg;base64,` data URI prefix. Only JPEG images are supported.\n"},"recipients":{"type":"array","items":{"type":"string","format":"email"},"description":"Additional recipient email addresses. The current user is\nalways added to the list and receives a copy regardless of this\nfield.\n"},"message":{"type":"string","description":"Optional message to include in the email body."}},"required":["snapshot"]}}}},"responses":{"200":{"description":"Email sent successfully.","content":{"application/json":{"schema":{"type":"object","description":"An empty object is returned on success.","example":{}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"422":{"description":"The snapshot is missing, cannot be decoded, or is not a JPEG image.\n","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","enum":["snapshot is required","invalid snapshot data","only JPEG images are supported"],"example":"snapshot is required"}}}}}}}}},"/v2/projects/{project_exid}/xweather/connect":{"post":{"tags":["Project Connectors"],"summary":"Connect to xweather","description":"Connect a project to the XWeather (Aeris) provider. The supplied parameters are validated against the XWeather API and, on success, stored as the project's `xweather` connector configuration.\n\n**Required permission:** `project-connectors_view`\n","operationId":"connectXWeatherConnectors","x-required-permission":"project-connectors_view","parameters":[{"$ref":"#/paths/~1v2~1projects~1{project_exid}/parameters/0"},{"name":"station_id","in":"query","required":true,"description":"The station id of the weather station.","schema":{"type":"string"}},{"name":"client_id","in":"query","required":true,"description":"XWeather client id.","schema":{"type":"string"}},{"name":"client_secret","in":"query","required":true,"description":"XWeather client secret.","schema":{"type":"string"}}],"responses":{"200":{"description":"The project was connected to XWeather successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"config":{"type":"object","description":"Connector config"},"provider":{"description":"The connector type","type":"string","enum":["xweather"],"example":"xweather"}}}}}},"400":{"$ref":"#/paths/~1v2~1widgets/get/responses/400"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"}}}},"/v2/projects/{project_exid}/xweather/revoke":{"post":{"tags":["Project Connectors"],"summary":"Disconnect xweather","description":"Disconnects the project from the xweather provider by deleting the stored xweather connector.\n**Required permission:** `project-connectors_view`\n","operationId":"disconnectXWeatherConnectors","x-required-permission":"project-connectors_view","parameters":[{"$ref":"#/paths/~1v2~1projects~1{project_exid}/parameters/0"}],"responses":{"204":{"description":"The xweather connector was deleted successfully. Empty body."},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"No xweather connector exists for this project (the `ensure_connector` plug renders a plain-text body).\n","content":{"text/plain":{"schema":{"type":"string","example":"Connector not found"}}}}}}},"/v2/projects/team-members":{"get":{"tags":["Projects"],"summary":"Get projects team members","description":"Retrieve a list of all projects and team members for a user","operationId":"getProjectsTeamMembers","responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"exid":{"type":"string","description":"project exid"},"name":{"type":"string","description":"project name"},"cameras":{"type":"array","items":{"type":"object","properties":{"exid":{"type":"string","description":"Camera exid"},"name":{"type":"string","description":"Camera name"},"shares":{"type":"array","items":{"type":"object","properties":{"email":{"type":"string","description":"user email"},"fullname":{"type":"string","description":"user full name"},"rights":{"type":"string","example":"list,snapshot,share,edit,full-rights"}}}}}}}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"404":{"description":"not found","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}}}}},"/v2/projects/{project_exid}/contacts":{"parameters":[{"$ref":"#/paths/~1v2~1projects~1{project_exid}/parameters/0"}],"get":{"summary":"Get project contacts","description":"Get the project's Customer Success Manager and Sales Executive (the Zoho CRM\nproject Owner) as contacts, fetched live from Zoho CRM.\n\n**Required permission:** `Any role on the project`\n","operationId":"getProjectContacts","x-required-permission":"Any role on the project","tags":["Projects"],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","description":"Contact full name (Zoho `full_name`).","example":"Jane Doe"},"role":{"type":"string","description":"Contact role, derived from the Zoho project: `Sales Executive` for the project owner, `Customer Success Manager` otherwise.\n","enum":["Sales Executive","Customer Success Manager"],"example":"Customer Success Manager"},"email":{"type":"string","format":"email","example":"jane.doe@evercam.io"},"phone":{"type":"string","nullable":true,"example":"+353 1 234 5678"},"photo":{"type":"string","format":"uri","description":"Zoho contact thumbnail URL."}}}}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"Project not found","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}}}}},"/v2/projects/{project_exid}/camera-inquiry-request":{"parameters":[{"$ref":"#/paths/~1v2~1projects~1{project_exid}/parameters/0"}],"post":{"summary":"Submit a camera product inquiry (\"Request Information\")","description":"Signals that a user is interested in adding an Evercam camera to their project.\nSends a lead email to the project's Account Executive.\n\n**Required permission:** `Any role on the project`\n","operationId":"submitCameraInquiryRequest","x-required-permission":"Any role on the project","tags":["Projects"],"responses":{"200":{"description":"The inquiry was sent.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Your request has been sent."}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"Project not found","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}},"422":{"description":"The project has no Account Executive assigned in Zoho CRM, so the inquiry could not be routed to anyone.\n","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1users/post/responses/400/content/application~1json/schema"}}}},"500":{"description":"The inquiry could not be emailed (mail delivery failure).","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1users/post/responses/400/content/application~1json/schema"}}}}}}},"/v2/developer/apps":{"get":{"tags":["Developer Portal"],"summary":"List OAuth Apps","description":"List all OAuth applications owned by the authenticated user","operationId":"listDeveloperApps","responses":{"200":{"description":"List of OAuth applications","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/paths/~1v2~1developer~1apps~1{client_id}/get/responses/200/content/application~1json/schema"}}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"}}},"post":{"tags":["Developer Portal"],"summary":"Register OAuth App","description":"Register a new OAuth application. The client_id and client_secret are auto-generated. The client_secret is shown ONLY in this response — store it securely.\n","operationId":"createDeveloperApp","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","redirect_uris"],"properties":{"name":{"type":"string","description":"Human-readable application name","example":"My Construction App"},"redirect_uris":{"type":"array","items":{"type":"string"},"description":"Allowed redirect URIs. Must use https:// except for localhost (http://localhost allowed for development).\n","example":["https://myapp.com/callback"]},"scopes":{"type":"array","items":{"type":"string"},"description":"OAuth scopes this client will be allowed to request","example":["user:info","cameras:read"]},"description":{"type":"string","description":"Description of the application"},"logo_url":{"type":"string","description":"URL to the application logo"},"active":{"type":"boolean","description":"Whether the client is active and can request new tokens. Defaults to true.","default":true}}}}}},"responses":{"201":{"description":"OAuth application created. The client_secret is included in this response only.","content":{"application/json":{"schema":{"description":"OAuth client with the client_secret visible (shown only once at creation or secret regeneration)","allOf":[{"$ref":"#/paths/~1v2~1developer~1apps~1{client_id}/get/responses/200/content/application~1json/schema"},{"type":"object","properties":{"client_secret":{"type":"string","description":"The client secret. This is shown ONLY ONCE at creation time or when regenerated. Store it securely — it cannot be retrieved again.\n","example":"evs_abc123def456ghi789"}}}]}}}},"400":{"$ref":"#/paths/~1v2~1widgets/get/responses/400"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"}}}},"/v2/developer/apps/{client_id}":{"get":{"tags":["Developer Portal"],"summary":"Get OAuth App","description":"Get details of an OAuth application owned by the authenticated user","operationId":"getDeveloperApp","parameters":[{"name":"client_id","description":"Public client identifier (e.g. ev_abc123)","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OAuth application details","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","description":"Internal database ID"},"name":{"type":"string","description":"Human-readable application name","example":"My Construction App"},"client_id":{"type":"string","description":"Public client identifier used in OAuth flows","example":"ev_abc123def456"},"redirect_uris":{"type":"array","items":{"type":"string"},"description":"Allowed redirect URIs for authorization callbacks","example":["https://myapp.com/callback","http://localhost:3000/callback"]},"logo_url":{"type":"string","nullable":true,"description":"URL to the application logo (displayed on consent page)","example":"https://myapp.com/logo.png"},"scopes":{"type":"array","items":{"type":"string"},"description":"OAuth scopes this client is allowed to request","example":["user:info","cameras:read","camera:live_view"]},"active":{"type":"boolean","description":"Whether the client is active and can request new tokens"},"description":{"type":"string","nullable":true,"description":"Description of the application","example":"A construction monitoring integration"},"created_at":{"type":"string","format":"date-time","description":"When the client was registered"},"updated_at":{"type":"string","format":"date-time","description":"When the client was last updated"}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"404":{"description":"App not found or not owned by current user","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}}}},"patch":{"tags":["Developer Portal"],"summary":"Update OAuth App","description":"Update an OAuth application owned by the authenticated user","operationId":"updateDeveloperApp","parameters":[{"name":"client_id","description":"Public client identifier","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["name","redirect_uris"],"properties":{"name":{"type":"string","description":"Updated application name (required — the update changeset validates its presence)"},"redirect_uris":{"type":"array","items":{"type":"string"},"description":"Updated redirect URIs"},"scopes":{"type":"array","items":{"type":"string"},"description":"Updated allowed scopes"},"description":{"type":"string","description":"Updated description"},"logo_url":{"type":"string","description":"Updated logo URL"},"active":{"type":"boolean","description":"Enable or disable the application"}}}}}},"responses":{"200":{"description":"OAuth application updated","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1developer~1apps~1{client_id}/get/responses/200/content/application~1json/schema"}}}},"400":{"$ref":"#/paths/~1v2~1widgets/get/responses/400"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"App not found or not owned by current user","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}}}},"delete":{"tags":["Developer Portal"],"summary":"Delete OAuth App","description":"Delete an OAuth application. This will also revoke all active tokens issued to this application.\n","operationId":"deleteDeveloperApp","parameters":[{"name":"client_id","description":"Public client identifier","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"204":{"description":"OAuth application deleted"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"description":"App not found or not owned by current user","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}},"500":{"description":"Failed to delete the client.","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}}}}},"/v2/developer/apps/{client_id}/regenerate-secret":{"post":{"tags":["Developer Portal"],"summary":"Regenerate App Secret","description":"Generate a new client_secret for the OAuth application. The old secret is immediately invalidated. The new secret is shown ONLY in this response — store it securely.\n","operationId":"regenerateDeveloperAppSecret","parameters":[{"name":"client_id","description":"Public client identifier","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"New client secret generated","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1developer~1apps/post/responses/201/content/application~1json/schema"}}}},"400":{"$ref":"#/paths/~1v2~1widgets/get/responses/400"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"404":{"description":"App not found or not owned by current user","content":{"application/json":{"schema":{"$ref":"#/paths/~1v2~1company/get/responses/403/content/application~1json/schema"}}}}}}},"/v2/support/zoho-auth-url":{"post":{"tags":["Support"],"summary":"Generate a Zoho Desk JWT sign-in URL","description":"Signs the authenticated user into the Zoho Desk help center\n(`support.evercam.io`) using Zoho's JWT authentication.\n\nWhen a user clicks \"Sign in\" on the help center, Zoho redirects them to\nthe configured Remote Login URL with a `serviceurl` query parameter.\nThe SPA forwards that `serviceurl` here and redirects the browser to the\nreturned `redirect_url`; Zoho verifies the JWT and lands the user on\n`serviceurl`.\n\nThe JWT is signed with HS256 using `ZOHO_DESK_JWT_SECRET` and carries\n`email`, `first_name`, `last_name`, `nbf`, `exp` (5 minutes) and `jti`\nclaims. Zoho creates the help center user on first sign-in, named from\n`first_name`/`last_name`. The email and name are always taken from the\nbearer token, never the request body, so a user can only ever mint a\nsign-in URL for themselves. Widget credentials are rejected.\n","operationId":"zohoAuthUrl","requestBody":{"required":false,"content":{"application/json":{"schema":{"type":"object","properties":{"serviceurl":{"type":"string","format":"uri","description":"Help center page to return to after sign-in, as received by the Remote Login URL. Must be an `https://support.evercam.io` URL. Defaults to `https://support.evercam.io/portal/en/home`.\n","example":"https://support.evercam.io/portal/en/kb/articles/getting-started"}}}}}},"responses":{"200":{"description":"Zoho Desk JWT sign-in URL","content":{"application/json":{"schema":{"type":"object","properties":{"redirect_url":{"type":"string","format":"uri","description":"Zoho sign-in endpoint with `return_to` and `jwt` query parameters. Redirect the browser to it straight away — the JWT expires after 5 minutes and must not be stored or shared.\n","example":"https://accounts.zohoportal.com/accounts/p/1234/signin/jwt/auth?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJlbWFpbCI6ImpvaG5AZXhhbXBsZS5jb20ifQ.c2lnbmF0dXJl&return_to=https%3A%2F%2Fsupport.evercam.io%2Fportal%2Fen%2Fhome"}}}}}},"400":{"$ref":"#/paths/~1v2~1logs/post/responses/400"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"}}}},"/v2/ring/userinfo":{"get":{"summary":"Get Ring user info","description":"Returns masked account identifier for the authenticated user's Ring account.\nUsed to confirm which Ring account is connected.\n","operationId":"ringUserinfo","tags":["Ring"],"responses":{"200":{"description":"Ring account info","content":{"application/json":{"schema":{"type":"object","properties":{"account_identifier":{"type":"string","description":"Masked email (e.g. j***@example.com)"}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"}}}},"/v2/ring/devices":{"get":{"summary":"List Ring devices","description":"Returns all Ring devices linked to the authenticated user's Ring account,\nenriched with import status (whether each device has been imported as a\ncamera in Evercam).\n\nRequires an active Ring OAuth token for the user.\n","operationId":"listRingDevices","tags":["Ring"],"responses":{"200":{"description":"List of Ring devices","content":{"application/json":{"schema":{"type":"object","properties":{"devices":{"type":"array","items":{"type":"object","properties":{"device_id":{"type":"string"},"name":{"type":"string"},"imported":{"type":"boolean"},"camera_exid":{"type":"string","nullable":true},"project_exid":{"type":"string","nullable":true},"project_name":{"type":"string","nullable":true}}}}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"}}}},"/v2/ring/devices/import":{"post":{"summary":"Import Ring devices as cameras","description":"Imports selected Ring devices as cameras in a given project. Creates camera\nrecords, schedules snapshot workers, and assigns default roles.\n\nRequires an active Ring OAuth token and a `project_exid` query parameter.\n","operationId":"importRingDevices","tags":["Ring"],"parameters":[{"name":"project_exid","in":"query","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["device_ids"],"properties":{"device_ids":{"type":"array","items":{"type":"string"}},"device_names":{"type":"object","description":"Map of device_id to custom camera name","additionalProperties":{"type":"string"}}}}}}},"responses":{"200":{"description":"Imported cameras","content":{"application/json":{"schema":{"type":"object","properties":{"cameras":{"type":"array","items":{"type":"object","properties":{"exid":{"type":"string"},"name":{"type":"string"}}}},"project":{"type":"object","properties":{"exid":{"type":"string"},"name":{"type":"string"}}}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"}}}},"/v2/ring/devices/{camera_exid}":{"delete":{"summary":"Delete Ring device camera","description":"Decommissions a Ring camera imported into Evercam and cancels associated\nsnapshot workers. The camera must be owned by the authenticated user.\n","operationId":"deleteRingDevice","tags":["Ring"],"parameters":[{"name":"camera_exid","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Camera decommissioned","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"camera_exid":{"type":"string"}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"$ref":"#/paths/~1v2~1api-keys~1{id}/patch/responses/404"}}}},"/v2/ring/devices/{camera_exid}/move":{"patch":{"summary":"Move Ring camera to project","description":"Moves a Ring camera to a different project. Both the source and destination\nprojects require `project-settings_manage_project` permission.\n","operationId":"moveRingDevice","tags":["Ring"],"parameters":[{"name":"camera_exid","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["project_exid"],"properties":{"project_exid":{"type":"string"}}}}}},"responses":{"200":{"description":"Camera moved","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"},"camera_exid":{"type":"string"},"project_exid":{"type":"string"}}}}}},"400":{"$ref":"#/paths/~1v2~1oauth~1token/post/responses/400"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"403":{"$ref":"#/paths/~1v2~1cameras/get/responses/403"},"404":{"$ref":"#/paths/~1v2~1api-keys~1{id}/patch/responses/404"}}}},"/v2/ring/devices/{camera_exid}/live":{"post":{"summary":"Start Ring live view session","description":"Starts a WebRTC live view session for a Ring camera using a WHEP SDP offer.\nReturns an SDP answer and ICE servers for WebRTC negotiation.\n\nRequires an active Ring OAuth token.\n","operationId":"startRingLiveView","tags":["Ring"],"parameters":[{"name":"camera_exid","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["sdp_offer"],"properties":{"sdp_offer":{"type":"string","description":"WebRTC SDP offer"}}}}}},"responses":{"200":{"description":"WebRTC session started","content":{"application/json":{"schema":{"type":"object","properties":{"sdp_answer":{"type":"string"},"session_url":{"type":"string"},"ice_servers":{"type":"array","items":{"type":"object"}}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"},"404":{"$ref":"#/paths/~1v2~1api-keys~1{id}/patch/responses/404"}}}},"/v2/ring/devices/{camera_exid}/live/{session_id}":{"delete":{"summary":"Stop Ring live view session","description":"Stops an active Ring WebRTC live view session identified by `session_id`.\n\nRequires an active Ring OAuth token.\n","operationId":"stopRingLiveView","tags":["Ring"],"parameters":[{"name":"camera_exid","in":"path","required":true,"schema":{"type":"string"}},{"name":"session_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Session stopped","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string"}}}}}},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"}}}},"/v2/ring/disconnect":{"post":{"summary":"Disconnect Ring account","description":"Disconnects the user's Ring account: decommissions all Ring cameras,\ncancels snapshot workers, and deletes the stored OAuth token.\n","operationId":"ringDisconnect","tags":["Ring"],"responses":{"204":{"description":"Ring account disconnected"},"401":{"$ref":"#/paths/~1v2~1logs/post/responses/401"}}}}},"components":{"securitySchemes":{"Bearer-Token":{"type":"http","scheme":"bearer","bearerFormat":"JWT"},"Access-Key":{"type":"apiKey","name":"X-ACCESS-KEY","in":"header","description":"Scoped API key (`evk_...`). May also be sent as `Authorization: ApiKey <key>`.\n"},"api_id":{"type":"apiKey","name":"X-API-ID","in":"header","description":"Legacy credential pair, sent together with `X-API-KEY`."},"api_key":{"type":"apiKey","name":"X-API-KEY","in":"header","description":"Legacy credential pair, sent together with `X-API-ID`."},"oauth2":{"type":"oauth2","description":"OAuth 2.0 access token for third-party apps, sent as `Authorization: Bearer <access_token>`. See the OAuth tag for the full flow.\n","flows":{"authorizationCode":{"authorizationUrl":"https://admin-api-keys.staging.media.evercam.io/v2/oauth/authorize","tokenUrl":"https://admin-api-keys.staging.media.evercam.io/v2/oauth/token","refreshUrl":"https://admin-api-keys.staging.media.evercam.io/v2/oauth/token","scopes":{"user:info":"View your name, email and company","profile:write":"Update your profile information","projects:read":"List and view your projects","cameras:read":"List and view your cameras","camera:live_view":"View live camera feeds","camera:recordings":"View and export recordings","camera:ptz":"Control PTZ cameras","project:gate_report":"Access gate reports","project:timeline":"View project timeline","project:media_hub":"Access and manage media hub","project:bim":"Access and manage BIM views","project:drone":"Access and manage drone views","project:360":"Access and manage 360 views","project:planner":"Access and manage planner","project:smart_search":"Access and manage smart search","project:ppe_monitoring":"Access PPE monitoring data","project:weather":"Access weather data","project:video_wall":"View video walls","project:automations":"View automations","project:connectors":"View connectors","project:comments":"Access and manage comments","project:settings":"Access and manage project settings","project:widgets":"View widgets"}}}}}},"tags":[{"name":"Auth","description":"Every protected endpoint needs a credential; a request without a valid one gets\n`401 Unauthorized`. Which credential to use depends on what you are building:\n\n- **Evercam dashboard or internal tooling** — log in through the endpoints below\n  and send the returned JWT as a bearer token. They also cover logout, SSO,\n  impersonation, signup and auth options, and the current user.\n- **Third-party application** — register an app and run the authorization code\n  flow described under **OAuth**, then send the access token as a bearer token.\n- **Scripts and integrations** — issue a scoped API key from the dashboard and\n  send it in the `x-access-key` header.\n\n## Bearer token\n\nBoth kinds of token go in the same header:\n\n```console\ncurl 'https://admin-api-keys.staging.media.evercam.io/v2/cameras' \\\n  -H 'Authorization: Bearer <token>'\n```\n\nA dashboard JWT comes from [`/v2/auth/login`](#operation/login) and carries the\nuser's full permissions. An OAuth access token is additionally limited to the\nscopes the user granted to the app; calling an endpoint outside those scopes\nreturns `403` with `error=\"insufficient_scope\"` in the `WWW-Authenticate` header.\nThe available scopes are listed on the `oauth2` security scheme shown with each\nendpoint.\n\n## API key\n\nScoped API keys are issued from the dashboard and look like `evk_...`. Send one\nin the `x-access-key` header, or as `Authorization: ApiKey <key>`:\n\n```console\ncurl 'https://admin-api-keys.staging.media.evercam.io/v2/cameras' \\\n  -H 'x-access-key: evk_...'\n```\n\nA key carries two restrictions on top of the user's own permissions:\n\n- **Scopes** — each operation is granted by one or more scopes, and the key\n  needs at least one of them.\n- **Projects** — a key is bound to one or more projects. Requests addressing\n  another project return `403`, and list endpoints are filtered down to the\n  key's projects.\n\n**Most of the API is not reachable with an API key at all** and returns\n`403 INSUFFICIENT_SCOPE` — that covers every admin operation and anything\nthat issues or manages credentials. Operations needing no authentication\n(`security: [{}]`) stay reachable. Which operations a scope grants is\ndocumented per operation in a follow-up change.\n\n## API id/key\n\n**Deprecated** — prefer a bearer token. Each user has an API id/key pair, used\nmostly by the impersonation system where an admin runs requests on behalf of a\nuser. Send it in the `X-API-ID` and `X-API-KEY` headers, or as the `api_id` and\n`api_key` query parameters.\n\n## Widget keys\n\nEmbeddable widgets authenticate with the `widget_id` and `widget_key` query\nparameters. A domain-restricted widget only accepts requests whose `Origin`\nmatches its allowed origin. See the **Widgets** tag.\n"},{"name":"OAuth","description":"Evercam is an OAuth 2.0 authorization server. A third-party app gets an access\ntoken for a user with the authorization code flow:\n\n1. **Register an app** with [`createDeveloperApp`](#operation/createDeveloperApp)\n   to get a `client_id` and `client_secret`, and register your redirect URIs.\n2. **Send the user to** [`/v2/oauth/authorize`](#operation/oauthAuthorize) with\n   `response_type=code`, your `client_id` and `redirect_uri`, the space-separated\n   `scope` you need, and a `state` value. Public clients (mobile, SPA) should add\n   a PKCE `code_challenge` with `code_challenge_method=S256`. The user reviews the\n   request on Evercam's consent page.\n3. **Receive the code** — after the user allows access, Evercam redirects to your\n   `redirect_uri` with a `code` (or an `access_denied` error).\n4. **Exchange the code** at [`/v2/oauth/token`](#operation/oauthToken) with\n   `grant_type=authorization_code`, the `code`, `client_id` and `redirect_uri`,\n   plus either your `client_secret` or the PKCE `code_verifier`, as form body\n   parameters.\n5. **Call the API** with `Authorization: Bearer <access_token>`. Calling\n   [`getCurrentUser`](#operation/getCurrentUser) is a quick way to check the token.\n6. **Refresh** before the access token expires (after one hour) by calling\n   `/v2/oauth/token` with `grant_type=refresh_token`. Refresh tokens last 30 days\n   and rotate on every use, so store the new one each time.\n7. **Revoke** tokens you no longer need with\n   [`/v2/oauth/revoke`](#operation/oauthRevoke).\n\nThe available scopes are listed on the `oauth2` security scheme.\n"},{"name":"Developer Portal","description":"Self-service registration and management of OAuth apps"},{"name":"API Keys","description":"Scoped API keys the user issues for programmatic access"},{"name":"Status","description":"System and health-check endpoints"},{"name":"Cameras","description":"All operations related to the management of cameras"},{"name":"Calibrations","description":"Camera calibration operations"},{"name":"Battery","description":"Camera battery readings"},{"name":"NVR","description":"All operations related to NVR"},{"name":"ONVIF","description":"All operations related to ONVIF"},{"name":"Recordings","description":"Browse a camera's recorded snapshot history"},{"name":"Snapshots","description":"Take a live snapshot, upload a snapshot, or deliver an annotated one to external destinations"},{"name":"Timelapses","description":"The timelapse endpoints allow a user to manage timelapses"},{"name":"Compares","description":"All operations related to compares"},{"name":"Layers","description":"All operations related to layers"},{"name":"BIM","description":"All operations related to BIM"},{"name":"Media","description":"All operations related to media"},{"name":"Projects","description":"All operations related to projects, including roles, members and invites"},{"name":"Project Shares","description":"Operations related to sharing projects and project cameras"},{"name":"Project Connectors","description":"Operations related to project third-party connectors (e.g. weather providers)"},{"name":"Companies","description":"All operations related to companies"},{"name":"Users","description":"The users API endpoints allow a user to manage his account details."},{"name":"Automations","description":"Scheduled delivery of live camera snapshots by email or to Procore and Aconex"},{"name":"Weather","description":"Project weather data operations"},{"name":"ANPR","description":"Automatic Number Plate Recognition operations"},{"name":"Video Walls","description":"All operations related to video walls"},{"name":"Widgets","description":"All operations related to embeddable camera widgets"},{"name":"Comments","description":"All operations related to the management of comments"},{"name":"Notifications","description":"User notification operations"},{"name":"Mailing","description":"Mailing related operations"},{"name":"Aconex","description":"All operations related to aconex"},{"name":"Autodesk","description":"All operations related to Autodesk"},{"name":"Procore","description":"All operations related to procore"},{"name":"HammerTech","description":"All operations related to HammerTech"},{"name":"Connected Accounts","description":"Third-party accounts (Procore, Autodesk, …) the current user has connected through OAuth"},{"name":"Ring","description":"Ring video doorbell integration"},{"name":"Payment","description":"All operations related to Payment"},{"name":"Logs","description":"Forward frontend logs into the backend's system logs"},{"name":"Support","description":"Server-side helpers for support-portal integrations (Zoho Desk JWT sign-in)"}],"x-tagGroups":[{"name":"Getting Started","tags":["Versioning","Errors"]},{"name":"Auth","tags":["Auth","OAuth","Developer Portal","API Keys"]},{"name":"Cameras","tags":["Cameras","Calibrations","Battery","NVR","ONVIF","HDDs"]},{"name":"Media","tags":["Recordings","Snapshots","Timelapses","Compares","Layers","BIM","Media"]},{"name":"Projects & Users","tags":["Projects","Project Shares","Project Connectors","Companies","Users"]},{"name":"Automations","tags":["Automations","Weather","ANPR"]},{"name":"Sharing","tags":["Video Walls","Widgets"]},{"name":"Collaboration","tags":["Comments","Notifications","Mailing"]},{"name":"Integrations","tags":["Connected Accounts","Aconex","Autodesk","Procore","HammerTech","Ring","Firebase"]},{"name":"Platform","tags":["Status","Webhooks","Proxy","Payment","Logs","Support"]}]}