Skip to main content

Groups

Get all groups

Request

Definition

GET /api/v1/groups

Headers

  • Authorization required

    Authentication token with privileges to view the resource.

    Bearer {token}

Response

Status codes

Status codeMessage
200"List of groups"
403"Forbidden"

Body

  • data.users.id string

    Group ID.

  • data.users.name string

    Group name.

  • data.users.is_admin boolean

    If the group provide admin privileges.

  • data.users.created_at string

    Date of creation.

  • data.users.updated_at string

    Date of last update.

  • data.users.description boolean

    Group description.

Get specific group

Request

Definition

GET /api/v1/groups/{id}

Headers

  • Authorization required

    Authentication token with privileges to view the resource.

    Bearer {token}

Response

Status codes

Status codeMessage
200"Group retrieved"
400"Error retrieving group"
403"Forbidden"

Body

{
"data": {
"groups": [
{
"created_at": "2024-01-17T13:11:22Z",
"description": "Group of administration with all permissions.",
"id": "fd4xxc2e-xxxx-4c34-xxxx-a7axxxxbxx6b",
"is_admin": true,
"name": "admins",
"updated_at": "2024-01-17T13:11:22Z"
},
{
"created_at": "2024-01-17T13:11:45Z",
"description": "Group with maximum privileges",
"id": "467dxxa9-xxxx-486a-xxxx-eedxxx100xx2",
"is_admin": false,
"name": "Administrators",
"updated_at": "2024-01-17T13:11:45Z"
}
]
},
"message": "List of groups",
"status": "ok"
}

Create a group

Request

Definition

POST /api/v1/groups

Headers

  • Authorization required

    Authentication token with privileges to view the resource.

    Bearer {token}
  • Content-Type required

    application/json

Request body

{
"attrs": {
"name": "new_name",
"permissions": [
{
"permission_id": 0,
"service_id": "3IxxGCD2xxxTQLPxxxZA9x=="
},
{
"permission_id": 1,
"service_id": "3IxxGCxxxxMTQLxxxSZxxA=="
},
{
"permission_id": 2,
"service_id": "xxxx"
},
{
"permission_id": 3,
"service_id": "xxxxx"
}
],
"user_ids": [
"5dxx29e0-xxx-4308-xxxx-6a71axxx0ac9",
"d4bx18xx-xxxx-4b8e-xxxx-51615xxx4e5"
]
}
}

Response

Status codes

Status codeMessage
200"Group created succesfully"
400"Error creating new group"
403"Forbidden"

Body

{
"data": {
"group": {
"created_at": "2024-01-17T13:11:49Z",
"description": "Group with maximum privileges",
"id": "c6xxx00a-xxda-xxxx-904c-ca5xx10axxx4",
"is_admin": false,
"name": "new_name",
"permissions": [
{
"expired_at": null,
"inserted_at": "2024-01-17T13:11:49Z",
"permission_description": "User can visualize and ignore alerts. He can also explore related HTTP transactions.",
"permission_id": 0,
"permission_name": "Explore alerts",
"service_id": "3IxxGCD2xxxTQLPxxxZA9x==",
"service_name": "www.test.it"
},
{
"expired_at": null,
"inserted_at": "2024-01-17T13:11:49Z",
"permission_description": "User can visualize, create, modify and delete rules, either as Application and Source.",
"permission_id": 1,
"permission_name": "Handle rules",
"service_id": "3IxxGCxxxxMTQLxxxSZxxA==",
"service_name": "www.test.it"
},
{
"expired_at": null,
"inserted_at": "2024-01-17T13:11:49Z",
"permission_description": "User can load Applications Rules to a Web Application Firewall",
"permission_id": 2,
"permission_name": "Load application rules",
"service_id": "xxxx",
"service_name": "default"
},
{
"expired_at": null,
"inserted_at": "2024-01-17T13:11:49Z",
"permission_description": "User can load Source Rules to a Firewall",
"permission_id": 3,
"permission_name": "Load source rules",
"service_id": "xxxxx",
"service_name": "default"
}
],
"updated_at": "2024-01-17T13:11:49Z",
"users": [
{
"id": "5d6xxxe0-875d-xxxx-95c1-6a7xx6f1xxx9",
"username": "test"
},
{
"id": "d4bxxx88-xxxx-4xxe-xx11-516xxxxf94e5",
"username": "test2"
}
]
}
},
"message": "Group updated succesfully",
"status": "ok"
}

