Adding Watermarks to Industrial Drawings
Function
This API is used to add visible and invisible watermarks into the uploaded industrial drawing. The watermarked industrial drawing will be received by the client through download. The industrial drawing can be in the EDIF, ODB++, DWG, or SVGZ format.
Calling Method
For details, see Calling APIs.
URI
POST /v1/{project_id}/watermark/embed/engineering-drawing
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Project ID. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
drawing_type |
Yes |
String |
Industrial drawing type, which can be EDIF, ODB, SVGZ, or DWG. |
|
visible_watermark |
Yes |
String |
Visible watermark content, which contains 12 characters. Only letters and digits are supported. |
|
density |
Yes |
Integer |
Visible watermark density, which takes effect in an EDIF industrial drawing. |
|
strength |
Yes |
Integer |
Visible watermark strength, which takes effect in an ODB industrial drawing. |
|
blind_watermark |
Yes |
String |
Content of the invisible watermark. After it is converted into a byte array, the maximum length is 32. |
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 |
|---|---|---|---|
|
file |
Yes |
File |
Industrial drawings to be watermarked. |
Response Parameters
Status code: 200
Request succeeded.
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error Code |
|
error_msg |
String |
Error Message |
Example Requests
Upload a file through the file stream and add a visible or invisible watermark to the file.
POST /v1/{project_id}/watermark/embed/engineering-drawing?drawing_type=edif&visible_watermark=testwm&density=5&blind_watermark=testwm HTTP/1.1
{
"file" : "test.edif"
}
Example Responses
None
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