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.
Authentication
Section titled “Authentication”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=1761376683Time Range Parameters
Section titled “Time Range Parameters”The timeline, index.m3u8, and size methods share the same parameters:
| Parameter | Type | Description |
|---|---|---|
| start | number(double) | interval start |
| duration | number(double) | interval duration |
The preview method uses a time parameter instead — a specific point in time.
Archive Timeline
Section titled “Archive Timeline”Returns information about archive availability over the specified time range.
GET /archives/{archiveId}/timeline| Parameter | Type | Description |
|---|---|---|
| archiveId | uuid | archive identifier |
| start | number(double) | interval start |
| duration | number(double) | interval duration |
Response 200:
[ { "time": 1712745600000, "duration": 60000, "offset": 0 }]| Field | Type | Description |
|---|---|---|
| time | int64 | interval start time |
| duration | int64 | interval duration |
| offset | int64 | offset |
HLS Archive Playlist
Section titled “HLS Archive Playlist”Returns an M3U8 playlist for playing back archive video with an HLS player.
GET /archives/{archiveId}/index.m3u8| Parameter | Type | Description |
|---|---|---|
| archiveId | uuid | archive identifier |
| start | number(double) | interval start |
| duration | number(double) | interval duration |
| discontinuity | boolean | add 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.tsResponse 404:
{ "status": 404, "code": "PlaylistNotFound", "description": "Archive playlist was not found" }Archive Size
Section titled “Archive Size”Returns the size (in bytes) of the archive for the specified time range.
GET /archives/{archiveId}/size| Parameter | Type | Description |
|---|---|---|
| archiveId | uuid | archive identifier |
| start | number(double) | interval start |
| duration | number(double) | interval duration |
Response 200:
{ "size": 10485760 }| Field | Type | Description |
|---|---|---|
| size | int64 | archive size in bytes |
Archive Preview
Section titled “Archive Preview”Returns a JPEG image from the archive at the specified point in time.
GET /archives/{archiveId}/preview| Parameter | Type | Description |
|---|---|---|
| archiveId | string | archive identifier |
| time | number(double) | point in time |
Response 200 — JPEG image (image/jpeg).
Response 404 — ProblemDetails:
{ "type": "about:blank", "title": "Not Found", "status": 404, "detail": "Preview not found", "instance": "/archives/{archiveId}/preview"}