Group-Derived Safe Access Policies¶
A user can reach a safe directly or through a group. This resource holds a per-user override for access a user has through a group: it narrows the group’s grant for that one user without touching the group itself or the other members.
The override can only be created for a user who already reaches the safe through a group. Creating it
for a user with no such path fails with
{"result": "failure", "message": "User does not reach the safe through any group."}.
Note
The override lives only as long as the group path does. When the last group granting the user access to the safe is removed, the override is removed with it.
Data Structures¶
Attribute |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Read-only; protected. |
|
|
string |
yes |
Immutable. Uniqueness is required in the combination of attribute |
|
string |
yes |
Immutable. Uniqueness is required in the combination of attribute |
|
boolean; default value |
yes |
Access to this safe is disabled for the user. |
|
boolean; default value |
yes |
Restrict the user’s access to the hours defined by the time policy entries. |
|
datetime (h:m:s); default value |
yes |
Beginning access time. |
|
datetime (h:m:s); default value |
yes |
Ending access time. |
|
string |
Read-only; expensive to use. |
|
|
string |
Read-only; expensive to use. |
|
|
datetime |
Read-only. Timestamp of creation. |
|
|
datetime |
Read-only. Timestamp of modification. |
|
|
boolean |
Read-only. |
Attribute |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Read-only. Uniqueness is required. |
|
|
string |
Read-only; protected. Owning override. |
|
|
string |
yes |
Immutable. Requires |
|
string |
yes |
Immutable. Requires |
|
string |
Read-only; expensive to use. |
|
|
string |
Read-only; expensive to use. |
|
|
number |
yes |
Day the entry applies to. Value range from |
|
datetime (h:m:s) |
yes |
Beginning access time on that day. |
|
datetime (h:m:s) |
yes |
Ending access time on that day. |
|
datetime |
Read-only. Timestamp of creation. |
|
|
datetime |
Read-only. Timestamp of modification. |
|
|
boolean |
Read-only. |
Retrieve Available Attributes¶
Request
Method |
|
Path |
|
GET /api/v2/objspec/user_group_safe_policy
Example Request
curl -s -k -X GET \
-H 'Authorization: <token>' \
'https://10.33.3.191/api/v2/objspec/user_group_safe_policy'
List Overrides¶
Request
Method |
|
Path |
|
GET /api/v2/user/group/safe/policy
Example Request
curl -s -k -X GET \
-H 'Authorization: <token>' \
'https://10.33.3.191/api/v2/user/group/safe/policy'
Response
{
"result": "success",
"user_group_safe_policy": [
{
"user_id": "4638707616191610882",
"safe_id": "4638707616191610881",
"blocked": false,
"use_time_policy": true,
"valid_since": "-infinity",
"valid_to": "infinity",
"user_name": "user_1",
"safe_name": "main",
"created_at": "2026-08-18 02:19:48.717365-07",
"modified_at": "2026-08-18 02:19:48.717365-07"
}
]
}
Get the Override for a User and Safe¶
Request
Method |
|
Path |
|
GET /api/v2/user/<user_id>/group/safe/<safe_id>/policy
Example Request
curl -s -k -X GET \
-H 'Authorization: <token>' \
'https://10.33.3.191/api/v2/user/4638707616191610882/group/safe/4638707616191610881/policy'
Response
{
"result": "success",
"user_group_safe_policy": [
{
"user_id": "4638707616191610882",
"safe_id": "4638707616191610881",
"blocked": true,
"use_time_policy": true,
"valid_since": "-infinity",
"valid_to": "infinity",
"user_name": "user_1",
"safe_name": "main",
"created_at": "2026-08-18 02:19:48.717365-07",
"modified_at": "2026-08-18 02:25:55.003527-07"
}
]
}
Note
This endpoint returns an array, not a single object, and an empty array when the user has no override for that safe.
Create an Override¶
Request
Method |
|
Path |
|
Body |
|
POST /api/v2/user/group/safe/policy
Example Request
curl -s -k -X POST \
-H 'Authorization: <token>' \
-H 'Content-Type: application/json' \
-d '{"user_id":"4638707616191610882","safe_id":"4638707616191610881","use_time_policy":true,"blocked":false}' \
'https://10.33.3.191/api/v2/user/group/safe/policy'
Response
{
"result": "success"
}
Modify an Override¶
Request
Method |
|
Path |
|
Body |
|
PATCH /api/v2/user/<user_id>/group/safe/<safe_id>/policy
Example Request
curl -s -k -X PATCH \
-H 'Authorization: <token>' \
-H 'Content-Type: application/json' \
-d '{"blocked":true}' \
'https://10.33.3.191/api/v2/user/4638707616191610882/group/safe/4638707616191610881/policy'
Response
{
"result": "success"
}
Delete an Override¶
Request
Method |
|
Path |
|
DELETE /api/v2/user/<user_id>/group/safe/<safe_id>/policy
Example Request
curl -s -k -X DELETE \
-H 'Authorization: <token>' \
'https://10.33.3.191/api/v2/user/4638707616191610882/group/safe/4638707616191610881/policy'
Response
{
"result": "success"
}
List Time Policy Entries¶
Request
Method |
|
Path |
|
GET /api/v2/user/group/safe/policy/time_policy
Example Request
curl -s -k -X GET \
-H 'Authorization: <token>' \
'https://10.33.3.191/api/v2/user/group/safe/policy/time_policy'
Response
{
"result": "success",
"user_group_safe_policy_time_policy": [
{
"id": "4638707616191610881",
"user_id": "4638707616191610882",
"safe_id": "4638707616191610881",
"user_name": "user_1",
"safe_name": "main",
"day_of_week": 1,
"valid_from": "08:00:00",
"valid_to": "16:00:00",
"created_at": "2026-08-18 02:19:56.790642-07",
"modified_at": "2026-08-18 02:19:56.790642-07"
}
]
}
Get a Time Policy Entry¶
Request
Method |
|
Path |
|
GET /api/v2/user/group/safe/policy/time_policy/<id>
Example Request
curl -s -k -X GET \
-H 'Authorization: <token>' \
'https://10.33.3.191/api/v2/user/group/safe/policy/time_policy/4638707616191610881'
Response
{
"result": "success",
"user_group_safe_policy_time_policy": {
"id": "4638707616191610881",
"user_id": "4638707616191610882",
"safe_id": "4638707616191610881",
"user_name": "user_1",
"safe_name": "main",
"day_of_week": 1,
"valid_from": "08:00:00",
"valid_to": "16:00:00",
"created_at": "2026-08-18 02:19:56.790642-07",
"modified_at": "2026-08-18 02:19:56.790642-07"
}
}
Create a Time Policy Entry¶
Request
Method |
|
Path |
|
Body |
|
POST /api/v2/user/group/safe/policy/time_policy
Example Request
curl -s -k -X POST \
-H 'Authorization: <token>' \
-H 'Content-Type: application/json' \
-d '{"user_id":"4638707616191610882","safe_id":"4638707616191610881","day_of_week":1,"valid_from":"08:00:00","valid_to":"16:00:00"}' \
'https://10.33.3.191/api/v2/user/group/safe/policy/time_policy'
Response
{
"result": "success",
"user_group_safe_policy_time_policy": {
"id": "4638707616191610881"
}
}
Modify a Time Policy Entry¶
Request
Method |
|
Path |
|
Body |
|
PATCH /api/v2/user/group/safe/policy/time_policy/<id>
Example Request
curl -s -k -X PATCH \
-H 'Authorization: <token>' \
-H 'Content-Type: application/json' \
-d '{"valid_to":"18:00:00"}' \
'https://10.33.3.191/api/v2/user/group/safe/policy/time_policy/4638707616191610881'
Response
{
"result": "success"
}
Delete a Time Policy Entry¶
Request
Method |
|
Path |
|
DELETE /api/v2/user/group/safe/policy/time_policy/<id>
Example Request
curl -s -k -X DELETE \
-H 'Authorization: <token>' \
'https://10.33.3.191/api/v2/user/group/safe/policy/time_policy/4638707616191610881'
Response
{
"result": "success"
}