Create User Set Policy
This API creates a new user set policy, which defines the users and groups an agent applies its configuration to.
Endpoint Details
| URL | /v1/config-agent/user-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 user sets",
"description": "",
"users": [
{
"uname": "dummy",
"gname": "dummy",
"uid": "1000",
"gid": "1000",
"domain_os": ""
}
]
}
Parameters
| Parameter | Type | Description |
|---|---|---|
| name | String | Name of the user set policy |
| description | String | Optional description of the user set policy |
| users | Array | List of users included in the policy |
| uname | String | Username of the user |
| gname | String | Group name of the user |
| uid | String | User ID (UID) of the user |
| gid | String | Group ID (GID) of the user |
| domain_os | String | Operating system domain that restricts the policy to users of that domain |
Response
Here is an example response after the request has been successfully processed:
Response
{
"data": {
"id": "95811aa4-5b61-46d3-a007-14d0a576ef60",
"tenant_id": "5ebde17c-01a1-4394-977b-9e611250cf5d",
"name": "Dummy User Sets",
"users": [
{
"uname": "dummy",
"gname": "dummy",
"uid": "1000",
"gid": "1000"
}
],
"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": 1785214953,
"updated_at": 1785214953
}
}
Field Descriptions
| Field | Type | Description |
|---|---|---|
| id | UUID | Unique identifier of the user set policy |
| tenant_id | UUID | Identifier of the tenant that owns the user set policy |
| name | String | Name of the user set policy |
| description | String | Description of the user set policy |
| users | Array | List of users included in the policy |
| uname | String | Username of the user |
| gname | String | Group name of the user |
| uid | String | User ID (UID) of the user |
| gid | String | Group ID (GID) of the user |
| domain_os | String | Operating system domain that restricts the policy |
| 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.
- The
domain_osfield restricts the policy to users from a specific operating system domain. When left empty, no domain restriction is applied and the policy affects all matching users. - Unix timestamp fields can be converted to a human-readable date and time format as needed.