Go to documentation repository
By default, the archive is exported in mp4 format. You can change the format using the ExportContainerFormat registry key (see Registry keys reference guide). The export of the archive in H.264 or MPEG4 formats is supported.
POST http://IP-address:port/createarchivetask
| Code Block | ||
|---|---|---|
| ||
Content Type: application/json Content: { "CameraId": "{CameraId}", "From": "{From}", "To": "{To}", "Format":"format" } |
Parameter | Required | Description |
|---|---|---|
| CameraId | Yes | Camera ID |
| From | Yes | The start time of the archive fragment in the UTC format: YYYY-MM-DDTHH:MM:SS |
| To | No | The end time of the archive fragment in the UTC format: YYYY-MM-DDTHH:MM:SS (if not specified, the entire archive will be given to the last record) |
| Format | No | The format to which the archive will be exported. Format options: mp4, avi, flv, mov, asf. If the format is not specified in the request body, then the value of the ExportContainerFormat registry key is used (see Registry keys reference guide). If the key is not specified, then the archive is exported in mp4 format |
POST http://127.0.0.1:80/createarchivetask
| Code Block | ||
|---|---|---|
| ||
Content Type: application/json Content: { "CameraId": "1", "From": "20162022-06-27T15:10:00.00Z", "To": "20162022-06-27T15:20:00.00Z" } |
In The response will contain the export folder (C:\Users\User\Documents, by default), a folder is created with an export request ID in its name (request identifier (in the example below, it is 084b56a5-bd49-4327-82db-9bc911f7ff96), which must be used in the example below). Inside the folder there is a file in mp4 formatthe request to get the export status and download the file. Also, a folder with a temporary file will be created in the path C:\Users\User\Documents, and the name of this folder will contain the export task identifier.
| Code Block | ||
|---|---|---|
| ||
{
"CameraId" : "1",
"From" : "2016-06-27T15:10:00.00Z",
"To" : "2016-06-27T15:20:00.00Z",
"ArchiveTaskId" : "084b56a5-bd49-4327-82db-9bc911f7ff96",
"ErrorMessage" : null,
"State" : "Created"
} |
Parameter | Description |
|---|---|
| CameraId | Camera ID |
| From | The start time of the archive fragment in the UTC format: YYYY-MM-DDTHH:MM:SS |
| To | The end time of the archive fragment in the UTC format: YYYY-MM-DDTHH:MM:SS |
| ArchiveTaskId | Task ID |
| ErrorMessage | Error messages |
| State | Task creation result |
...