Extracting Invisible Watermarks from Industrial Drawings
Function
This API is used to extract invisible watermarks from uploaded industrial drawings or industrial drawings on OBS. 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
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Project ID. |
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
region_id |
No |
String |
Region where OBS is located. This parameter is mandatory if OBS files are used. |
|
drawing_type |
Yes |
String |
Industrial drawing type, which can be EDIF, ODB, SVGZ, or DWG. |
|
input_type |
Yes |
String |
Input type, which can be file or obs. |
|
file_address |
No |
String |
OBS file path, which is in the format of obs://bucket/file. |
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 |
No |
File |
Industrial drawings from which invisible watermarks are to be extracted. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
watermark |
String |
Value of the invisible watermark. |
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 or upload an OBS address to extract the invisible watermark from the file.
POST /v1/{project_id}/watermark/extract/engineering-drawing?drawing_type=edif&input_type=file HTTP/1.1 { "file" : "test.edf" } -
POST /v1/{project_id}/watermark/extract/engineering-drawing?drawing_type=edif&input_type=file&file_address=obs://dbss-audit-agent-b9351f98c724428794ba7d105fa3558d/odb/MiniPC7.tgz®ion_id=cn-north7 HTTP/1.1
Example Responses
Status code: 200
Request succeeded.
{
"watermark" : "testwm"
}
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