Extracting Watermarks from Industrial Drawings in Batches
Function
This API is used to extract watermarks from industrial drawings in multiple OBS buckets and return the task ID. If the extraction is successful, the watermark information is saved. If the extraction fails, the failure cause is saved. The industrial drawing can be in the EDIF, ODB++, SVGZ, or DWG format.
Calling Method
For details, see Calling APIs.
URI
POST /v1/{project_id}/watermark/extract/engineering-drawing-batch
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Project 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. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
region_id |
No |
String |
Region where OBS is located. |
|
engineering_drawing_wm_extract_params |
No |
Array of DrawingWmExtractParam objects |
Parameters for extracting watermarks. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
task_id |
String |
ID of the task for injecting watermarks in batches. |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error Code |
|
error_msg |
String |
Error Message |
Example Requests
Upload the OBS addresses of watermark files to be extracted in batches, extract watermarks from the files, and save the watermark extraction results in the system.
POST /v1/{project_id}/watermark/extract/engineering-drawing-batch HTTP/1.1
{
"region_id" : "cn-north-7",
"engineering_drawing_wm_extract_params" : [ {
"file_address" : "obs://dbss-audit-agent-b9351f98c724428794ba7d105fa3558d/odb/MiniPC.tgz",
"drawing_type" : "edif"
}, {
"file_address" : "obs://dbss-audit-agent-b9351f98c724428794ba7d105fa3558d/odb/MiniPC.tgz",
"drawing_type" : "odb"
} ]
}
Example Responses
Status code: 200
Request succeeded.
{
"task_id" : "xxxxxxxxx"
}
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