Link Visual video service

更新时间:
复制 MD 格式

This topic describes the API operations for the Link Visual video service.

Configure a recording plan

Definition

pathVersionDescriptionRequires user identity authentication
/vision/customer/record/plan/set2.1.0Configures 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

ParameterTypeRequiredDefault valueDescription
nameStringYesThe name of the recording plan.
allDayintYesSpecifies whether the recording is an all-day recording.
  • 0: Not an all-day item
  • All day
timeSectionListListYesThe time segments for recording. This parameter is required when `allDay` is set to 0.
timeZoneintNo8The UTC time zone. The value ranges from -11 to 12.
timeSection
ParameterTypeRequiredDescription
dayOfWeekintYesThe day of the week. 0 indicates Sunday, and 6 indicates Saturday.
beginintYesThe start time of a day in seconds. The value ranges from 0 to 86399.
endintYesThe end time of a day in seconds. The value ranges from 0 to 86399.

Response parameters

ParameterTypeRequiredDescription
planIdStringYesThe ID of the recording plan.

Update a recording plan

Definition

pathVersionDescriptionRequires user identity authentication
/vision/customer/record/plan/update2.1.0Updates a recording plan.Yes. The client software development kit (SDK) must enable identity authentication.

Request parameters

ParameterTypeRequiredDefault valueDescription
planIdStringYesRecording Schedule
nameStringNoThe name of the recording plan.
allDayintNoSpecifies whether the recording is an all-day recording. 0: No. 1: Yes.
timeSectionListListNoThe time segments for recording. This parameter is required when `allDay` is set to 0.
timeZoneintNo8The UTC time zone. The value ranges from -11 to 12.
timeSection
ParameterTypeRequiredDescription
dayOfWeekintYesThe day of the week. 0 indicates Sunday, and 6 indicates Saturday.
beginintYesThe start time of a day in seconds. The value ranges from 0 to 86399.
endintYesThe end time of a day in seconds. The value ranges from 0 to 86399.

Response parameters

ParameterTypeRequiredDescription
planIdStringYesThe ID of the recording plan.

Query a list of recording plans

Description

pathVersionDescriptionRequires user identity authentication
/vision/customer/record/plan/query2.1.0Queries a list of recording plans.Yes. The client SDK must enable identity authentication.

Request parameters

ParameterTypeRequiredDefault valueDescription
pageStartintNo0The start page number. The value starts from 0.
pageSizeintNo20The number of items on each page. The maximum value is 500.
timeZoneintNo8The UTC time zone. The value ranges from -11 to 12.

Response parameters

Parameter NameTypeRequiredDescription
totalintYesTotal
currentCountintYesThe number of records returned on the current page.
recordPlanListListYesThe list of recording plans.
  • recordPlan
    ParameterTypeRequiredDescription
    planIdStringYesThe ID of the recording plan.
    nameStringYesThe name of the recording plan.
    allDayintYesSpecifies whether the recording is an all-day recording. 0: No. 1: Yes.
    timeSectionListListYesThe time segments for recording. This parameter is required when `allDay` is set to 0.
  • timeSection
    ParameterTypeRequiredDescription
    dayOfWeekintYesThe day of the week. 0 indicates Sunday, and 6 indicates Saturday.
    beginintYesThe start time of a day in seconds. The value ranges from 0 to 86399.
    endintYesThe end time of a day in seconds. The value ranges from 0 to 86399.

Get the details of a recording plan

Description

pathVersionDescriptionRequires user identity authentication
/vision/customer/record/plan/get2.1.0Gets the details of a recording plan.Yes. The client SDK must enable identity authentication.

Request parameters

ParameterTypeRequiredDefault valueDescription
planIdStringYesThe ID of the recording plan.
timeZoneintNo8The UTC time zone. The value ranges from -11 to 12.

Response parameters

