Importing Rules in Batches
Function
This API is used to import rules in batches.
Calling Method
For details, see Calling APIs.
URI
POST /v1/{project_id}/scan-rules/batch-import
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Project ID, which is used to identify a specific project. |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
template_id |
Yes |
String |
Template ID. |
|
template_type |
Yes |
String |
Template type. |
|
ti_file |
Yes |
File |
Files imported in batches. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
status |
String |
Rule status. |
|
success_msg |
String |
Success message. |
|
error_response |
error_response object |
Error message. |
|
Parameter |
Type |
Description |
|---|---|---|
|
total |
Integer |
Total number. |
|
error_messages |
Array of error_messages objects |
Error description. |
|
Parameter |
Type |
Description |
|---|---|---|
|
line_number |
Integer |
Line number. |
|
message |
String |
Description. |
Status code: 201
Rule imported.
Example Requests
POST /v1/{project_id}/scan-rules/batch-import
{
"ti_file" : "file.xlsx",
"template_id" : "string",
"template_type" : "string"
}
Example Responses
None
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Request succeeded. The export task status is returned. |
|
201 |
Rule imported. |
|
401 |
Unauthorized. The user is not logged in or the token is invalid. |
|
403 |
Unauthorized to access the resource. |
|
404 |
The specified task or project is not found. |
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