Adding Watermarks to Industrial Drawings in Batches
Function
This API is used to add watermarks to industrial drawings in multiple OBS buckets. The industrial drawing can be in the EDIF or ODB++ format.
Calling Method
For details, see Calling APIs.
URI
POST /v1/{project_id}/watermark/embed/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. |
|
drawing_type |
No |
String |
Industrial drawing file type, which can be EDIF or ODB. |
|
visible_watermark |
No |
String |
Value of the visible watermark. |
|
density |
No |
Integer |
Density of the visible watermark. |
|
strength |
No |
Integer |
Intensity of the visible watermark. |
|
blind_watermark |
No |
String |
Value of the invisible watermark. |
|
src_files |
No |
Array of strings |
List of source files for which watermarks are to be embedded. |
|
dst_files |
No |
Array of strings |
List of target files after watermark embedding. |
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 the source file and target file in batches, add watermarks to the source file, and upload the file to the OBS address of the target file.
POST /v1/{project_id}/watermark/embed/engineering-drawing-batch HTTP/1.1
{
"region_id" : "cn-north-7",
"src_files" : [ "obs://dbss-audit-agent-b9351f98c724428794ba7d105fa3558d/odb/MiniPC.tgz", "obs://dbss-audit-agent-b9351f98c724428794ba7d105fa3558d/odb/MiniPC.tgz" ],
"dst_files" : [ "obs://dbss-audit-agent-b9351f98c724428794ba7d105fa3558d/odb/MiniPC1.tgz", "obs://dbss-audit-agent-b9351f98c724428794ba7d105fa3558d/odb/MiniPC2.tgz" ],
"drawing_type" : "odb",
"visible_watermark" : "testwm",
"density" : 3,
"strength" : 3,
"blind_watermark" : "testwm"
}
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