ParameterTypeRequiredDescription
planIdStringYesThe ID of the recording plan.
nameStringYesThe name of the recording plan.
allDayintYesSpecifies whether the recording is an all-day recording. 0: No. 1: Yes.
timeSectionListListYesThe time segments for recording. This parameter is required when `allDay` is set to 0.
timeSection
ParameterTypeRequiredDescription
dayOfWeekintYesThe day of the week. 0 indicates Sunday, and 6 indicates Saturday.
beginintYesThe start time of a day in seconds. The value ranges from 0 to 86399.
endintYesThe end time of a day in seconds. The value ranges from 0 to 86399.

Delete a recording plan

Definition

pathVersionDescriptionRequires user identity authentication
/vision/customer/record/plan/delete2.0.0Deletes a recording plan.Yes. The client SDK must enable identity authentication.

Request parameters

ParameterTypeRequiredDefault valueDescription
planIdStringYesThe ID of the recording plan.

Response parameters

None.

Attach a recording plan to a device

Definition

pathVersionDescriptionRequires user identity authentication
/vision/customer/record/plan/bind2.0.0Attaches 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

ParameterTypeRequiredDefault valueDescription
planIdStringYesThe ID of the recording plan.
iotIdStringYesThe ID of the device.
streamTypeintNo0The stream type. 0: major stream. 1: minor stream.

Response parameters

None.

Detach a recording plan from a device

Description

pathVersionDescriptionRequires user identity authentication
/vision/customer/record/plan/unbind2.0.0Detaches 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

ParameterTypeRequiredDefault valueDescription
iotIdStringYesThe ID of the device.
streamTypeintNo0The stream type. 0: major stream. 1: minor stream.

Response parameters

None.

Query the attached recording plan by device ID

Definition

pathVersionDescriptionRequires user identity authentication
/vision/customer/record/plan/getbyiotid2.1.0Queries the recording plan that is attached to a device by the device ID.Yes. The client SDK must enable identity authentication.

Request parameters

ParameterTypeRequiredDefault valueDescription
iotIdStringYesThe ID of the device.
streamTypeintNo0The stream type. 0: major stream. 1: minor stream.
timeZoneintNo. 88The UTC time zone. The value ranges from -11 to 12.

Response parameters

ParameterTypeRequiredDescription
planIdStringYesThe ID of the recording plan.
nameStringYesThe name of the recording plan.
allDayintYesSpecifies whether the recording is an all-day recording. 0: No. 1: Yes.
timeSectionListListYesThe time segments for recording. This parameter is required when `allDay` is set to 0.
timeSection
ParameterTypeRequiredDescription
dayOfWeekintYesThe day of the week. 0 indicates Sunday, and 6 indicates Saturday.
beginintYesThe start time of a day in seconds. The value ranges from 0 to 86399.
endintYesThe 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

pathVersionDescriptionRequires user identity authentication
/vision/customer/record/plan/bind/device/query2.0.0Queries the list of devices to which this recording plan is attached.Yes. The client SDK must enable identity authentication.

Request parameters

ParameterTypeRequiredDefault valueDescription
planIdStringYesThe ID of the recording plan.
pageStartintNo0The start page number. The value starts from 0.
pageSizeintNo20The page size. The maximum value is 500.

Response parameters

ParameterTypeRequiredDescription
totalintYesTotal
currentCountintYesColumn Count on Current Page
deviceListListYesThe list of devices.
device:
ParameterTypeRequiredDescription
iotIdStringYesThe ID of the device.
streamTypeintYesThe stream type. 0: major stream. 1: minor stream.

Configure an event-triggered recording plan

Definition

pathVersionDescriptionRequires user identity authentication
/vision/customer/eventrecord/plan/set2.1.0Configures 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

ParameterTypeRequiredDefault valueDescription
nameStringYesPlan Name
preRecordDurationintNo0The pre-recording duration in seconds.
recordDurationintYesThe total recording duration in seconds. This includes the pre-recording duration.
allDayintYesSpecifies whether the recording is an all-day recording. 0: No. 1: Yes.
eventTypeListListYesThe list of event types. 1: motion detection.
timeSectionListListYesThe time segments for recording. This parameter is required when `allDay` is set to 0.
timeZoneintNo8The UTC time zone. The value ranges from -11 to 12.
timeSection
ParameterTypeRequiredDescription
dayOfWeekintYesThe day of the week. 0 indicates Sunday, and 6 indicates Saturday.
beginintYesThe start time of a day in seconds. The value ranges from 0 to 86399.
endintYesThe end time of a day in seconds. The value ranges from 0 to 86399.

