Create Resource Set Policy
This API creates a new resource set policy, which defines the directories and files an agent applies its configuration to.
Endpoint Details
| URL | /v1/config-agent/resource-sets |
| Method | POST |
| Authorization | Bearer Token |
Request Headers
| Header | Type | Description |
|---|---|---|
| Content-Type | String | Must be application/json |
Request Body
Use the following format to make a request:
JSON Request
{
"name": "dummy resource sets",
"description": "",
"resources": [
{
"directory": "/data/secure",
"file": "*",
"type_os": "Windows",
"include_sub_directory": true
}
]
}
Parameters
| Parameter | Type | Description |
|---|---|---|
| name | String | Name of the resource set policy |
| description | String | Optional description of the resource set policy |
| resources | Array | List of resources included in the policy |
| directory | String | Directory path the policy applies to |
| file | String | File pattern the policy applies to |
| type_os | String | Operating system type the resource applies to |
| include_sub_directory | Boolean | Indicates whether subdirectories are included |
Response
Here is an example response after the request has been successfully processed:
Response
{
"data": {
"id": "ed7cced2-2c8a-4779-b8e6-408f4a28a4b3",
"tenant_id": "5ebde17c-01a1-4394-977b-9e611250cf5d",
"name": "Dummy Resource Sets",
"resources": [
{
"directory": "/data/secure",
"file": "*",
"type_os": "Windows",
"include_sub_directory": true
}
],
"created_by": "0a937c60-0ed4-4d06-870a-2e284b54287d",
"created_by_name": "Admin Aplikasi",
"updated_by": "0a937c60-0ed4-4d06-870a-2e284b54287d",
"updated_by_name": "Admin Aplikasi",
"created_at": 1785211029,
"updated_at": 1785211029
}
}
Field Descriptions
| Field | Type | Description |
|---|---|---|
| id | UUID | Unique identifier of the resource set policy |
| tenant_id | UUID | Identifier of the tenant that owns the resource set policy |
| name | String | Name of the resource set policy |
| description | String | Description of the resource set policy |
| resources | Array | List of resources included in the policy |
| directory | String | Directory path the policy applies to |
| file | String | File pattern the policy applies to |
| type_os | String | Operating system type the resource applies to |
| include_sub_directory | Boolean | Indicates whether subdirectories are included |
| created_by | UUID | Identifier of the user who created the policy |
| created_by_name | String | Display name of the user who created the policy |
| updated_by | UUID | Identifier of the user who last updated the policy |
| updated_by_name | String | Display name of the user who last updated the policy |
| created_at | Integer | Creation timestamp in Unix format |
| updated_at | Integer | Last update timestamp in Unix format |
info
- A valid Bearer Token is required to access this endpoint.
- When
fileis set to*, the policy applies to all files in the directory. - When
include_sub_directoryis set totrue, the policy also applies to files within subdirectories. - Supported
type_osvalues areWindowsandNonWindows. - Unix timestamp fields can be converted to a human-readable date and time format as needed.