Queries the information about an image that was captured by an IP camera.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer. OpenAPI Explorer dynamically generates the sample code of the operation for different SDKs.

Request parameters

Parameter Type Required Example Description
Action String Yes QueryDevicePictureFile

The operation that you want to perform. Set the value to QueryDevicePictureFile.

CaptureId String Yes fdc576d03c094faea9fa10fbf48c****

The image ID that was generated by the IP camera for the captured image.

  • For more information about the image ID for an image that is captured during manually triggered image capture, see TriggerCapturePicture.
  • For more information about the image ID for an image that is captured during alert event-triggered image capture, see QueryDeviceEvent.
ProductKey String No a1BwAGV****

The ProductKey of the product to which the IP camera belongs.

You can view the information about all products within the current account on the Products page of the IoT Platform console or by calling the QueryProductList operation.

Notice If you specify this parameter, you must also specify the DeviceName parameter.
DeviceName String No camera1

The DeviceName of the IP camera.

You can view the DeviceName of the IP camera on the Devices page of the IoT Platform console.

Notice If you specify this parameter, you must also specify the ProductKey parameter.
IotId String No zLZyi6aOLyOSHa9hsPyD00****

The ID of the IP camera. IoT Platform allocates an ID to each IP camera to uniquely identify the IP camera. You can call the QueryDeviceDetail operation of IoT Platform to query the ID of the IP camera.

Notice If you specify this parameter, you do not need to specify the ProductKey or DeviceName parameter. The IotId parameter specifies a GUID of the IP camera, which corresponds to a combination of the ProductKey and DeviceName parameters. If you specify both the IotId parameter and the combination of the ProductKey and DeviceName parameters, the IotId parameter takes precedence.
ThumbWidth Integer No 100

The width of the image to query. Unit: pixels. Valid values: 1 to 4096.

ExpireTime Integer No 60

The validity period of the image URL. Unit: minutes.

PictureType Integer No 1

The type of the image. Valid values:

  • 0: thumbnail.
  • 1: source image.
  • 2: thumbnail and source image. This is the default value.
IotInstanceId String No iot-cn-n6w1y******

The ID of the instance. You can view the instance ID on the Overview page in the IoT Platform console.

Notice
  • If your instance has an ID, you must configure this parameter. If you do not set this parameter, the call fails.
  • If your instance has no Overview page or ID, you do not need to set this parameter.

For more information, see Overview.

In addition to the preceding operation-specific request parameters, you must specify common request parameters when you call this operation. For more information, see Common request parameters.

Response parameters

Parameter Type Example Description
Code String 200

The response code.

  • 200: The call was successful.
  • Other codes: The call failed. For more information about error codes, see Error codes.
Data Struct

The response.

IotId String 1CJ0***kQi1000000

The ID of the IP camera.

PicCreateTime Long 1632453652222

The time when the image was created. The value is a 13-digit timestamp in milliseconds.

PicId String R****bVhsNCjMjIy

The ID of the image.

PicUrl String https://link-vision-picture-sh.oss-cn-shanghai.aliyuncs.com/E***3D

The URL of the image.

ThumbUrl String https://link-vision-picture-sh.oss-cn-shanghai.aliyuncs.com/E***2Cq_90

The URL of the thumbnail.

ErrorMessage String request forbidden

The error message returned if the call failed.

RequestId String 06DC77A0-4622-42DB-9EE0-25FIOHS82JK1

The ID of the request.

Success Boolean true

Indicates whether the call was successful.

  • true: The call was successful.
  • false: The call failed.

Examples

Sample requests

http(s)://linkvisual.cn-shanghai.aliyuncs.com/?Action=QueryDevicePictureFile
&CaptureId=fdc576d03c094faea9fa10fbf48c****
&IotId=zLZyi6aOLyOSHa9hsPyD00****
&IotInstanceId=iot-cn-n6w1y******
&ThumbWidth=100
&ExpireTime=60
&<Common request parameters>

Sample success responses

XML format

<QueryDevicePictureFileResponse>
  <RequestId>B6E3F040-F2FD-5B6C-89B2-C3B58D22A5A0</RequestId>
  <Data>
        <IotId>1CJ0***kQi1000000</IotId>
        <ThumbUrl>https://link-vision-picture-sh.oss-cn-shanghai.aliyuncs.com/E***2Cq_90</ThumbUrl>
        <PicUrl>https://link-vision-picture-sh.oss-cn-shanghai.aliyuncs.com/E***3D</PicUrl>
        <PicCreateTime>1632453652222</PicCreateTime>
        <PicId>R****bVhsNCjMjIy</PicId>
  </Data>
  <Code>200</Code>
  <Success>true</Success>
</QueryDevicePictureFileResponse>

JSON format

{
    "RequestId": "B6E3F040-F2FD-5B6C-89B2-C3B58D22A5A0",
    "Data": {
        "IotId": "1CJ0***kQi1000000",
        "ThumbUrl": "https://link-vision-picture-sh.oss-cn-shanghai.aliyuncs.com/E***2Cq_90",
        "PicUrl": "https://link-vision-picture-sh.oss-cn-shanghai.aliyuncs.com/E***3D",
        "PicCreateTime": 1632453652222,
        "PicId": "R****bVhsNCjMjIy"
    },
    "Code": "200",
    "Success": true
}

Error codes

For a list of error codes, visit the API Error Center.