DELETE - Delete Label
Introduces the interface invocation method of the Delete Label interface.
DELETE Request Description
A complete DELETE request should include the following four parameter contents:
- url: The address of the request.
- headers: The HTTP headers of the request.
- data: The metadata information sent, example format is:
metadata = { "app": "875a2442-2fe6-49a5-abf7-00fbd727e99e", "queryID": "8a0aa812-0f80-4d25-8e3f-60583bac8b96", "labels": { "test_key": "tt_value", "id": "8888" }, "sendBack": { "type": "response" } }
- files: The local files to be operated on.
Note: For complete code examples, refer to the Python request examples in the tagging chapter. POST -Add Label
Request Address
https://<ucwi_endpoint>:5443/skg/v1/dlp/label/custom/<request_mode>
Request URL and Header
Parameter Name | Parameter Location | Required | Description |
---|---|---|---|
authorization | header | Yes | The authentication information in the request. Refer to the chapter for details Authentication. |
x-skg-timestamp | header | Yes | The current Timestamp. Refer to the chapter for details Authentication. |
<request_mode> | url | Yes |
|
Request Metadata
Parameter Name | Type | Applicable Status | Description |
---|---|---|---|
labels | Dict (Required) | Synchronous and Asynchronous | The content of the custom labels to be added |
app | String (Required) | Synchronous and Asynchronous | WebService Application ID |
sendBack | Dict (Required) | Synchronous and Asynchronous | The way to handle the file after deleting the label, supports local return, HTTP upload, and cloud storage such as Amazon S3, Swift.
|
queryID | String (Required) | Synchronous and Asynchronous | sync/async (synchronous or asynchronous mode) |
uploadtype | String (Required) | Asynchronous | Only for asynchronous. Supports AWS S3, Alibaba Cloud OSS, Tencent Cloud COS, Swift, etc.
|
callback_url | String (Required) | Asynchronous | The URL of the callback function must be filled in for asynchronous mode only |
objectInfo | Dict (Optional) | Asynchronous | Only for asynchronous mode and when using object storage. Asynchronous mode supports reviewing objects stored in Amazon S3, Swift, Alibaba Cloud OSS, Tencent Cloud COS, and other cloud services. For specific setting parameters, refer to the chapter: objectinfo Parameters for Reviewing Cloud Service Stored Content in Asynchronous Mode |
Synchronous Request Parameter Example
{
"app": "875a2442-2fe6-49a5-abf7-00fbd727e99e",
"queryID": "8a0aa812-0f80-4d25-8e3f-60583bac8b96",
"labels": {
"test_key": "tt_value",
"id": "8888"
},
"sendBack": {
"type": "response"
}
}
Asynchronous Request Parameter Example
{
"labels": {
"test_key": "tt_value",
"id": "8888"
},
"app": "875a2442-2fe6-49a5-abf7-00fbd727e99e",
"queryID": "8a0aa812-0f80-4d25-8e3f-60583bac8b96",
"callback_url": "http://172.11.9.1:8000/callback",
"sendBack": {
"type": "s3",
"s3Bucket": "leo",
"s3Region": "", # The region name when using s3, if running on EC2 and using AWS IAM role, the following three items can be omitted
"accessKey": "admin",
"secretKey": "admin123",
"endpointUrl": "http://172.22.132.160:9000",
},
"uploadtype": "file"
}
Error code
If calling the API has an error, the following error codes are returned:
Error Code | Description |
---|---|
400 | Invalid parameter |
404 | Unknown Error |
500 | Invalid parameter |