Response parameters

ParameterTypeRequiredDescription
planIdStringYesThe ID of the event-triggered recording plan.

Update an event-triggered recording plan

Definition

pathVersionDescriptionRequires user identity authentication
/vision/customer/eventrecord/plan/update2.1.0Updates an event-triggered recording plan.Yes. The client SDK must enable identity authentication.

Request parameters

ParameterTypeRequiredDefault valueDescription
planIdStringYesThe ID of the event-triggered recording plan.
nameStringNoThe name of the event-triggered recording plan.
preRecordDurationintNo0The pre-recording duration in seconds.
recordDurationintNoThe total recording duration in seconds. This includes the pre-recording duration.
allDayintNoSpecifies whether the recording is an all-day recording. 0: No. 1: Yes.
eventTypeListListNoThe list of event types. 1: motion detection.
timeSectionListListNoThe time segments for recording. This parameter is required when `allDay` is set to 0.
timeZoneintNo8The UTC time zone. The value ranges from -11 to 12.
timeSection
ParameterTypeRequiredDescription
dayOfWeekintYesThe day of the week. 0 indicates Sunday, and 6 indicates Saturday.
beginintYesThe start time of a day in seconds. The value ranges from 0 to 86399.
endintYesThe 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

pathVersionDescriptionRequires user identity authentication
/vision/customer/eventrecord/plan/query2.1.0Queries a list of event-triggered recording plans.Yes. The client SDK must enable identity authentication.

Request parameters

ParameterTypeRequiredDefault valueDescription
pageStartintNo0The start page number. The value starts from 0.
pageSizeintNo20The page size. The maximum value is 500.
timeZoneintNo8The UTC time zone. The value ranges from -11 to 12.

Response parameters

ParameterTypeRequiredDescription
totalintYesTotal
currentCountintYesColumns on the current page
eventRecordPlanListListYesThe list of event-triggered recording plans.
  • eventRecordPlan
    ParameterTypeRequiredDescription
    planIdStringYesThe ID of the event-triggered recording plan.
    nameStringYesThe name of the event-triggered recording plan.
    preRecordDurationintYesThe pre-recording duration in seconds.
    recordDurationintYesThe total recording duration in seconds. This includes the pre-recording duration.
    allDayintYesSpecifies whether the recording is an all-day recording. 0: No. 1: Yes.
    eventTypeListListYesThe list of event types. 1: motion detection.
    timeSectionListListYesThe time segments for recording. This parameter is required when `allDay` is set to 0.
  • timeSection
    ParameterTypeRequiredDescription
    dayOfWeekintYesThe day of the week. 0 indicates Sunday, and 6 indicates Saturday.
    beginintYesThe start time of a day in seconds. The value ranges from 0 to 86399.
    endintYesThe end time of a day in seconds. The value ranges from 0 to 86399.

Delete an event-triggered recording plan

Definition

pathVersionDescriptionRequires user identity authentication
/vision/customer/eventrecord/plan/delete2.0.0Deletes an event-triggered recording plan.Yes. The client SDK must enable identity authentication.

Request parameters

ParameterTypeRequiredDefault valueDescription
planIdStringYesThe ID of the event-triggered recording plan.

Response parameters

None.

Get the details of an event-triggered recording plan

Definition

pathVersionDescriptionRequires user identity authentication
/vision/customer/eventrecord/plan/getbyid2.1.0Gets the details of an event-triggered recording plan.Yes. The client SDK must enable identity authentication.

Request parameters

ParameterTypeRequiredDefault valueDescription
planIdStringYesThe ID of the event-triggered recording plan.
timeZoneintNo8The UTC time zone. The value ranges from -11 to 12.

Response parameters

