Querying Snapshot Tasks
Function
This API is used to query one or more snapshot tasks. The task results will be returned, including the status, input, and output.
Calling Method
For details, see Calling APIs.
URI
GET /v1/{project_id}/thumbnails
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
project_id |
Yes |
String |
Project ID. For details about how to obtain the project ID, see Obtaining a Project ID . |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
task_id |
No |
Array |
Task ID. A maximum of 10 task IDs can be queried at a time. |
status |
No |
String |
Task status. Possible values:
|
start_time |
No |
String |
Start time. If task_id is specified, this parameter is invalid. Its format is yyyymmddhhmmss. The value must be a UTC time irrelevant to the time zone. |
end_time |
No |
String |
End time. If task_id is specified, this parameter is invalid. Its format is yyyymmddhhmmss. The value must be a UTC time irrelevant to the time zone. |
page |
No |
Integer |
Page number. If task_id is specified, this parameter is invalid. Default value: 0 |
size |
No |
Integer |
Number of records on each page. If task_id is specified, this parameter is invalid. The value ranges from 1 to 100. Default value: 10 |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
X-Auth-Token |
No |
String |
User token The token can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token. |
Authorization |
No |
String |
Authentication information. This parameter is mandatory when AK/SK-based authentication is used. |
X-Project_Id |
No |
String |
Project ID. This parameter is mandatory when AK/SK-based authentication is used. It is same as the project ID in path parameters. |
X-Sdk-Date |
No |
String |
Time when the request is sent. This parameter is mandatory when AK/SK-based authentication is used. |
x-language |
No |
String |
Client language. |
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
task_array |
Array of ThumbTask objects |
Query results |
is_truncated |
Integer |
Whether the query results are truncated. Possible values:
|
total |
Integer |
Total number of queried snapshot tasks |
Parameter |
Type |
Description |
---|---|---|
task_id |
String |
Task ID. A maximum of 10 task IDs can be queried at a time. |
status |
String |
Specifies the task status. |
create_time |
String |
Start time. If task_id is specified, this parameter is invalid. Its format is yyyymmddhhmmss. The value must be a time-zone agnostic UTC time. |
end_time |
String |
End time. If task_id is specified, this parameter is invalid. Its format is yyyymmddhhmmss. The value must be a time-zone agnostic UTC time. |
input |
ObsObjInfo object |
Storage location of an input file |
output |
ObsObjInfo object |
Storage location of an output file |
output_file_name |
String |
Name of the generated snapshot file. |
user_data |
String |
User data |
description |
String |
Snapshot task description. |
thumbnail_info |
Array of PicInfo objects |
Snapshot file information |
Parameter |
Type |
Description |
---|---|---|
bucket |
String |
OBS bucket name |
location |
String |
Region where an OBS bucket is located. It must be the same as the region where MPC is deployed. |
object |
String |
OBS object path, which complies with the OSS Object definition.
|
file_name |
String |
File name
When it is used as the output file name:
|
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code |
error_msg |
String |
Error description |
Example Requests
GET https://{endpoint}/v1/{project_id}/thumbnails?task_id=7684
Example Responses
Status code: 200
Snapshot task queried successfully.
{ "task_array" : [ { "task_id" : 7684, "status" : "SUCCEEDED", "create_time" : 20201118121333, "end_time" : 20201118121336, "input" : { "bucket" : "example-bucket", "location" : "region01", "object" : "example-input.ts" }, "output" : { "bucket" : "example-bucket", "location" : "region01", "object" : "example-output/example-path" }, "thumbnail_info" : [ { "pic_name" : "9.jpg" }, { "pic_name" : "5.jpg" } ] } ], "is_truncated" : 0, "total" : 1 }
Status code: 400
Failed to query the snapshot task.
{ "error_code" : "MPC.10212", "error_msg" : "Operation failed." }
Status Codes
Status Code |
Description |
---|---|
200 |
Snapshot task queried successfully. |
400 |
Failed to query the snapshot task. |
Error Codes
See Error Codes.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot