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

GroupModel

Attribute

Type

Required

Description

id

string

Read-only. Unique identifier. Requires rights to perform operations on the group object: read for GET, modify for PATCH, delete for DELETE.

name

string

yes

Case-insensitive. Unique.

description

string

rights

string-array

Read-only; List of rights the subject has to this object.

created_at

datetime

Read-only. Timestamp of creation.

modified_at

datetime

Read-only. Timestamp of modification.

removed

boolean

Read-only.

Retrieve Available Attributes of the GroupModel

Request

Method

GET

Path

/api/v2/objspec/group

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

GET

Path

/api/v2/group

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

GET

Path

/api/v2/group/<id>

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

POST

Path

/api/v2/group

Headers

Content-Type: Application/json

Body

GroupModel

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

PATCH

Path

/api/v2/group/<id>

Headers

Content-Type: Application/json

Body

GroupModel

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

DELETE

Path

/api/v2/group/<id>

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"
}