Modifying a Task Rule Set
Function
Modify a task rule set.
URI
PUT /v2/tasks/{task_id}/ruleset
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
task_id |
Yes |
String |
Task ID |
Request Parameters
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
Content-Type |
Yes |
String |
Setting the Media Type and Encoding Format |
X-Auth-Token |
Yes |
String |
User token. It can be obtained by calling an IAM API. The value of X-Subject-Token in the response header is the user token. Minimum: 1 Maximum: 100000 |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
[items] |
Yes |
Array of UpdateTaskRulesetItem objects |
Modify Rule Set |
Parameter |
Mandatory |
Type |
Description |
---|---|---|---|
language |
Yes |
String |
Rule Set Language Minimum: 1 Maximum: 128 |
rule_set_id |
Yes |
String |
Rule Set ID Minimum: 1 Maximum: 50 |
if_use |
Yes |
String |
Indicates whether the relationship between the task language and rule set is enabled. 1: yes; 0: no. Minimum: 1 Maximum: 1 |
status |
Yes |
String |
New/Old data. The default value is 1. Minimum: 1 Maximum: 1 |
Response Parameters
Status code: 400
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error Codes |
error_msg |
String |
Description |
Status code: 401
Parameter |
Type |
Description |
---|---|---|
error_code |
String |
Error Codes |
error_msg |
String |
Description |
Example Requests
Modify the rule set of the task. The language type of the rule set is cpp, the rule setting ID is displayed according to the actual situation, and the rule status is 1.
PUT https://{endpoint}/v2/tasks/{task_id}/ruleset [ { "language" : "cpp", "rule_set_id" : "7be4cfxxxxxxxxfd8d07077cxxxxxxxx", "if_use" : "1", "status" : "1" } ]
Example Responses
Status code: 200
Request succeeded!
null
Status code: 400
Bad Request
{ "error_code" : "CC.00000000", "error_msg" : "The network is busy. Please try again later." }
Status code: 401
Unauthorized
{ "error_code" : "CC.00000003", "error_msg" : "The authentication information has expired." }
Status Codes
Status Code |
Description |
---|---|
200 |
Request succeeded! |
400 |
Bad Request |
401 |
Unauthorized |
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.