ParameterTypeRequiredDescription
planIdStringYesThe ID of the event-triggered recording plan.
nameStringYesThe name of the event-triggered recording plan.
preRecordDurationintYesThe pre-recording duration in seconds.
recordDurationintYesThe total recording duration in seconds. This includes the pre-recording duration.
allDayintYesSpecifies whether the recording is an all-day recording. 0: No. 1: Yes.
eventTypeListListYesThe list of event types. 1: motion detection.
timeSectionListListYesThe time segments for recording. This parameter is required when `allDay` is set to 0.
timeSection
ParameterTypeRequiredDescription
dayOfWeekintYesThe day of the week. 0 indicates Sunday, and 6 indicates Saturday.
beginintYesThe start time of a day in seconds. The value ranges from 0 to 86399.
endintYesThe end time of a day in seconds. The value ranges from 0 to 86399.

Attach an event-triggered recording plan to a device

Definition

pathVersionDescriptionRequires user identity authentication
/vision/customer/eventrecord/plan/device/bind2.0.0Attaches 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

ParameterTypeRequiredDefault valueDescription
planIdStringYesThe ID of the event-triggered recording plan.
iotIdStringYesThe ID of the device.
streamTypeintNo0The stream type. 0: major stream. 1: minor stream.

Response parameters

None.

Detach an event-triggered recording plan from a device

Description

pathVersionDescriptionRequires user identity authentication
/vision/customer/eventrecord/plan/unbind2.0.0Detaches an event-triggered recording plan from a device.Yes. The client SDK must enable identity authentication.

Request parameters

ParameterTypeRequiredDefault valueDescription
iotIdStringYesThe ID of the device.
streamTypeintNo0The stream type. 0: major stream. 1: minor stream.

Response parameters

None.

Query the event-triggered recording plan by device ID

Definition

pathVersionDescriptionRequires user identity authentication
/vision/customer/eventrecord/plan/getbyiotid2.1.0Queries the event-triggered recording plan by device ID.Yes. The client SDK must enable identity authentication.

Request parameters

ParameterTypeRequiredDefault valueDescription
iotIdStringYesThe ID of the device.
streamTypeintNoThe stream information. 0: major stream. 1: minor stream.
timeZoneintNo8The UTC time zone. The value ranges from -11 to 12.

Response parameters

ParameterTypeRequiredDescription
planIdStringYesThe ID of the event-triggered recording plan.
nameStringYesThe name of the event-triggered recording plan.
preRecordDurationintYesThe pre-recording duration in seconds.
recordDurationintYesThe total recording duration in seconds. This includes the pre-recording duration.
allDayintYesSpecifies whether the recording is an all-day recording. 0: No. 1: Yes.
eventTypeListListYesThe list of event types. 1: motion detection.
timeSectionListListYesThe time segments for recording. This parameter is required when `allDay` is set to 0.
timeSection
ParameterTypeRequiredDescription
dayOfWeekintYesThe day of the week. 0 indicates Sunday, and 6 indicates Saturday.
beginintYesThe start time of a day in seconds. The value ranges from 0 to 86399.
endintYesThe 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

pathVersionDescriptionRequires user identity authentication
/vision/customer/eventrecord/bind/device/query2.0.0Queries the list of devices that are associated with an event-triggered recording plan.Yes. The client SDK must enable identity authentication.

Request parameters

ParameterTypeRequiredDefault valueDescription
planIdStringYesThe ID of the event-triggered recording plan.
pageStartintNo0The start page number. The value starts from 0.
pageSizeintNo20The number of items on each page. The maximum value is 500.

Response parameters

ParameterTypeRequiredDescription
totalintYesTotal
currentCountintYesNumber of columns on the current page
deviceListListYesThe list of devices.
device
ParameterTypeRequiredDescription
iotIdStringYesThe ID of the device.
streamTypeintYesThe stream type. 0: major stream. 1: minor stream.

Query a list of cloud recordings by time range

Definition

pathVersionDescriptionRequires user identity authentication
/vision/customer/record/query2.1.3Queries 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

