Skip to content

Integration API Methods

Checks whether the provided Integration Key is valid.

POST /v1/integration-key/validate
HeaderTypeRequiredDescription
X-Integration-Keystringyesintegration key

Example:

Окно терминала
curl -X POST \
"https://cloud.faceter.cam/integration-api/v1/integration-key/validate" \
-H "X-Integration-Key: YOUR_INTEGRATION_KEY"

Response 200:

{ "isValid": true }
FieldTypeDescription
isValidbooleanwhether the key is valid

Returns complete information about a specific camera.

GET /v1/cameras/{cameraId}
ParameterTypeDescription
cameraIduuidcamera identifier

Example:

Окно терминала
curl -X GET \
"https://cloud.faceter.cam/integration-api/v1/cameras/3fa85f64-5717-4562-b3fc-2c963f66afa6" \
-H "X-Integration-Key: YOUR_INTEGRATION_KEY"

Response 200:

{
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"deviceId": "1fa85f64-5717-4562-b3fc-2c963f66afb1",
"title": "Entrance Camera",
"previewUrl": "https://example.com/preview.jpg",
"archiveApiToken": { "signature": "string", "exp": 1712745600 },
"archiveApiUrl": "https://archive.example.com",
"archiveDays": 30,
"liveRtspUrl": "rtsp://example.com/live",
"liveHlsUrl": "https://example.com/live.m3u8",
"isOnline": true,
"lastOnlineDate": "2026-04-10T09:00:00Z",
"cameraModel": "Model X",
"platform": "Embedded",
"serialNumber": "ABC123",
"firmwareVersion": "1.0.0",
"applicationVersion": "2.1.0",
"isOwner": true,
"isFullAccess": true,
"isArchiveGranted": true,
"isAudioGranted": true,
"tempAccessExpiryDate": "2026-04-20T09:00:00Z",
"location": {
"id": "loc-1",
"title": "Main Office",
"room": { "id": "room-1", "title": "Hall" }
}
}
FieldTypeDescription
iduuidcamera identifier
deviceIduuiddevice identifier
titlestringcamera name
previewUrlstringpreview URL
archiveApiTokenobjectArchive API token
archiveApiToken.signaturestringtoken signature
archiveApiToken.expint64token expiry in Unix time
archiveApiUrlstringArchive API base URL
archiveDaysintegerarchive depth in days
liveRtspUrlstringlive stream RTSP URL
liveHlsUrlstringlive stream HLS URL
isOnlinebooleancamera is online
lastOnlineDatedatetimelast online timestamp
cameraModelstringcamera model
platformstringEmbedded / ThirdParty / Mobile
serialNumberstringserial number
firmwareVersionstringfirmware version
applicationVersionstringapp version
isOwnerbooleanuser is the owner
isFullAccessbooleanfull access granted
isArchiveGrantedbooleanarchive access granted
isAudioGrantedbooleanaudio access granted
tempAccessExpiryDatedatetimetemporary access expiry
location.idstringlocation identifier
location.titlestringlocation name
location.room.idstringroom identifier
location.room.titlestringroom name

Errors: 404 Not Found


Returns all cameras available to the integration.

GET /v1/cameras

Example:

Окно терминала
curl -X GET \
"https://cloud.faceter.cam/integration-api/v1/cameras" \
-H "X-Integration-Key: YOUR_INTEGRATION_KEY"

Response 200 — array of objects, each with the same structure as GET /v1/cameras/{cameraId}.


Returns camera events with optional filtering.

GET /v1/cameras/{cameraId}/events

Query parameters:

ParameterTypeDescription
eventTypesarray[string]list of event types
startDatedatetimeperiod start
endDatedatetimeperiod end
mergeIntervalintegerevent merge interval
limitintegermaximum number of records
sortOrderstringNone / Asc / Desc

Event types: Motion, Human, Vehicle, LineCrossing, Intrusion, PeopleCounting, LicensePlate, Pet, PersonalMobilityVehicle, Face, Custom

Example:

Окно терминала
curl -G \
"https://cloud.faceter.cam/integration-api/v1/cameras/3fa85f64-5717-4562-b3fc-2c963f66afa6/events" \
-H "X-Integration-Key: YOUR_INTEGRATION_KEY" \
--data-urlencode "startDate=2026-04-01T00:00:00Z" \
--data-urlencode "endDate=2026-04-10T00:00:00Z" \
--data-urlencode "eventTypes=Motion" \
--data-urlencode "sortOrder=Desc" \
--data-urlencode "limit=100"

Response 200:

{
"items": [
{
"id": "7fa85f64-5717-4562-b3fc-2c963f66afa1",
"cameraId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"type": "Motion",
"startTime": "2026-04-10T08:00:00Z",
"endTime": "2026-04-10T08:01:00Z",
"previewUrl": "https://example.com/event-preview.jpg",
"mergedEventsCount": 2,
"attributes": [{ "confidence": "0.98" }]
}
],
"hasMore": false
}

Errors: 400 Bad Request, 404 Not Found


Creates a new event for the camera.

POST /v1/cameras/{cameraId}/events
Content-Type: multipart/form-data

The request body is sent as multipart/form-data. Text values are sent as separate form fields, while snapshot and objectSnapshot are sent as binary files.

Form fields:

FieldTypeDescription
eventIduuidevent identifier
startDatedatetimeevent start date in UTC, ISO 8601
endDatedatetime, nullableevent end date in UTC, ISO 8601
eventTypestringevent type
instantbooleaninstant-event flag
grid.rowsintegernumber of grid rows
grid.colsintegernumber of grid columns
grid.cellsint64, repeated fieldgrid cell values; each value is sent as a separate grid.cells field
attributes[key]stringadditional attribute, where key is the attribute name
snapshotbinary file, nullableevent snapshot, up to 5 MB
objectSnapshotbinary file, nullableobject snapshot, up to 5 MB

If grid is sent, grid.rows and grid.cols must be greater than zero and grid.cells must not be empty. Keys and values in attributes must not be empty.

Example:

Окно терминала
curl -X POST \
"https://cloud.faceter.cam/integration-api/v1/cameras/<cameraId>/events" \
-H "X-Integration-Key: YOUR_INTEGRATION_KEY" \
--form 'eventId=7fa85f64-5717-4562-b3fc-2c963f66afa1' \
--form 'startDate=2026-04-10T08:00:00Z' \
--form 'endDate=2026-04-10T08:01:00Z' \
--form 'eventType=Motion' \
--form 'instant=false' \
--form 'grid.rows=3' \
--form 'grid.cols=3' \
--form 'grid.cells=1' \
--form 'grid.cells=0' \
--form 'grid.cells=0' \
--form 'grid.cells=1' \
--form 'grid.cells=1' \
--form 'grid.cells=0' \
--form 'grid.cells=0' \
--form 'grid.cells=0' \
--form 'grid.cells=1' \
--form 'attributes[confidence]=0.98' \
--form 'snapshot=@./event.jpg;type=image/jpeg' \
--form 'objectSnapshot=@./object.jpg;type=image/jpeg'

Do not set the Content-Type header manually — curl adds the required boundary itself.

Response 204 — the event is accepted, no response body.

Errors:

CodeReason
400 Bad Requestinvalid form fields, an empty file, a file over 5 MB, or invalid event parameters
404 Not Foundcamera not found or not available to the integration
429 Too Many Requeststhe limit of 10 event-creation requests per second is exceeded; the wait time is returned in the Retry-After header

Returns available recording intervals for a camera.

GET /v1/cameras/{cameraId}/recordings

Response 200:

[{ "startDate": "2026-04-10T08:00:00Z", "durationSeconds": 300 }]
FieldTypeDescription
startDatedatetimerecording start
durationSecondsintegerduration in seconds

Errors: 404 Not Found


Returns a video clip from the archive for the given interval.

GET /v1/cameras/{cameraId}/archive/clip
ParameterTypeDescription
startDatedatetimeclip start
durationint64duration in seconds

Example:

Окно терминала
curl -G \
"https://cloud.faceter.cam/integration-api/v1/cameras/3fa85f64-5717-4562-b3fc-2c963f66afa6/archive/clip" \
-H "X-Integration-Key: YOUR_INTEGRATION_KEY" \
--data-urlencode "startDate=2026-04-10T08:00:00Z" \
--data-urlencode "duration=60" \
-o clip.mp4

Response 200 — binary video file.

Errors: 400 Bad Request, 404 Not Found


Creates an asynchronous archive export task.

POST /v1/cameras/{cameraId}/archive/exports

Request Body:

{
"startDate": "2026-04-10T08:00:00Z",
"durationSeconds": 120,
"audioEnabled": true,
"callbackUrl": "https://example.com/webhook"
}
FieldTypeDescription
startDatedatetimeexport interval start
durationSecondsint32duration in seconds
audioEnabledbooleaninclude audio
callbackUrlstringcallback URL when done

Response 202:

{ "exportId": "9fa85f64-5717-4562-b3fc-2c963f66afa2", "status": "Queued" }

Errors: 400 Bad Request, 404 Not Found, 500 Server Error


GET /v1/cameras/{cameraId}/archive/exports/{exportId}

Response 200:

{
"exportId": "9fa85f64-5717-4562-b3fc-2c963f66afa2",
"status": "Completed",
"videoUrl": "https://example.com/archive.mp4",
"previewUrl": "https://example.com/archive-preview.jpg",
"errorMessage": null,
"createdAtUtc": "2026-04-10T08:00:00Z",
"completedAtUtc": "2026-04-10T08:02:00Z"
}

Errors: 403 Forbidden, 404 Not Found, 500 Server Error


POST /v1/cameras/{cameraId}/exports/audio

Request Body:

{
"startDate": "2026-04-10T08:00:00Z",
"durationSeconds": 120,
"callbackUrl": "https://example.com/webhook"
}

Response 202:

{ "exportId": "afa85f64-5717-4562-b3fc-2c963f66afa3", "status": "Queued" }

Errors: 400 Bad Request, 404 Not Found, 500 Server Error


GET /v1/cameras/{cameraId}/exports/audio/{exportId}

Response 200:

{
"exportId": "afa85f64-5717-4562-b3fc-2c963f66afa3",
"status": "Completed",
"audioUrl": "https://example.com/audio.mp3",
"errorMessage": null,
"createdAtUtc": "2026-04-10T08:00:00Z",
"completedAtUtc": "2026-04-10T08:02:00Z"
}

Errors: 403 Forbidden, 404 Not Found, 500 Server Error


SortOrder: None · Asc · Desc

CameraPlatform: Embedded · ThirdParty · Mobile

ClientsEventType: Motion · Human · Vehicle · LineCrossing · Intrusion · PeopleCounting · LicensePlate · Pet · PersonalMobilityVehicle · Face · Custom