Enabling or Disabling a Risk Rule
Function
This API is used to enable or disable a risk rule.
URI
POST /v1/{project_id}/{instance_id}/audit/rule/risk/switch
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
instance_id |
Yes |
String |
Instance ID |
project_id |
Yes |
String |
Project ID |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
Content-type |
Yes |
String |
The fixed value of this parameter is application/json;charset=UTF-8, which cannot be changed. |
X-Auth-Token |
Yes |
String |
User token.The token can be obtained by calling the IAM API used to obtain a user token. The value of X-Subject-Token in the response header is the user token. |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
ids |
Yes |
String |
Risk IDs. Values are separated by commas (,).Risk id can be obtained from this interface:/v1/{project_id}/{instance_id}/dbss/audit/rule/risk |
status |
Yes |
String |
Its value can be OFF or ON. Enumeration values:
|
Response Parameters
Status code: 200
Parameter |
Type |
Description |
---|---|---|
status |
String |
response status |
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error |
Object |
Error message. |
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error information. |
Status code: 403
Parameter |
Type |
Description |
---|---|---|
error |
Object |
Error message. |
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error code. |
error_msg |
String |
Error information. |
Example Requests
/v1/{project_id}/{instance_id}/audit/rule/risk/switch { "ids" : "c7ILB3kBCwCqSg3B2OpF", "status" : "OFF" }
Example Responses
Status code: 200
Request succeeded.
{ "status" : "SUCCESS" }
Status code: 400
Invalid request parameter.
{ "error" : { "error_code" : "DBSS.XXX", "error_msg" : "XXX" } }
Status code: 403
Authentication failed.
{ "error" : { "error_code" : "DBSS.XXX", "error_msg" : "XXX" } }
Status Codes
Status Code |
Description |
---|---|
200 |
Request succeeded. |
400 |
Invalid request parameter. |
403 |
Authentication failed. |
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