getRecordList.lua
[INDEX]

ABSTRACT

Get the recording files list in a disk

ARGUMENTS

HTTP Arguments submit: GET; POST

Test this API over HTTP - (URL):

Device
STRING (MUST)

Which disk device to get recording list, specify the device identifier (Please refer getDisks.lua)

Test value:

Stream
STRING

Optional.Specify which stream to get recording list. If no specified or be empty, that means get all streams.

main

Main stream

sub

Sub stream

all

All streams

Test value:

RETURNS

Return a JSON style result. The JSON format is:

{
/*OBJECT*/

"Result":
NUMBER

200 means OK, other error code meanings are similar to HTTP Response.

"Status":
"STRING"

Status message. Responsing result status of API executive, if there errors, it will describe reasons.

"Data": [
/*ARRAY*/

An array, each item is a record sequence information.

{
/*OBJECT*/

"Stream":
"STRING"

Current sequence is related to which stream:

main

Main stream

sub

Sub stream

"RecordDevice":
"STRING"

This sequence is recorded in which device

"SequenceID":
"STRING"

The sequence ID.

Each time start a recording, it creates a new sequence, so this is the unique ID of the sequence. Because the recording may separate into multiple files, so a sequence can contain one or more files.
"RecordPath":
"STRING"

Recording path. This path is mapped to a HTTP accessable directory. (Please see the notes)

"Files": [
/*ARRAY*/

An array to contain all files info in current sequence. Each item is:

{
/*OBJECT*/

"Filename":
"STRING"

File name

"Size":
INTEGER

File size in KB

}
]
"TotalSize":
INTEGER

The total size of current sequence, in KB

"TotalDuration":
INTEGER

The total duration of current sequence, in seconds

"StartTime":
"STRING"

The start record time of current sequence, the format is "yyyy-mm-dd hh:nn:ss"

"Format":
"STRING"

File format:

ts

TS

mp4

MP4 (Unsupport for current version)

"IsCurrent":
INTEGER

Is this the current recording sequence or not. 1 means true and 0 means false.

}
]
}

NOTES

The full path of a recording file is "RecordPath/Filename". e.g. RecordPath = /media/usb/sda1/RECORD/M-20170611-150311-0001 and file name is REC00000001.ts, so the full path is "/media/usb/sda1/RECORD/M-20170611-150311-0001/REC00000001.ts", this is HTTP accessable, you can get (download) it by this path.

OTHER NOTES

KILOVIEW Device HTTP API, v1.0