This topic describes the API operations for the Link Visual video service.
- Recording plans
- Event-triggered recording plans
- Configure an event-triggered recording plan
- Update an event-triggered recording plan
- Query event-triggered recording plans
- Delete an event-triggered recording plan
- Query the details of an event-triggered recording plan
- Attach an event-triggered recording plan to a device
- Detach an event-triggered recording plan from a device
- Query the event-triggered recording plan of a device
- Query the devices associated with an event-triggered recording plan
- Cloud recordings
- Query cloud recordings by time range
- Obtain the VOD URL of a cloud recording
- Query monthly recordings
- Query events
- Obtain the playback URL of a cloud recording file by event ID
- Delete recordings in a batch
- Download a cloud recording
- Manually trigger a short recording task on a device
- Set the duration for continuous recording files
- Query the duration configuration for continuous recording files
- Cloud storage plans
- Images
- Events
Configure a recording plan
Definition
| path | Version | Description | Requires user identity authentication |
| /vision/customer/record/plan/set | 2.1.0 | Configures a recording plan. When the current time is within the time range of the plan, the service notifies the device to start stream ingest. The length of a single cloud recording file cannot exceed 30 minutes. The plan takes effect only after it is attached to a device. | Yes |
Request parameters
| Parameter | Type | Required | Default value | Description |
| name | String | Yes | The name of the recording plan. | |
| allDay | int | Yes | Specifies whether the recording is an all-day recording.
| |
| timeSectionList | List | Yes | The time segments for recording. This parameter is required when `allDay` is set to 0. | |
| timeZone | int | No | 8 | The UTC time zone. The value ranges from -11 to 12. |
| Parameter | Type | Required | Description | |
| dayOfWeek | int | Yes | The day of the week. 0 indicates Sunday, and 6 indicates Saturday. | |
| begin | int | Yes | The start time of a day in seconds. The value ranges from 0 to 86399. | |
| end | int | Yes | The end time of a day in seconds. The value ranges from 0 to 86399. |
Response parameters
| Parameter | Type | Required | Description |
| planId | String | Yes | The ID of the recording plan. |
Update a recording plan
Definition
| path | Version | Description | Requires user identity authentication |
| /vision/customer/record/plan/update | 2.1.0 | Updates a recording plan. | Yes. The client software development kit (SDK) must enable identity authentication. |
Request parameters
| Parameter | Type | Required | Default value | Description |
| planId | String | Yes | Recording Schedule | |
| name | String | No | The name of the recording plan. | |
| allDay | int | No | Specifies whether the recording is an all-day recording. 0: No. 1: Yes. | |
| timeSectionList | List | No | The time segments for recording. This parameter is required when `allDay` is set to 0. | |
| timeZone | int | No | 8 | The UTC time zone. The value ranges from -11 to 12. |
| Parameter | Type | Required | Description | |
| dayOfWeek | int | Yes | The day of the week. 0 indicates Sunday, and 6 indicates Saturday. | |
| begin | int | Yes | The start time of a day in seconds. The value ranges from 0 to 86399. | |
| end | int | Yes | The end time of a day in seconds. The value ranges from 0 to 86399. |
Response parameters
| Parameter | Type | Required | Description |
| planId | String | Yes | The ID of the recording plan. |
Query a list of recording plans
Description
| path | Version | Description | Requires user identity authentication |
| /vision/customer/record/plan/query | 2.1.0 | Queries a list of recording plans. | Yes. The client SDK must enable identity authentication. |
Request parameters
| Parameter | Type | Required | Default value | Description |
| pageStart | int | No | 0 | The start page number. The value starts from 0. |
| pageSize | int | No | 20 | The number of items on each page. The maximum value is 500. |
| timeZone | int | No | 8 | The UTC time zone. The value ranges from -11 to 12. |
Response parameters
| Parameter Name | Type | Required | Description |
| total | int | Yes | Total |
| currentCount | int | Yes | The number of records returned on the current page. |
| recordPlanList | List | Yes | The list of recording plans. |
- recordPlan
Parameter Type Required Description planId String Yes The ID of the recording plan. name String Yes The name of the recording plan. allDay int Yes Specifies whether the recording is an all-day recording. 0: No. 1: Yes. timeSectionList List Yes The time segments for recording. This parameter is required when `allDay` is set to 0. - timeSection
Parameter Type Required Description dayOfWeek int Yes The day of the week. 0 indicates Sunday, and 6 indicates Saturday. begin int Yes The start time of a day in seconds. The value ranges from 0 to 86399. end int Yes The end time of a day in seconds. The value ranges from 0 to 86399.
Get the details of a recording plan
Description
| path | Version | Description | Requires user identity authentication |
| /vision/customer/record/plan/get | 2.1.0 | Gets the details of a recording plan. | Yes. The client SDK must enable identity authentication. |
Request parameters
| Parameter | Type | Required | Default value | Description |
| planId | String | Yes | The ID of the recording plan. | |
| timeZone | int | No | 8 | The UTC time zone. The value ranges from -11 to 12. |
Response parameters
| Parameter | Type | Required | Description |
| planId | String | Yes | The ID of the recording plan. |
| name | String | Yes | The name of the recording plan. |
| allDay | int | Yes | Specifies whether the recording is an all-day recording. 0: No. 1: Yes. |
| timeSectionList | List | Yes | The time segments for recording. This parameter is required when `allDay` is set to 0. |
| Parameter | Type | Required | Description |
| dayOfWeek | int | Yes | The day of the week. 0 indicates Sunday, and 6 indicates Saturday. |
| begin | int | Yes | The start time of a day in seconds. The value ranges from 0 to 86399. |
| end | int | Yes | The end time of a day in seconds. The value ranges from 0 to 86399. |
Delete a recording plan
Definition
| path | Version | Description | Requires user identity authentication |
| /vision/customer/record/plan/delete | 2.0.0 | Deletes a recording plan. | Yes. The client SDK must enable identity authentication. |
Request parameters
| Parameter | Type | Required | Default value | Description |
| planId | String | Yes | The ID of the recording plan. |
Response parameters
None.Attach a recording plan to a device
Definition
| path | Version | Description | Requires user identity authentication |
| /vision/customer/record/plan/bind | 2.0.0 | Attaches a recording plan to a device. After the plan is attached, the device records videos according to the plan. You must enable cloud storage for the device. | Yes. The client SDK must enable identity authentication. |
Request parameters
| Parameter | Type | Required | Default value | Description |
| planId | String | Yes | The ID of the recording plan. | |
| iotId | String | Yes | The ID of the device. | |
| streamType | int | No | 0 | The stream type. 0: major stream. 1: minor stream. |
Response parameters
None.Detach a recording plan from a device
Description
| path | Version | Description | Requires user identity authentication |
| /vision/customer/record/plan/unbind | 2.0.0 | Detaches a recording plan from a device. After the plan is detached, the device stops recording. | Yes. The client SDK must enable identity authentication. |
Request parameters
| Parameter | Type | Required | Default value | Description |
| iotId | String | Yes | The ID of the device. | |
| streamType | int | No | 0 | The stream type. 0: major stream. 1: minor stream. |
Response parameters
None.Query the attached recording plan by device ID
Definition
| path | Version | Description | Requires user identity authentication |
| /vision/customer/record/plan/getbyiotid | 2.1.0 | Queries the recording plan that is attached to a device by the device ID. | Yes. The client SDK must enable identity authentication. |
Request parameters
| Parameter | Type | Required | Default value | Description |
| iotId | String | Yes | The ID of the device. | |
| streamType | int | No | 0 | The stream type. 0: major stream. 1: minor stream. |
| timeZone | int | No. 8 | 8 | The UTC time zone. The value ranges from -11 to 12. |
Response parameters
| Parameter | Type | Required | Description |
| planId | String | Yes | The ID of the recording plan. |
| name | String | Yes | The name of the recording plan. |
| allDay | int | Yes | Specifies whether the recording is an all-day recording. 0: No. 1: Yes. |
| timeSectionList | List | Yes | The time segments for recording. This parameter is required when `allDay` is set to 0. |
| Parameter | Type | Required | Description |
| dayOfWeek | int | Yes | The day of the week. 0 indicates Sunday, and 6 indicates Saturday. |
| begin | int | Yes | The start time of a day in seconds. The value ranges from 0 to 86399. |
| end | int | Yes | The end time of a day in seconds. The value ranges from 0 to 86399. |
Query the list of devices attached to a recording plan
Description
| path | Version | Description | Requires user identity authentication |
| /vision/customer/record/plan/bind/device/query | 2.0.0 | Queries the list of devices to which this recording plan is attached. | Yes. The client SDK must enable identity authentication. |
Request parameters
| Parameter | Type | Required | Default value | Description |
| planId | String | Yes | The ID of the recording plan. | |
| pageStart | int | No | 0 | The start page number. The value starts from 0. |
| pageSize | int | No | 20 | The page size. The maximum value is 500. |
Response parameters
| Parameter | Type | Required | Description |
| total | int | Yes | Total |
| currentCount | int | Yes | Column Count on Current Page |
| deviceList | List | Yes | The list of devices. |
| Parameter | Type | Required | Description |
| iotId | String | Yes | The ID of the device. |
| streamType | int | Yes | The stream type. 0: major stream. 1: minor stream. |
Configure an event-triggered recording plan
Definition
| path | Version | Description | Requires user identity authentication |
| /vision/customer/eventrecord/plan/set | 2.1.0 | Configures an event-triggered recording plan. If a device reports an event that occurs within the time range of the plan, the service notifies the device to start stream ingest and saves the stream as a cloud recording. The plan takes effect only after it is attached to a device. | Yes. The client SDK must enable identity authentication. |
Request parameters
| Parameter | Type | Required | Default value | Description |
| name | String | Yes | Plan Name | |
| preRecordDuration | int | No | 0 | The pre-recording duration in seconds. |
| recordDuration | int | Yes | The total recording duration in seconds. This includes the pre-recording duration. | |
| allDay | int | Yes | Specifies whether the recording is an all-day recording. 0: No. 1: Yes. | |
| eventTypeList | List | Yes | The list of event types. 1: motion detection. | |
| timeSectionList | List | Yes | The time segments for recording. This parameter is required when `allDay` is set to 0. | |
| timeZone | int | No | 8 | The UTC time zone. The value ranges from -11 to 12. |
| Parameter | Type | Required | Description |
| dayOfWeek | int | Yes | The day of the week. 0 indicates Sunday, and 6 indicates Saturday. |
| begin | int | Yes | The start time of a day in seconds. The value ranges from 0 to 86399. |
| end | int | Yes | The end time of a day in seconds. The value ranges from 0 to 86399. |
Response parameters
| Parameter | Type | Required | Description |
| planId | String | Yes | The ID of the event-triggered recording plan. |
Update an event-triggered recording plan
Definition
| path | Version | Description | Requires user identity authentication |
| /vision/customer/eventrecord/plan/update | 2.1.0 | Updates an event-triggered recording plan. | Yes. The client SDK must enable identity authentication. |
Request parameters
| Parameter | Type | Required | Default value | Description |
| planId | String | Yes | The ID of the event-triggered recording plan. | |
| name | String | No | The name of the event-triggered recording plan. | |
| preRecordDuration | int | No | 0 | The pre-recording duration in seconds. |
| recordDuration | int | No | The total recording duration in seconds. This includes the pre-recording duration. | |
| allDay | int | No | Specifies whether the recording is an all-day recording. 0: No. 1: Yes. | |
| eventTypeList | List | No | The list of event types. 1: motion detection. | |
| timeSectionList | List | No | The time segments for recording. This parameter is required when `allDay` is set to 0. | |
| timeZone | int | No | 8 | The UTC time zone. The value ranges from -11 to 12. |
| Parameter | Type | Required | Description |
| dayOfWeek | int | Yes | The day of the week. 0 indicates Sunday, and 6 indicates Saturday. |
| begin | int | Yes | The start time of a day in seconds. The value ranges from 0 to 86399. |
| end | int | Yes | The end time of a day in seconds. The value ranges from 0 to 86399. |
Response parameters
None.Query a list of event-triggered recording plans
Description
| path | Version | Description | Requires user identity authentication |
| /vision/customer/eventrecord/plan/query | 2.1.0 | Queries a list of event-triggered recording plans. | Yes. The client SDK must enable identity authentication. |
Request parameters
| Parameter | Type | Required | Default value | Description |
| pageStart | int | No | 0 | The start page number. The value starts from 0. |
| pageSize | int | No | 20 | The page size. The maximum value is 500. |
| timeZone | int | No | 8 | The UTC time zone. The value ranges from -11 to 12. |
Response parameters
| Parameter | Type | Required | Description |
| total | int | Yes | Total |
| currentCount | int | Yes | Columns on the current page |
| eventRecordPlanList | List | Yes | The list of event-triggered recording plans. |
- eventRecordPlan
Parameter Type Required Description planId String Yes The ID of the event-triggered recording plan. name String Yes The name of the event-triggered recording plan. preRecordDuration int Yes The pre-recording duration in seconds. recordDuration int Yes The total recording duration in seconds. This includes the pre-recording duration. allDay int Yes Specifies whether the recording is an all-day recording. 0: No. 1: Yes. eventTypeList List Yes The list of event types. 1: motion detection. timeSectionList List Yes The time segments for recording. This parameter is required when `allDay` is set to 0. - timeSection
Parameter Type Required Description dayOfWeek int Yes The day of the week. 0 indicates Sunday, and 6 indicates Saturday. begin int Yes The start time of a day in seconds. The value ranges from 0 to 86399. end int Yes The end time of a day in seconds. The value ranges from 0 to 86399.
Delete an event-triggered recording plan
Definition
| path | Version | Description | Requires user identity authentication |
| /vision/customer/eventrecord/plan/delete | 2.0.0 | Deletes an event-triggered recording plan. | Yes. The client SDK must enable identity authentication. |
Request parameters
| Parameter | Type | Required | Default value | Description |
| planId | String | Yes | The ID of the event-triggered recording plan. |
Response parameters
None.Get the details of an event-triggered recording plan
Definition
| path | Version | Description | Requires user identity authentication |
| /vision/customer/eventrecord/plan/getbyid | 2.1.0 | Gets the details of an event-triggered recording plan. | Yes. The client SDK must enable identity authentication. |
Request parameters
| Parameter | Type | Required | Default value | Description |
| planId | String | Yes | The ID of the event-triggered recording plan. | |
| timeZone | int | No | 8 | The UTC time zone. The value ranges from -11 to 12. |
Response parameters
| Parameter | Type | Required | Description |
| planId | String | Yes | The ID of the event-triggered recording plan. |
| name | String | Yes | The name of the event-triggered recording plan. |
| preRecordDuration | int | Yes | The pre-recording duration in seconds. |
| recordDuration | int | Yes | The total recording duration in seconds. This includes the pre-recording duration. |
| allDay | int | Yes | Specifies whether the recording is an all-day recording. 0: No. 1: Yes. |
| eventTypeList | List | Yes | The list of event types. 1: motion detection. |
| timeSectionList | List | Yes | The time segments for recording. This parameter is required when `allDay` is set to 0. |
| Parameter | Type | Required | Description |
| dayOfWeek | int | Yes | The day of the week. 0 indicates Sunday, and 6 indicates Saturday. |
| begin | int | Yes | The start time of a day in seconds. The value ranges from 0 to 86399. |
| end | int | Yes | The end time of a day in seconds. The value ranges from 0 to 86399. |
Attach an event-triggered recording plan to a device
Definition
| path | Version | Description | Requires user identity authentication |
| /vision/customer/eventrecord/plan/device/bind | 2.0.0 | Attaches an event-triggered recording plan to a device. You must enable cloud storage for the device. | Yes. The client SDK must enable identity authentication. |
Request parameters
| Parameter | Type | Required | Default value | Description |
| planId | String | Yes | The ID of the event-triggered recording plan. | |
| iotId | String | Yes | The ID of the device. | |
| streamType | int | No | 0 | The stream type. 0: major stream. 1: minor stream. |
Response parameters
None.Detach an event-triggered recording plan from a device
Description
| path | Version | Description | Requires user identity authentication |
| /vision/customer/eventrecord/plan/unbind | 2.0.0 | Detaches an event-triggered recording plan from a device. | Yes. The client SDK must enable identity authentication. |
Request parameters
| Parameter | Type | Required | Default value | Description |
| iotId | String | Yes | The ID of the device. | |
| streamType | int | No | 0 | The stream type. 0: major stream. 1: minor stream. |
Response parameters
None.Query the event-triggered recording plan by device ID
Definition
| path | Version | Description | Requires user identity authentication |
| /vision/customer/eventrecord/plan/getbyiotid | 2.1.0 | Queries the event-triggered recording plan by device ID. | Yes. The client SDK must enable identity authentication. |
Request parameters
| Parameter | Type | Required | Default value | Description |
| iotId | String | Yes | The ID of the device. | |
| streamType | int | No | The stream information. 0: major stream. 1: minor stream. | |
| timeZone | int | No | 8 | The UTC time zone. The value ranges from -11 to 12. |
Response parameters
| Parameter | Type | Required | Description |
| planId | String | Yes | The ID of the event-triggered recording plan. |
| name | String | Yes | The name of the event-triggered recording plan. |
| preRecordDuration | int | Yes | The pre-recording duration in seconds. |
| recordDuration | int | Yes | The total recording duration in seconds. This includes the pre-recording duration. |
| allDay | int | Yes | Specifies whether the recording is an all-day recording. 0: No. 1: Yes. |
| eventTypeList | List | Yes | The list of event types. 1: motion detection. |
| timeSectionList | List | Yes | The time segments for recording. This parameter is required when `allDay` is set to 0. |
| Parameter | Type | Required | Description |
| dayOfWeek | int | Yes | The day of the week. 0 indicates Sunday, and 6 indicates Saturday. |
| begin | int | Yes | The start time of a day in seconds. The value ranges from 0 to 86399. |
| end | int | Yes | The end time of a day in seconds. The value ranges from 0 to 86399. |
Query the list of devices associated with an event-triggered recording plan
Description
| path | Version | Description | Requires user identity authentication |
| /vision/customer/eventrecord/bind/device/query | 2.0.0 | Queries the list of devices that are associated with an event-triggered recording plan. | Yes. The client SDK must enable identity authentication. |
Request parameters
| Parameter | Type | Required | Default value | Description |
| planId | String | Yes | The ID of the event-triggered recording plan. | |
| pageStart | int | No | 0 | The start page number. The value starts from 0. |
| pageSize | int | No | 20 | The number of items on each page. The maximum value is 500. |
Response parameters
| Parameter | Type | Required | Description |
| total | int | Yes | Total |
| currentCount | int | Yes | Number of columns on the current page |
| deviceList | List | Yes | The list of devices. |
| Parameter | Type | Required | Description |
| iotId | String | Yes | The ID of the device. |
| streamType | int | Yes | The stream type. 0: major stream. 1: minor stream. |
Query a list of cloud recordings by time range
Definition
| path | Version | Description | Requires user identity authentication |
| /vision/customer/record/query | 2.1.3 | Queries the list of cloud recording files within a specified time range. Paged query is supported. You can use the `fileName` in the returned list to get the playback URL. | Yes. The client SDK must enable identity authentication. |
Request parameters
| Parameter | Type | Required | Default value | Description |
| iotId | String | Yes | The ID of the device. | |
| streamType | int | No | 0 | The stream type. 0: major stream. 1: minor stream. |
| beginTime | int | Yes | The start time of the query. The value is the number of seconds that have elapsed since January 1, 1970. | |
| endTime | int | Yes | The end time of the query. The value is the number of seconds that have elapsed since January 1, 1970. | |
| recordType | int | No | 99 (All) | The recording type. 0: scheduled recording. 1: alert recording. 2: manual recording. |
| pageStart | int | No | 0 | The start page number. The value starts from 0. |
| pageSize | int | No | 20 | The number of items on each page. The maximum value is 500. |
| needSnapshot | boolean | No | false | Specifies whether to generate a thumbnail for the video recording. |
Response parameters
| Parameter | Type | Required | Description |
| recordFileList | List | Yes | The list of cloud recording files. |
| nextValid | boolean | Yes | Indicates whether the next page is valid. |
| nextBeginTime | int | Yes | The start time for the next page. |
recordFileList:
| Parameter | Type | Required | Description |
| beginTime | String | Yes | The start time of the file in the yyyy-MM-dd HH:mm:ss format. |
| endTime | String | Yes | The end time of the file in the yyyy-MM-dd HH:mm:ss format. |
| beginTimeUTC | String | Yes | The UTC start time of the file in the yyyy-MM-ddTHH:mm:ssZ format. |
| endTimeUTC | String | Yes | The UTC end time of the file in the yyyy-MM-ddTHH:mm:ssZ format. |
| recordType | int | Yes | The recording type. 0: scheduled recording. 1: alert recording. 2: manual recording. |
| streamType | int | Yes | The stream type. 0: major stream. 1: minor stream. |
| fileName | String | Yes | The name of the file. |
| fileSize | int | Yes | The size of the file. |
| snapshotUrl | String | No | URL of the recording thumbnail |
| intelligentTypeList | String | No | The list of intelligent events. |
Get the VOD URL for a cloud recording
Definition
| path | Version | Description | Requires user identity authentication |
| /vision/customer/vod/getbyfilename | 2.0.0 | Gets the playback URL for a device's cloud recording by filename. | Yes. The client SDK must enable identity authentication. |
Request parameters
| Parameter | Type | Required | Description |
| iotId | String | Yes | The ID of the device. |
| fileName | String | Yes | The name of the file, which is returned by the recording query operation. |
Response parameters
| Parameter | Type | Description |
| vodUrl | String | The video-on-demand (VOD) URL. The URL includes authentication information and can be used only once. |
Query monthly recordings
Definition
| path | Version | Description | Requires user identity authentication |
| /vision/customer/monthrecord/query | 2.0.0 | Queries whether a device has cloud storage recordings for each day of a specific month. | Yes. The client SDK must enable identity authentication. |
Request parameters
| Parameter | Type | Required | Default value | Description |
| iotId | String | Yes | The ID of the device. | |
| month | String | Yes | The month in the yyyyMM format, such as 201806. |
Response parameters
| Parameter | Type | Required | Description |
| recordFlags | String | Yes | A string with a length equal to the number of days in the month. Each character represents a day and indicates whether a recording exists for that day. |
Query a list of events
Description
| path | Version | Description | Requires user identity authentication |
| /vision/customer/event/query | 2.1.2 | Queries a list of events. | Yes. The client SDK must enable identity authentication. |
Request parameters
| Parameter | Type | Required | Description |
| iotId | String | Yes | The ID of the device. |
| beginTime | long | Yes | The start time of the query. The value is the number of milliseconds that have elapsed since January 1, 1970. |
| endTime | long | Yes | The end time of the query. The value is the number of milliseconds that have elapsed since January 1, 1970. |
| eventType | int | No | The event type. 0: all. 1: motion detection. |
| pictureType | int | No | The image type. 0: all (default). 1: original image. 2: thumbnail. |
| pageStart | int | No | The start page number. The value starts from 0. |
| pageSize | int | No | The page size. The default value is 20. |
Response parameters
| Parameter | Type | Required | Description |
| eventList | List | Yes | The list of events. |
| nextValid | boolean | Yes | Indicates whether the next page is valid. |
| nextBeginTime | int | Yes | The start time for the next page. |
| Parameter | Type | Required | Description |
| eventId | String | Yes | The ID of the event. If an event-triggered recording plan is in effect, you can use the event ID to get the playback URL of the cloud recording. |
| eventTime | String | Yes | The time when the event occurred, in the yyyy-MM-ss HH:mm:ss format. |
| eventType | int | Yes | The event type. 1: motion detection. |
| eventDesc | String | Yes | The description of the event. |
| eventPicId | String | Yes | The ID of the image associated with the event. |
| eventData | String | Yes | Additional information about the event. |
| eventTimeUTC | String | Yes | The UTC time when the event occurred, in the yyyy-MM-ssTHH:mm:ssZ format. |
| eventPicUrl | String | No | The URL of the alert event image. |
| eventPicThumbUrl | String | No | The URL of the alert event thumbnail. |
| intelligentTypeList | String | No | The list of intelligent events. 3 indicates human detection. |
Get the playback URL of a cloud recording file by event ID
Definition
| path | Version | Description | Requires user identity authentication |
| /vision/customer/vod/getbyeventid | 2.1.0 | Gets the playback URL of a cloud recording file by event ID. You must configure an effective event-triggered recording plan for the device in advance. | Yes. The client SDK must enable identity authentication. |
Request parameters
| Parameter | Type | Required | Description |
| iotId | String | Yes | Device ID |
| eventId | String | Yes | The ID of the event. |
Response parameters
| Parameter | Type | Required | Description |
| vodList | List | Yes | The playlist. |
| Parameter | Type | Required | Description |
| fileName | String | Yes | The name of the file. |
| vodUrl | String | Yes | The playback URL. |
| beginTime | String | Yes | The start time of the file in the yyyy-MM-dd HH:mm:ss format. |
| endTime | String | Yes | The end time of the file in the yyyy-MM-dd HH:mm:ss format. |
| beginTimeUTC | String | Yes | The UTC start time of the file in the yyyy-MM-ddTHH:mm:ssZ format. |
| endTimeUTC | String | Yes | The UTC end time of the file in the yyyy-MM-ddTHH:mm:ssZ format. |
Delete recordings in a batch
Description
| path | Version | Description | Requires user identity authentication |
| /vision/customer/record/batchdelete | 2.0.0 | Deletes recordings in a batch. | Yes. The client SDK must enable identity authentication. |
Request parameters
| Parameter | Type | Required | Default value | Description |
| iotId | String | Yes | The ID of the device. | |
| fileNameList | List | Yes | The list of recording filenames. You can delete a maximum of 100 files at a time. |
Response parameters
| Parameter | Type | Required | Description |
| deletedCount | int | Yes | The number of files that were successfully deleted. |
Download a cloud recording
Definition
| path | Version | Description | Requires user identity authentication |
| /vision/customer/vod/cloudfile/get | 2.1.0 | Requests the download URL for a cloud recording. The cloud recording must be transcoded to the MP4 format. This process is time-consuming. The application needs to poll this operation to get the progress. | Yes. The client SDK must enable identity authentication. |
Request parameters
| Parameter | Type | Required | Description |
| iotId | String | Yes | The ID of the device. |
| fileName | String | Yes | The name of the recording file. |
Response parameters
| Parameter | Type | Required | Description |
| url | String | Yes | The download URL for the cloud recording. If the recording is being transcoded, the URL is empty. After the transcoding is successful, the URL is returned. |
| status | int | Yes | The transcoding status of the recording. 0: success. 1: transcoding. -1: transcoding failed. |
| progress | int | Yes | The transcoding progress of the recording, as a percentage from 0 to 100. |
Manually trigger a short recording task on a device
Description
| path | Version | Description | Requires user identity authentication |
| /vision/customer/record/trigger | 2.1.0 | Triggers a device to start stream ingest. The stream is uploaded as an event-triggered recording and stored in the cloud. You must configure an event-triggered recording plan and enable cloud storage for the device in advance. | Yes. The client SDK must enable identity authentication. |
Request parameters
| Parameter | Type | Required | Description |
| iotId | String | Yes | The ID of the device. |
| recordDuration | int | Yes | The recording length in seconds. The maximum value is 1800. |
| streamType | int | No | The stream type. 0: major stream (default). 1: minor stream. |
| preRecordDuration | int | No | The pre-recording duration in seconds. |
Response parameters
| Parameter | Type | Required | Description |
| recordId | String | Yes | The ID of the cloud recording. |
Set the duration of continuous recording files
Description
| path | Version | Description | Requires user identity authentication |
| /vision/customer/record/durationconfig/set | 1.0.0 | Sets the duration of continuous recording files. | Yes. The client SDK must enable identity authentication. |
Request parameters
| Parameter | Type | Required | Description |
| iotId | String | Yes | The ID of the device. |
| recordDuration | int | No | The duration of a continuous recording file in seconds. The value must be between 600 and 3600. The default value is 1800. |
Response parameters
NoneQuery the duration configuration of continuous recording files
Definition
| path | Version | Description | Requires user identity authentication |
| /vision/customer/record/durationconfig/get | 1.0.0 | Queries the duration configuration of continuous recording files. | Yes. The client SDK must enable identity authentication. |
Request parameters
| Parameter | Type | Required | Default value | Description |
| iotId | String | Yes | None | The ID of the device. |
Response parameters
| Parameter | Type | Required | Description |
| recordDuration | int | Yes | The duration configuration for continuous recording. |
Query the details of a complimentary cloud storage plan
Description
| path | Version | Description | Requires user identity authentication |
| /vision/customer/cloudstorage/presented/get | 2.1.2 | Queries the details of a complimentary cloud storage plan. | Yes. The client SDK must enable identity authentication. |
Request parameters
| Parameter | Type | Required | Default value | Description |
| iotId | String | Yes | The ID of the device. |
Response parameters
| Parameter | Type | Required | Description |
| type | int | Yes | The type of the cloud storage plan. 1: continuous. 2: event-based. |
| lifecycle | int | Yes | The storage period of data in the cloud. Valid values: 1, 3, 7, and 30. Unit: days. |
| months | int | Yes | The validity period of the cloud storage service, starting from 1. Unit: months. |
| consumed | int | Yes | Specifies whether the plan has been claimed. 0: not claimed. 1: claimed. |
| startTime | String | No | The start time in the yyyy-MM-dd HH:mm:ss format. |
| endTime | String | No | The end time in the yyyy-MM-dd HH:mm:ss format. |
| expired | int | Yes | Specifies whether the plan has expired. 0: not expired. 1: expired. |
| startTimeUTC | String | No | The UTC start time in the yyyy-MM-ddTHH:mm:ssZ format. |
| endTimeUTC | String | No | The UTC end time in the yyyy-MM-ddTHH:mm:ssZ format. |
Claim a complimentary cloud storage plan
Definition
| path | Version | Description | Requires user identity authentication |
| /vision/customer/cloudstorage/presented/consume | 2.1.3 | Claims a complimentary cloud storage plan. | Yes. The client SDK must enable identity authentication. |
Request parameters
| Parameter | Type | Required | Description |
| iotId | String | Yes | The ID of the device. |
| enableDefaultPlan | boolean | No | Specifies whether to set a 7x24 default plan. The default value is false. |
Response parameters
| Parameter | Type | Required | Description |
| type | int | Yes | The type of the cloud storage plan. 0: event-based. 1: continuous. |
| lifecycle | int | Yes | The storage period of data in the cloud. Valid values: 1, 3, 7, and 30. Unit: days. |
| months | int | Yes | The validity period of the cloud storage service, starting from 1. Unit: months. |
| consumed | int | Yes | Specifies whether the plan has been claimed. 0: not claimed. 1: claimed. |
| startTime | String | No | The start time in the yyyy-MM-dd HH:mm:ss format. |
| endTime | String | No | The end time in the yyyy-MM-dd HH:mm:ss format. |
| expired | int | Yes | Expired |
| startTimeUTC | String | Yes | The UTC start time in the yyyy-MM-ddTHH:mm:ssZ format. |
| endTimeUTC | String | Yes | The UTC end time in the yyyy-MM-ddTHH:mm:ssZ format. |
Manually capture an image
Definition
| path | Version | Description | Requires user identity authentication |
| /vision/customer/picture/trigger | 2.0.0 | Triggers a device to capture an image and upload it to the cloud. | Yes. The client SDK must enable identity authentication. |
Request parameters
| Parameter | Type | Required | Description |
| iotId | String | Yes | The ID of the device. |
Response parameters
| Parameter | Type | Required | Description |
| pictureId | String | Yes | The ID of the image. |
Query a list of images by time
Definition
| path | Version | Description | Requires user identity authentication |
| /vision/customer/picture/querybytime | 2.1.1 | Queries a list of images by time. | Yes. The client SDK must enable identity authentication. |
Request parameters
| Parameter | Type | Required | Description |
| iotId | String | Yes | Device ID |
| startTime | long | Yes | The start time. The value is the number of milliseconds that have elapsed since January 1, 1970. |
| endTime | long | Yes | The end time. The value is the number of milliseconds that have elapsed since January 1, 1970. |
| pageStart | int | No | The start page. The value starts from 0. |
| pageSize | int | No | The number of items on each page. The maximum value is 100. The default value is 20. |
| type | int | No | The image type. 0: all (default). 1: original image. 2: thumbnail. |
| source | int | No | The image source. 0: all (default). 1: alert image capture. 2: manual image capture. 3: other. |
Response parameters
| Parameter | Type | Required | Description |
| pictureList | List | Yes | The list of images. |
| Parameter | Type | Required | Description |
| iotId | String | Yes | The ID of the device. |
| pictureId | String | Yes | The ID of the image. |
| pictureTime | String | Yes | The creation time of the image. |
| pictureUrl | String | Yes | The URL of the image. |
| thumbUrl | String | Yes | The URL of the image thumbnail. |
| pictureTimeUTC | String | Yes | The UTC creation time of the image. |
| eventType | int | Yes | The event type. |
| source | int | Yes | The image source. 0: all (default). 1: alert image capture. 2: manual image capture. 3: other. |
| intelligentTypeList | int | No | The list of intelligent events. |
Get image URLs by a list of image IDs
Definition
| path | Version | Description | Requires user identity authentication |
| /vision/customer/picture/querybyids | 2.1.0 | Gets image URLs by a list of image IDs. | Yes. The client SDK must enable identity authentication. |
Request parameters
| Parameter | Type | Required | Description |
| iotId | String | Yes | The ID of the device. |
| pictureIdList | List | Yes | The list of image IDs. |
| type | int | No | The image type. 0: all (default). 1: original image. 2: thumbnail. |
Response parameters
| Parameter | Type | Required | Description |
| pictureList | List | Yes | The list of images. |
| Parameter | Type | Required | Description |
| iotId | String | Yes | The ID of the device. |
| pictureId | String | Yes | The ID of the image. |
| pictureTime | String | Yes | The creation time of the image. |
| pictureUrl | String | Yes | The URL of the image. |
| thumbUrl | String | Yes | Image thumbnail URL |
| pictureTimeUTC | String | Yes | The UTC creation time of the image. |
Delete images in a batch
Definition
| path | Version | Description | Requires user identity authentication |
| /vision/customer/picture/batchdelete | 2.0.0 | Deletes images in a batch. | Yes. The client SDK must enable identity authentication. |
Request parameters
| Parameter | Type | Required | Description |
| iotId | String | Yes | Device ID |
| pictureIdList | List | Yes | The list of image IDs. |
Response parameters
| Parameter | Type | Required | Description |
| deleteCount | int | Yes | Successful deletion count |
Set the message push interval for business events
Definition
| path | Version | Description | Requires user identity authentication |
| /vision/customer/bizevent/config/set | 1.0.0 | Sets the message push interval for business events. | Yes. The client SDK must enable identity authentication. |
Request parameters
| Parameter | Type | Required | Description |
| iotId | String | Yes | The ID of the device. |
| eventType | int | Yes | The business event type. 1: detection alert event. 2: cloud storage expiration reminder event. |
| eventInterval | int | No | The message push interval for business events in seconds. The default value is 120 seconds, which means that after a message is pushed, no more messages are pushed for 120 seconds. |
Response parameters
NoneQuery the message push interval for business events
Description
| path | Version | Description | Requires user identity authentication |
| /vision/customer/bizevent/config/get | 1.0.0 | Queries the message push interval for business events. | Yes |
Request parameters
| Parameter | Type | Required | Description |
| iotId | String | Yes | The ID of the device. |
| eventType | int | Yes | The business event type. 1: detection alert event. 2: cloud storage expiration reminder event. |
Response parameters
eventConfig| Parameter | Type | Required | Description |
| eventType | int | Yes | The business event type. |
| eventInterval | int | Yes | The message push interval for business events. |
Query images by event ID
Description
| path | Version | Description | Requires user identity authentication |
| /vision/customer/pic/getbyevent | 2.1.0 | Queries images by event ID. | Yes |
Request parameters
| Parameter | Type | Required | Description |
| iotId | String | Yes | The ID of the device. |
| eventIds | Array | Yes | The list of event IDs. |
Response parameters
pictureList| Parameter | Type | Description |
| iotId | String | The ID of the device. |
| eventId | String | The ID of the event. |
| pictureTime | String | The creation time of the image. |
| alarmPicId | String | The ID of the image. |
| picUrl | String | The URL of the image. |
| thumbUrl | String | The URL of the thumbnail. |
| pictureTimeUTC | String | The UTC creation time of the image. |
Query the details of events in a batch by event ID
Definition
| path | Version | Description | Requires user identity authentication |
| /vision/customer/event/query/byeventids | 1.0.0 | Queries the details of events in a batch by event ID. | Yes. The client SDK must enable identity authentication. |
Request parameters
| Parameter | Type | Required | Description |
| iotId | String | Yes | The ID of the device. |
| eventIds | List | Yes | The list of event IDs. |
| needAlarmPicture | boolean | No | Specifies whether to query the alert image corresponding to the event. The default value is false. |
| needRecordSnapshot | boolean | No | Specifies whether to query the recording thumbnail corresponding to the event. The default value is false. |
Response parameters
| Parameter | Type | Description |
| eventId | String | The ID of the event. |
| eventType | int | The event type. |
| eventTime | String | The event time. |
| eventTimeUTC | String | The UTC event time. |
| eventPicId | String | The ID of the image corresponding to the event. |
| eventPicUrl | String | The URL of the image corresponding to the event. |
| eventPicThumbUrl | String | The URL of the thumbnail of the image corresponding to the event. |
| eventFileName | String | The name of the recording corresponding to the event. |
| recordSnapshotUrl | String | The URL of the recording thumbnail corresponding to the event. |