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:
| ||||
"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:
| ||||
"IsCurrent": INTEGER | Is this the current recording sequence or not. 1 means true and 0 means false. | ||||
} | |||||
] | |||||
} |
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.
Device HTTP API, v1.0
Copyright (c) 2016.