ParameterTypeRequiredDefault valueDescription
iotIdStringYesThe ID of the device.
streamTypeintNo0The stream type. 0: major stream. 1: minor stream.
beginTimeintYesThe start time of the query. The value is the number of seconds that have elapsed since January 1, 1970.
endTimeintYesThe end time of the query. The value is the number of seconds that have elapsed since January 1, 1970.
recordTypeintNo99 (All)The recording type. 0: scheduled recording. 1: alert recording. 2: manual recording.
pageStartintNo0The start page number. The value starts from 0.
pageSizeintNo20The number of items on each page. The maximum value is 500.
needSnapshotbooleanNofalseSpecifies whether to generate a thumbnail for the video recording.

Response parameters

ParameterTypeRequiredDescription
recordFileListListYesThe list of cloud recording files.
nextValidbooleanYesIndicates whether the next page is valid.
nextBeginTimeintYesThe start time for the next page.

recordFileList:

ParameterTypeRequiredDescription
beginTimeStringYesThe start time of the file in the yyyy-MM-dd HH:mm:ss format.
endTimeStringYesThe end time of the file in the yyyy-MM-dd HH:mm:ss format.
beginTimeUTCStringYesThe UTC start time of the file in the yyyy-MM-ddTHH:mm:ssZ format.
endTimeUTCStringYesThe UTC end time of the file in the yyyy-MM-ddTHH:mm:ssZ format.
recordTypeintYesThe recording type. 0: scheduled recording. 1: alert recording. 2: manual recording.
streamTypeintYesThe stream type. 0: major stream. 1: minor stream.
fileNameStringYesThe name of the file.
fileSizeintYesThe size of the file.
snapshotUrlStringNoURL of the recording thumbnail
intelligentTypeListStringNoThe list of intelligent events.

Get the VOD URL for a cloud recording

Definition

pathVersionDescriptionRequires user identity authentication
/vision/customer/vod/getbyfilename2.0.0Gets the playback URL for a device's cloud recording by filename.Yes. The client SDK must enable identity authentication.

Request parameters

ParameterTypeRequiredDescription
iotIdStringYesThe ID of the device.
fileNameStringYesThe name of the file, which is returned by the recording query operation.

Response parameters

ParameterTypeDescription
vodUrlStringThe video-on-demand (VOD) URL. The URL includes authentication information and can be used only once.

Query monthly recordings

Definition

pathVersionDescriptionRequires user identity authentication
/vision/customer/monthrecord/query2.0.0Queries whether a device has cloud storage recordings for each day of a specific month.Yes. The client SDK must enable identity authentication.

Request parameters

ParameterTypeRequiredDefault valueDescription
iotIdStringYesThe ID of the device.
monthStringYesThe month in the yyyyMM format, such as 201806.

Response parameters

ParameterTypeRequiredDescription
recordFlagsStringYesA 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

pathVersionDescriptionRequires user identity authentication
/vision/customer/event/query2.1.2Queries a list of events.Yes. The client SDK must enable identity authentication.

Request parameters

ParameterTypeRequiredDescription
iotIdStringYesThe ID of the device.
beginTimelongYesThe start time of the query. The value is the number of milliseconds that have elapsed since January 1, 1970.
endTimelongYesThe end time of the query. The value is the number of milliseconds that have elapsed since January 1, 1970.
eventTypeintNoThe event type. 0: all. 1: motion detection.
pictureTypeintNoThe image type. 0: all (default). 1: original image. 2: thumbnail.
pageStartintNoThe start page number. The value starts from 0.
pageSizeintNoThe page size. The default value is 20.

Response parameters

ParameterTypeRequiredDescription
eventListListYesThe list of events.
nextValidbooleanYesIndicates whether the next page is valid.
nextBeginTimeintYesThe start time for the next page.
event:
ParameterTypeRequiredDescription
eventIdStringYesThe 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.
eventTimeStringYesThe time when the event occurred, in the yyyy-MM-ss HH:mm:ss format.
eventTypeintYesThe event type. 1: motion detection.
eventDescStringYesThe description of the event.
eventPicIdStringYesThe ID of the image associated with the event.
eventDataStringYesAdditional information about the event.
eventTimeUTCStringYesThe UTC time when the event occurred, in the yyyy-MM-ssTHH:mm:ssZ format.
eventPicUrlStringNoThe URL of the alert event image.
eventPicThumbUrlStringNoThe URL of the alert event thumbnail.
intelligentTypeListStringNoThe list of intelligent events. 3 indicates human detection.

Get the playback URL of a cloud recording file by event ID

Definition

pathVersionDescriptionRequires user identity authentication
/vision/customer/vod/getbyeventid2.1.0Gets 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

ParameterTypeRequiredDescription
iotIdStringYesDevice ID
eventIdStringYesThe ID of the event.

Response parameters

ParameterTypeRequiredDescription
vodListListYesThe playlist.
vodFile
ParameterTypeRequiredDescription
fileNameStringYesThe name of the file.
vodUrlStringYesThe playback URL.
beginTimeStringYesThe start time of the file in the yyyy-MM-dd HH:mm:ss format.
endTimeStringYesThe end time of the file in the yyyy-MM-dd HH:mm:ss format.
beginTimeUTCStringYesThe UTC start time of the file in the yyyy-MM-ddTHH:mm:ssZ format.
endTimeUTCStringYesThe UTC end time of the file in the yyyy-MM-ddTHH:mm:ssZ format.

Delete recordings in a batch

Description

pathVersionDescriptionRequires user identity authentication
/vision/customer/record/batchdelete2.0.0Deletes recordings in a batch.Yes. The client SDK must enable identity authentication.

Request parameters

ParameterTypeRequiredDefault valueDescription
iotIdStringYesThe ID of the device.
fileNameListListYesThe list of recording filenames. You can delete a maximum of 100 files at a time.

Response parameters

ParameterTypeRequiredDescription
deletedCountintYesThe number of files that were successfully deleted.

Download a cloud recording

Definition

pathVersionDescriptionRequires user identity authentication
/vision/customer/vod/cloudfile/get2.1.0Requests 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

ParameterTypeRequiredDescription
iotIdStringYesThe ID of the device.
fileNameStringYesThe name of the recording file.

Response parameters

ParameterTypeRequiredDescription
urlStringYesThe 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.
statusintYesThe transcoding status of the recording. 0: success. 1: transcoding. -1: transcoding failed.
progressintYesThe transcoding progress of the recording, as a percentage from 0 to 100.

Manually trigger a short recording task on a device

Description

pathVersionDescriptionRequires user identity authentication
/vision/customer/record/trigger2.1.0Triggers 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

ParameterTypeRequiredDescription
iotIdStringYesThe ID of the device.
recordDurationintYesThe recording length in seconds. The maximum value is 1800.
streamTypeintNoThe stream type. 0: major stream (default). 1: minor stream.
preRecordDurationintNoThe pre-recording duration in seconds.

Response parameters

ParameterTypeRequiredDescription
recordIdStringYesThe ID of the cloud recording.

Set the duration of continuous recording files

Description

pathVersionDescriptionRequires user identity authentication
/vision/customer/record/durationconfig/set1.0.0Sets the duration of continuous recording files.Yes. The client SDK must enable identity authentication.

Request parameters

ParameterTypeRequiredDescription
iotIdStringYesThe ID of the device.
recordDurationintNoThe duration of a continuous recording file in seconds. The value must be between 600 and 3600. The default value is 1800.

Response parameters

None

Query the duration configuration of continuous recording files

Definition

pathVersionDescriptionRequires user identity authentication
/vision/customer/record/durationconfig/get1.0.0Queries the duration configuration of continuous recording files.Yes. The client SDK must enable identity authentication.

Request parameters

ParameterTypeRequiredDefault valueDescription
iotIdStringYesNoneThe ID of the device.

Response parameters

ParameterTypeRequiredDescription
recordDurationintYesThe duration configuration for continuous recording.

Query the details of a complimentary cloud storage plan

Description

pathVersionDescriptionRequires user identity authentication
/vision/customer/cloudstorage/presented/get2.1.2Queries the details of a complimentary cloud storage plan.Yes. The client SDK must enable identity authentication.

Request parameters

ParameterTypeRequiredDefault valueDescription
iotIdStringYesThe ID of the device.

Response parameters