Update group

Request

Definition

PUT /api/v1/groups/{id}

Headers

  • Authorization required

    Authentication token with privileges to view the resource.

    Bearer {token}
  • Content-Type required

    application/json

Request body

{
"attrs": {
"name": "new_name",
"permissions": [
{
"permission_id": 0,
"service_id": "3IRHGCD2NoMTQLPRxSZA9A=="
},
{
"permission_id": 1,
"service_id": "3IRHGCD2NoMTQLPRxSZA9A=="
},
{
"permission_id": 2,
"service_id": ""
},
{
"permission_id": 3,
"service_id": ""
}
],
"user_ids": [
"5d6f29e0-875d-4308-95c1-6a71a6f10ac9",
"d4b91888-6456-4b8e-8111-5161534f94e5"
]
}
}

Response

Status codes

Status codeMessage
200"Group updated succesfully"
400"Error updating the group."
403"Forbidden"

Body

{
"data": {
"group": {
"created_at": "2024-01-17T13:11:49Z",
"description": "Group with maximum privileges",
"id": "c679500a-eeda-4e6a-904c-ca51310a8fe4",
"is_admin": false,
"name": "new_name",
"permissions": [
{
"expired_at": null,
"inserted_at": "2024-01-17T13:11:49Z",
"permission_description": "User can visualize and ignore alerts. He can also explore related HTTP transactions.",
"permission_id": 0,
"permission_name": "Explore alerts",
"service_id": "3IRHGCD2NoMTQLPRxSZA9A==",
"service_name": "www.test.it"
},
{
"expired_at": null,
"inserted_at": "2024-01-17T13:11:49Z",
"permission_description": "User can visualize, create, modify and delete rules, either as Application and Source.",
"permission_id": 1,
"permission_name": "Handle rules",
"service_id": "3IRHGCD2NoMTQLPRxSZA9A==",
"service_name": "www.test.it"
},
{
"expired_at": null,
"inserted_at": "2024-01-17T13:11:49Z",
"permission_description": "User can load Applications Rules to a Web Application Firewall",
"permission_id": 2,
"permission_name": "Load application rules",
"service_id": "T5DrjPS£rhc=",
"service_name": "default"
},
{
"expired_at": null,
"inserted_at": "2024-01-17T13:11:49Z",
"permission_description": "User can load Source Rules to a Firewall",
"permission_id": 3,
"permission_name": "Load source rules",
"service_id": "T5DrjPS£rhc=",
"service_name": "default"
}
],
"updated_at": "2024-01-17T13:11:49Z",
"users": [
{
"id": "5d6f29e0-875d-4308-95c1-6a71a6f10ac9",
"username": "test"
},
{
"id": "d4b91888-6456-4b8e-8111-5161534f94e5",
"username": "test2"
}
]
}
},
"message": "Group updated succesfully",
"status": "ok"
}

Delete a group

Request

Definition

DELETE /api/v1/groups/{id}

Headers

  • Authorization required

    Authentication token with privileges to view the resource.

    Bearer {token}
  • Content-Type required

    application/json

Response

Status codes

Status codeMessage
200"Group deleted succesfully"
400"Error deleting the group."
403"Forbidden"

Body

{
"data": {
"group": {
"created_at": "2024-01-17T13:11:46Z",
"description": "Group with maximum privileges",
"id": "exb2xxx0-xxxx-4b69-xxxx-8442xxx517ef",
"is_admin": false,
"name": "Administrators",
"updated_at": "2024-01-17T13:11:46Z"
}
},
"message": "Group deleted succesfully",
"status": "ok"
}