Get Device Albums

Last Updated on : 2023-12-07 03:34:01download

Get the list of device images and videos.

API address

GET: /v1.0/smart-lock/devices/{device_id}/albums-media

Request parameter

Parameter name Type IN Required Description
device_id String uri true The device ID.

Return parameter

Parameter name Type Description
result MediaAlbumStaticVO

Description of result

Parameter name Type Description
event_types Set Types of cover images and videos in a specified album.
album_list List The list of data in a specified album.
order_code String The plan used for current album query. Valid values:
  • doorlock_cloud_storage_7day: unlimited cloud storage for 7 days.
  • doorlock_cloud_storage_30day: unlimited cloud storage for 30 days.
  • cloud_free_storage_3day: free cloud storage for 3 days.

Description of album_list

Parameter name Type Description
file_url String The URL of the cover image.
file_key String The secret key of the cover image.
media_key String The secret key of the video.
media_path String The URL of the video.
media_bucket String The repository where the video is located.
event_type Integer The type of events. Valid values:
  • 0: anti-pry alert.
  • 1: remote unlocking request.
  • 2: fingerprint attempt.
  • 3: password attempt.
  • 4: card attempt.
  • 5: face attempt.
  • 6: palm print attempt.
  • 7: finger vein attempt.
  • 8: fingerprint attempt.
  • 9: unlock with password.
  • 10: unlock with card.
  • 11: unlock with face recognition.
  • 12: unlock with palm print.
  • 13: unlock with finger vein.
  • 14: unlock with temporary password.
  • 15: unlock with dynamic password.
  • 16: remote unlocking.
  • 17: report the unlocking with temporary password.
  • 18: report the unlocking with doorbell.
  • 19: duress alert.
  • 20: Low battery alert.
  • 21: key insertion alert.
  • 22: high temperature alert.
  • 23: doorbell and remote unlocking.
  • 24: loitering.
  • 25: the door lock is broken.
  • 26: unlock with special fingerprint.
  • 27: unlock in arming mode.
  • 28: unlock with remote control.
upload_time Long The time when data is reported. Unit: seconds.

Request example

GET: /v1.0/smart-lock/devices/vdevo124546565765/albums-media

Return example

{ "result": { "album_list": [ { "file_url": "https://ty-cn-storage30-1254153901.cos.tuyacn.com/d76182-35779292-dc706aecd4469145/unify/1630051338.jpeg?sign=q-sign-algorithm%3Dsha1%26q-ak%3DAKIDopcCYgw0qRoyV5qfKjvg2pPkqESnb5zI%26q-sign-time%3D1630137629%3B1630141229%26q-key-time%3D1630137629%3B1630141229%26q-header-list%3Dhost%26q-url-param-list%3D%26q-signature%3D29b40dd6ed4281b78321ec978ce1e56361fd7b57", "file_key": "76679d2579c74eb7", "upload_time": 1630051337, "event_type": 0, "file_id": 109167468 } ], "order_code": "cloud_free_storage_3day", "event_types": [ 0 ] }, "t": 1542626129429, "success": true }

Error code

For more information, see error code.