Obtaining Details About a Task for Adding Watermarks to Industrial Drawings in Batches
Function
This API is used to query the progress or result of the task for adding watermarks to industrial drawings in multiple OBS buckets based on the task ID. The industrial drawing can be in the EDIF or ODB++ format.
Calling Method
For details, see Calling APIs.
URI
GET /v1/{project_id}/watermark/embed/tasks/{task_id}
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Project ID. |
|
task_id |
Yes |
String |
Task ID. |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
X-Auth-Token |
Yes |
String |
User token. It can be obtained by calling the IAM API. The value of X-Subject-Token in the response header is the user token. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
task_id |
String |
Task ID. |
|
status |
Integer |
Task status. 0: in progress, 1: completed, 2: failed. |
|
total |
Integer |
Total number of files in the task. |
|
completed |
Integer |
Total number of completed files. |
|
waited |
Integer |
Number of files to be executed. |
|
failed |
Integer |
Number of failed files. |
|
failed_embed_info |
Array of EngineeringDrawingWmFailedEmbedInfo objects |
Reason for embedding failure. |
|
Parameter |
Type |
Description |
|---|---|---|
|
file_name |
String |
File source path. |
|
target_file_name |
String |
Target file path. |
|
failed_reason |
String |
Failure cause. |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error Code |
|
error_msg |
String |
Error Message |
Example Requests
Query the progress or result of the task for adding watermarks to industrial drawings based on the task ID.
GET /v1/abcdefghigklmnopqrstuvwxyz123456/watermark/embed/tasks/f84dcc533e864a4e944a4df346601819 HTTP/1.1
Example Responses
Status code: 200
Request succeeded.
{
"completed" : 6,
"total" : 6,
"failed" : 0,
"status" : 1,
"waited" : 0,
"task_id" : "f84dcc533e864a4e944a4df346601819",
"failed_embed_info" : [ ]
}
Status code: 400
Invalid request.
{
"error_code" : "DSC.00000002",
"error_msg" : "DSC internal error"
}
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Request succeeded. |
|
400 |
Invalid request. |
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