API v2: Groups¶
Endpoints in this section allow you to create groups and modify their name and description. To assign safes, users, and configure object permissions, refer to the following sections: API v2: Group-Safe Assignment, API v2: Group-Safe-TimePolicy Management, and API v2: Group-User Assignment.
Data Structures¶
Attribute |
Type |
Required |
Description |
|---|---|---|---|
|
string |
Read-only. Unique identifier. Requires rights to perform operations on the |
|
|
string |
yes |
Case-insensitive. Unique. |
|
string |
||
|
string-array |
Read-only; List of rights the subject has to this object. |
|
|
datetime |
Read-only. Timestamp of creation. |
|
|
datetime |
Read-only. Timestamp of modification. |
|
|
boolean |
Read-only. |
Retrieve Available Attributes of the GroupModel¶
Request
Method |
|
Path |
|
GET /api/v2/objspec/group
Example Request
curl -s -k -X GET \
-H 'Authorization: sgfeea6jsaz4mum9su8w6' \
'https://10.0.214.98/api/v2/objspec/group'
Get Groups List¶
Request
Method |
|
Path |
|
GET /api/v2/group
Example Request
curl -s -k -X GET \
-H 'Authorization: sgfeea6jsaz4mum9su8w6' \
'https://10.0.214.98/api/v2/group'
Response
{
"result": "success",
"group": [
{
"id": "9115285645797883905",
"name": "admin",
"rights": [
"read",
"modify",
"delete",
"user-add",
"user-remove"
],
"created_at": "2025-04-28 03:59:56.247996-07",
"modified_at": "2025-04-28 03:59:56.247996-07"
},
{
"id": "9115285645797883906",
"name": "QA_team",
"rights": [
"read",
"modify",
"delete",
"user-add",
"user-remove"
],
"created_at": "2025-04-30 02:18:18.651517-07",
"modified_at": "2025-04-30 02:18:18.651517-07"
}
]
}
Get Group by ID¶
Request
Method |
|
Path |
|
GET /api/v2/group/<id>
Example Request
curl -s -k -X GET \
-H 'Authorization: sgfeea6jsaz4mum9su8w6' \
'https://10.0.214.98/api/v2/group/9115285645797883905'
Response
{
"result": "success",
"group": {
"id": "9115285645797883905",
"name": "admin",
"rights": [
"read",
"modify",
"delete",
"user-add",
"user-remove"
],
"created_at": "2025-04-28 03:59:56.247996-07",
"modified_at": "2025-05-07 23:55:40.907653-07"
}
}
Create Group¶
Request
Method |
|
Path |
|
Headers |
|
Body |
|
POST /api/v2/group
Example Request
curl -s -k -X POST \
-H 'Authorization: sgfeea6jsaz4mum9su8w6' \
-H 'Content-Type: application/json' \
'https://10.0.214.98/api/v2/group' \
-d'{"name": "QA_Team",``description``: "Members of QA responsible for..."}'
Response
{
"result": "success",
"group": {
"id": "9115285645797883908"
}
}
Modify Group¶
Request
Method |
|
Path |
|
Headers |
|
Body |
|
PATCH /api/v2/group/<id>
Example Request
curl -s -k -X PATCH \
-H 'Authorization: sgfeea6jsaz4mum9su8w6' \
-H 'Content-Type: application/json' \
'https://10.31.135.179/api/v2/group/9115285645797883911' \
-d'{"name": "Dev_Team","description": "Members of DEV responsible for..."}'
Response
{
"result": "success"
}
Delete Group¶
Request
Method |
|
Path |
|
DELETE /api/v2/group/<id>
Example Request
curl -s -k -X DELETE \
-H 'Authorization: sgfeea6jsaz4mum9su8w6' \
'https://10.31.135.179/api/v2/group/9115285645797883911'
Response
{
"result": "success"
}