Creating an Identification Template
Function
This API is used to create a sensitive data identification template based on the specified project ID. You can select built-in rules or copy an existing template.
Calling Method
For details, see Calling APIs.
URI
POST /v1/{project_id}/scan-templates
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Project ID, which is used to identify a specific project. |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
action |
No |
String |
Operation type, for example, creating or copying a template. |
|
add_built_in_rules |
No |
Boolean |
Whether to add a built-in rule when creating a template. |
|
description |
No |
String |
Template description, which briefly describes the template function. |
|
new_template_name |
No |
String |
Name of the new template, which is used to identify and manage the new template. |
|
origin_template_id |
No |
String |
Original template ID, which is used to specify the original template when copying a template. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
msg |
String |
Returned message, which is used to describe the operation result or status information. |
|
status |
String |
Returned status, which indicates whether the operation is successful. For example, 200 indicates that the operation is successful, and 400 indicates that the request is invalid. |
Status code: 201
Template created.
Example Requests
POST /v1/{project_id}/scan-templates
{
"action" : "string",
"add_built_in_rules" : true,
"description" : "string",
"new_template_name" : "string",
"origin_template_id" : "string"
}
Example Responses
None
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Request succeeded. The creation result is returned. |
|
201 |
Template created. |
|
401 |
Unauthorized. The user is not logged in or the token is invalid. |
|
403 |
Unauthorized to access the resource. |
|
404 |
Project 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