Skip to content

Archive API

Archive API is a separate API for working with a specific camera’s archive. Access credentials are returned by GET /v1/cameras/{cameraId} in the archiveApiUrl and archiveApiToken fields.

Archive API does not use X-Integration-Key. Instead, add the signature and exp values from archiveApiToken as query parameters to every request URL.

URL template:

{archiveApiUrl}?signature={archiveApiToken.signature}&exp={archiveApiToken.exp}

Example:

https://faceter-archive-api-server/archives/{archiveId}/preview?signature=3a1a3cfc&exp=1761376683

The timeline, index.m3u8, and size methods share the same parameters:

ParameterTypeDescription
startnumber(double)interval start
durationnumber(double)interval duration

The preview method uses a time parameter instead — a specific point in time.


Returns information about archive availability over the specified time range.

GET /archives/{archiveId}/timeline
ParameterTypeDescription
archiveIduuidarchive identifier
startnumber(double)interval start
durationnumber(double)interval duration

Response 200:

[
{ "time": 1712745600000, "duration": 60000, "offset": 0 }
]
FieldTypeDescription
timeint64interval start time
durationint64interval duration
offsetint64offset

Returns an M3U8 playlist for playing back archive video with an HLS player.

GET /archives/{archiveId}/index.m3u8
ParameterTypeDescription
archiveIduuidarchive identifier
startnumber(double)interval start
durationnumber(double)interval duration
discontinuitybooleanadd EXT-X-DISCONTINUITY tags for gaps

Response 200 — M3U8 text file (application/vnd.apple.mpegurl):

#EXTM3U
#EXT-X-VERSION:3
#EXTINF:6.000,
segment1.ts
#EXTINF:6.000,
segment2.ts

Response 404:

{ "status": 404, "code": "PlaylistNotFound", "description": "Archive playlist was not found" }

Returns the size (in bytes) of the archive for the specified time range.

GET /archives/{archiveId}/size
ParameterTypeDescription
archiveIduuidarchive identifier
startnumber(double)interval start
durationnumber(double)interval duration

Response 200:

{ "size": 10485760 }
FieldTypeDescription
sizeint64archive size in bytes

Returns a JPEG image from the archive at the specified point in time.

GET /archives/{archiveId}/preview
ParameterTypeDescription
archiveIdstringarchive identifier
timenumber(double)point in time

Response 200 — JPEG image (image/jpeg).

Response 404ProblemDetails:

{
"type": "about:blank",
"title": "Not Found",
"status": 404,
"detail": "Preview not found",
"instance": "/archives/{archiveId}/preview"
}