Adding a Data Class Type
Function
This API is used to add a data type.
Calling Method
For details, see Calling APIs.
URI
POST /v1/{project_id}/workspaces/{workspace_id}/soc/dataclasses/{dataclass_id}/types
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
project_id |
Yes |
String |
Definition Project ID, which is used to specify the project that a resource belongs to. You can query the resources of a project by project ID. You can obtain the project ID from the API or console. Obtaining the Project ID Constraints N/A Range N/A Default Value N/A |
|
workspace_id |
Yes |
String |
Definition Workspace ID. Range N/A |
|
dataclass_id |
Yes |
String |
Unique ID of a data class. |
Request Parameters
|
Parameter |
Mandatory |
Type |
Description |
|---|---|---|---|
|
sub_category |
No |
String |
Subtype name. This parameter is mandatory for the alert type and incident type. This parameter is not required for the threat intelligence type, vulnerability type, or custom type. |
|
sub_category_code |
No |
String |
Subtype ID. This parameter is mandatory for the alert type and incident type. This parameter is not required for the threat intelligence type, vulnerability type, or custom type. |
|
category |
No |
String |
Type name. This parameter is mandatory for the alert type, incident type, threat intelligence type, and vulnerability type. This parameter is not required for the custom type. |
|
category_code |
No |
String |
Type ID. This parameter is mandatory for the alert type, incident type, threat intelligence type, and vulnerability type. This parameter is not required for the custom type. |
|
name |
No |
String |
Name of the custom type. Name of the created type or subtype. (This parameter is mandatory for the custom type. This parameter is not required for other types.) |
|
business_code |
No |
String |
ID of the custom type. ID of the created type or subtype. (This parameter is mandatory for the custom type. This parameter is not required for other types.) |
|
dataclass_business_code |
No |
String |
Business code of the data class type. This parameter is mandatory for the custom type. (This parameter is not required for other types.) |
|
description |
No |
String |
Type description. |
|
level |
No |
Integer |
Type level. This parameter is mandatory for the custom type. The options are as follows: 1: type; 2: subtype. (This parameter is not required for other types.) |
|
enabled |
Yes |
Boolean |
Enabling status of the type. true: enabled; false: disabled. |
|
sla |
Yes |
Long |
Expiration time. |
Response Parameters
Status code: 200
|
Parameter |
Type |
Description |
|---|---|---|
|
code |
String |
Response code. |
|
message |
String |
Response message. |
|
data |
Array of DataClassTypeLevelDetailInfo objects |
Response data. |
|
Parameter |
Type |
Description |
|---|---|---|
|
id |
String |
Type ID. |
|
name |
String |
Major category/subcategory name of the data class type. |
|
business_code |
String |
Business code of the major category/subcategory of the data class type. |
|
description |
String |
Major category/subcategory description of the data class type. |
|
enabled |
Boolean |
Status. |
|
level |
Integer |
Type level. 1: major category; 2: subcategory. |
|
is_built_in |
Boolean |
Built-in or not. true: Built in; false: Not built in. |
|
sla |
Integer |
Response duration. |
|
creator_id |
String |
Creator ID. |
|
creator_name |
String |
Creator name. |
|
modifier_id |
String |
Modifier ID. |
|
modifier_name |
String |
Modifier name. |
|
create_time |
String |
Creation time. |
|
update_time |
String |
Modification time. |
|
dataclass_business_code |
String |
Business code of the data class. |
|
sub_count |
Integer |
Number of subcategories. |
Status code: 400
|
Parameter |
Type |
Description |
|---|---|---|
|
error_code |
String |
Error code. |
|
error_msg |
String |
Error description. |
Example Requests
None
Example Responses
None
Status Codes
|
Status Code |
Description |
|---|---|
|
200 |
Response body for successful type addition requests. |
|
400 |
Response body for failed type addition requests. |
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