ParameterTypeRequiredDescription
typeintYesThe type of the cloud storage plan. 1: continuous. 2: event-based.
lifecycleintYesThe storage period of data in the cloud. Valid values: 1, 3, 7, and 30. Unit: days.
monthsintYesThe validity period of the cloud storage service, starting from 1. Unit: months.
consumedintYesSpecifies whether the plan has been claimed. 0: not claimed. 1: claimed.
startTimeStringNoThe start time in the yyyy-MM-dd HH:mm:ss format.
endTimeStringNoThe end time in the yyyy-MM-dd HH:mm:ss format.
expiredintYesSpecifies whether the plan has expired. 0: not expired. 1: expired.
startTimeUTCStringNoThe UTC start time in the yyyy-MM-ddTHH:mm:ssZ format.
endTimeUTCStringNoThe UTC end time in the yyyy-MM-ddTHH:mm:ssZ format.

Claim a complimentary cloud storage plan

Definition

pathVersionDescriptionRequires user identity authentication
/vision/customer/cloudstorage/presented/consume2.1.3Claims a complimentary cloud storage plan.Yes. The client SDK must enable identity authentication.

Request parameters

ParameterTypeRequiredDescription
iotIdStringYesThe ID of the device.
enableDefaultPlanbooleanNoSpecifies whether to set a 7x24 default plan. The default value is false.

Response parameters

ParameterTypeRequiredDescription
typeintYesThe type of the cloud storage plan. 0: event-based. 1: continuous.
lifecycleintYesThe storage period of data in the cloud. Valid values: 1, 3, 7, and 30. Unit: days.
monthsintYesThe validity period of the cloud storage service, starting from 1. Unit: months.
consumedintYesSpecifies whether the plan has been claimed. 0: not claimed. 1: claimed.
startTimeStringNoThe start time in the yyyy-MM-dd HH:mm:ss format.
endTimeStringNoThe end time in the yyyy-MM-dd HH:mm:ss format.
expiredintYesExpired
startTimeUTCStringYesThe UTC start time in the yyyy-MM-ddTHH:mm:ssZ format.
endTimeUTCString YesThe UTC end time in the yyyy-MM-ddTHH:mm:ssZ format.

Manually capture an image

Definition

pathVersionDescriptionRequires user identity authentication
/vision/customer/picture/trigger2.0.0Triggers a device to capture an image and upload it to the cloud.Yes. The client SDK must enable identity authentication.

Request parameters

ParameterTypeRequiredDescription
iotIdStringYesThe ID of the device.

Response parameters

ParameterTypeRequiredDescription
pictureIdStringYesThe ID of the image.

Query a list of images by time

Definition

pathVersionDescriptionRequires user identity authentication
/vision/customer/picture/querybytime2.1.1Queries a list of images by time.Yes. The client SDK must enable identity authentication.

Request parameters

ParameterTypeRequiredDescription
iotIdStringYesDevice ID
startTimelongYesThe start time. The value is the number of milliseconds that have elapsed since January 1, 1970.
endTimelongYesThe end time. The value is the number of milliseconds that have elapsed since January 1, 1970.
pageStartintNoThe start page. The value starts from 0.
pageSizeintNoThe number of items on each page. The maximum value is 100. The default value is 20.
typeintNoThe image type. 0: all (default). 1: original image. 2: thumbnail.
sourceintNoThe image source. 0: all (default). 1: alert image capture. 2: manual image capture. 3: other.

Response parameters

ParameterTypeRequiredDescription
pictureListListYesThe list of images.
picture
ParameterTypeRequiredDescription
iotIdStringYesThe ID of the device.
pictureIdStringYesThe ID of the image.
pictureTimeStringYesThe creation time of the image.
pictureUrlStringYesThe URL of the image.
thumbUrlStringYesThe URL of the image thumbnail.
pictureTimeUTCStringYesThe UTC creation time of the image.
eventTypeintYesThe event type.
sourceintYesThe image source. 0: all (default). 1: alert image capture. 2: manual image capture. 3: other.
intelligentTypeListintNoThe list of intelligent events.

Get image URLs by a list of image IDs

Definition

pathVersionDescriptionRequires user identity authentication
/vision/customer/picture/querybyids2.1.0Gets image URLs by a list of image IDs.Yes. The client SDK must enable identity authentication.

Request parameters

ParameterTypeRequiredDescription
iotIdStringYesThe ID of the device.
pictureIdListListYesThe list of image IDs.
typeintNoThe image type. 0: all (default). 1: original image. 2: thumbnail.

Response parameters

ParameterTypeRequiredDescription
pictureListListYesThe list of images.
picture
ParameterTypeRequiredDescription
iotIdStringYesThe ID of the device.
pictureIdStringYesThe ID of the image.
pictureTimeStringYesThe creation time of the image.
pictureUrlStringYesThe URL of the image.
thumbUrlStringYesImage thumbnail URL
pictureTimeUTCStringYesThe UTC creation time of the image.

Delete images in a batch

Definition

pathVersionDescriptionRequires user identity authentication
/vision/customer/picture/batchdelete2.0.0Deletes images in a batch.Yes. The client SDK must enable identity authentication.

Request parameters

ParameterTypeRequiredDescription
iotIdStringYesDevice ID
pictureIdListListYesThe list of image IDs.

Response parameters

ParameterTypeRequiredDescription
deleteCountintYesSuccessful deletion count

Set the message push interval for business events

Definition

pathVersionDescriptionRequires user identity authentication
/vision/customer/bizevent/config/set1.0.0Sets the message push interval for business events.Yes. The client SDK must enable identity authentication.

Request parameters

ParameterTypeRequiredDescription
iotIdStringYesThe ID of the device.
eventTypeintYesThe business event type. 1: detection alert event. 2: cloud storage expiration reminder event.
eventIntervalintNoThe 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

None

Query the message push interval for business events

Description

pathVersionDescriptionRequires user identity authentication
/vision/customer/bizevent/config/get1.0.0Queries the message push interval for business events.Yes

Request parameters

ParameterTypeRequiredDescription
iotId StringYesThe ID of the device.
eventTypeintYesThe business event type. 1: detection alert event. 2: cloud storage expiration reminder event.

Response parameters

eventConfig
ParameterType RequiredDescription
eventTypeintYesThe business event type.
eventIntervalintYesThe message push interval for business events.

Query images by event ID

Description

pathVersionDescriptionRequires user identity authentication
/vision/customer/pic/getbyevent2.1.0Queries images by event ID.Yes

Request parameters

ParameterTypeRequiredDescription
iotIdStringYesThe ID of the device.
eventIdsArrayYesThe list of event IDs.

Response parameters

pictureList
ParameterTypeDescription
iotIdStringThe ID of the device.
eventIdStringThe ID of the event.
pictureTimeStringThe creation time of the image.
alarmPicIdStringThe ID of the image.
picUrlStringThe URL of the image.
thumbUrlStringThe URL of the thumbnail.
pictureTimeUTCStringThe UTC creation time of the image.

Query the details of events in a batch by event ID

Definition

pathVersionDescriptionRequires user identity authentication
/vision/customer/event/query/byeventids1.0.0Queries the details of events in a batch by event ID.Yes. The client SDK must enable identity authentication.

Request parameters

ParameterTypeRequiredDescription
iotIdStringYesThe ID of the device.
eventIdsListYesThe list of event IDs.
needAlarmPicturebooleanNoSpecifies whether to query the alert image corresponding to the event. The default value is false.
needRecordSnapshotbooleanNoSpecifies whether to query the recording thumbnail corresponding to the event. The default value is false.

Response parameters

ParameterTypeDescription
eventIdStringThe ID of the event.
eventTypeintThe event type.
eventTimeStringThe event time.
eventTimeUTCStringThe UTC event time.
eventPicIdStringThe ID of the image corresponding to the event.
eventPicUrlStringThe URL of the image corresponding to the event.
eventPicThumbUrlStringThe URL of the thumbnail of the image corresponding to the event.
eventFileNameStringThe name of the recording corresponding to the event.
recordSnapshotUrlStringThe URL of the recording thumbnail corresponding to the event.