Skip to main content

Groups

Groups are collections of users and service accounts with shared permissions. Groups simplify permission management by attaching policies to groups rather than individual principals.

The Group Object

{
"id": "grp-admins",
"name": "Administrators",
"description": "Full administrative access",
"organization_id": "org-abc123xyz",
"attached_policies": ["pol-admin-access", "pol-billing"],
"member_count": 5,
"created_at": "2025-09-30T10:00:00Z",
"updated_at": "2025-09-30T10:00:00Z"
}

Attributes

AttributeTypeDescription
idstringUnique identifier for the group
namestringHuman-friendly group name
descriptionstringOptional description
organization_idstringParent organization ID
attached_policiesarrayList of attached policy IDs
member_countintegerNumber of members in the group
created_atstringISO 8601 timestamp of creation
updated_atstringISO 8601 timestamp of last update

List Groups

Retrieves a paginated list of groups.

GET /groups

Query Parameters

ParameterTypeDefaultDescription
pageinteger1Page number
quantityinteger20Results per page (max: 100)
order_bystring-created_atSort field

Example Request

curl "https://api.console.solucao42.com.br/groups?page=1" \
-H "Authorization: HMAC sa_abc123_acc456_xyz:signature" \
-H "x-date: 2025-09-30T12:00:00Z" \
-H "x-nonce: unique-request-id" \
-H "x-content-sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"

Example Response

{
"total": 10,
"page": 1,
"results": [
{
"id": "grp-admins",
"name": "Administrators",
"description": "Full administrative access",
"organization_id": "org-abc123xyz",
"attached_policies": ["pol-admin-access"],
"member_count": 5,
"created_at": "2025-09-30T10:00:00Z",
"updated_at": "2025-09-30T10:00:00Z"
},
{
"id": "grp-developers",
"name": "Developers",
"description": "Development team permissions",
"organization_id": "org-abc123xyz",
"attached_policies": ["pol-dev-access", "pol-read-only"],
"member_count": 15,
"created_at": "2025-09-29T10:00:00Z",
"updated_at": "2025-09-29T10:00:00Z"
}
]
}

Get Group

Retrieves a specific group by ID.

GET /groups/{id}

Path Parameters

ParameterTypeDescription
idstringGroup ID

Example Request

curl https://api.console.solucao42.com.br/groups/grp-admins \
-H "Authorization: HMAC sa_abc123_acc456_xyz:signature" \
-H "x-date: 2025-09-30T12:00:00Z" \
-H "x-nonce: unique-request-id" \
-H "x-content-sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"

Example Response

{
"id": "grp-admins",
"name": "Administrators",
"description": "Full administrative access",
"organization_id": "org-abc123xyz",
"attached_policies": ["pol-admin-access"],
"member_count": 5,
"created_at": "2025-09-30T10:00:00Z",
"updated_at": "2025-09-30T10:00:00Z"
}

Create Group

Creates a new group.

POST /groups

Request Body

{
"name": "DevOps Team",
"description": "DevOps engineers with deployment access"
}

Parameters

ParameterTypeRequiredDescription
namestringYesGroup name
descriptionstringNoDescription

Example Request

curl -X POST https://api.console.solucao42.com.br/groups \
-H "Authorization: HMAC sa_abc123_acc456_xyz:signature" \
-H "Content-Type: application/json" \
-H "x-date: 2025-09-30T12:00:00Z" \
-H "x-nonce: unique-request-id" \
-H "x-content-sha256: <body-hash>" \
-d '{
"name": "DevOps Team",
"description": "DevOps engineers with deployment access"
}'

Example Response

{
"id": "grp-devops",
"name": "DevOps Team",
"description": "DevOps engineers with deployment access",
"organization_id": "org-abc123xyz",
"attached_policies": [],
"member_count": 0,
"created_at": "2025-09-30T12:00:00Z",
"updated_at": "2025-09-30T12:00:00Z"
}

Update Group

Updates an existing group.

PATCH /groups/{id}

Path Parameters

ParameterTypeDescription
idstringGroup ID

Request Body

{
"name": "DevOps Engineering Team",
"description": "Updated description"
}

Example Request

curl -X PATCH https://api.console.solucao42.com.br/groups/grp-devops \
-H "Authorization: HMAC sa_abc123_acc456_xyz:signature" \
-H "Content-Type: application/json" \
-H "x-date: 2025-09-30T12:00:00Z" \
-H "x-nonce: unique-request-id" \
-H "x-content-sha256: <body-hash>" \
-d '{
"description": "DevOps engineers with full deployment access"
}'

Example Response

{
"id": "grp-devops",
"name": "DevOps Team",
"description": "DevOps engineers with full deployment access",
"organization_id": "org-abc123xyz",
"attached_policies": [],
"member_count": 0,
"created_at": "2025-09-30T12:00:00Z",
"updated_at": "2025-09-30T12:30:00Z"
}

Delete Group

Deletes a group. Members are not deleted, only the group membership.

DELETE /groups/{id}

Path Parameters

ParameterTypeDescription
idstringGroup ID

Example Request

curl -X DELETE https://api.console.solucao42.com.br/groups/grp-old \
-H "Authorization: HMAC sa_abc123_acc456_xyz:signature" \
-H "x-date: 2025-09-30T12:00:00Z" \
-H "x-nonce: unique-request-id" \
-H "x-content-sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"

Response

204 No Content

Group Membership Operations

Add Member to Group

Adds a user or service account to a group with account scoping.

POST /groups/{id}/bindings

Request Body

{
"principal_type": "user",
"principal_id": "user-john001",
"account_id": "acc-prod001"
}

Parameters

ParameterTypeRequiredDescription
principal_typestringYesuser or service_account
principal_idstringYesID of the user or service account
account_idstringYesAccount ID for scoping permissions

Example Request

curl -X POST https://api.console.solucao42.com.br/groups/grp-admins/bindings \
-H "Authorization: HMAC sa_abc123_acc456_xyz:signature" \
-H "Content-Type: application/json" \
-H "x-date: 2025-09-30T12:00:00Z" \
-H "x-nonce: unique-request-id" \
-H "x-content-sha256: <body-hash>" \
-d '{
"principal_type": "user",
"principal_id": "user-john001",
"account_id": "acc-prod001"
}'

Example Response

{
"id": "binding-xyz123",
"group_id": "grp-admins",
"principal_type": "user",
"principal_id": "user-john001",
"account_id": "acc-prod001",
"created_at": "2025-09-30T12:00:00Z"
}

List Group Members

Lists all members of a group.

GET /groups/{id}/bindings

Query Parameters

ParameterTypeDefaultDescription
pageinteger1Page number
quantityinteger20Results per page (max: 100)
account_idstring-Filter by account

Example Request

curl "https://api.console.solucao42.com.br/groups/grp-admins/bindings" \
-H "Authorization: HMAC sa_abc123_acc456_xyz:signature" \
-H "x-date: 2025-09-30T12:00:00Z" \
-H "x-nonce: unique-request-id" \
-H "x-content-sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"

Example Response

{
"total": 5,
"page": 1,
"results": [
{
"id": "binding-xyz123",
"group_id": "grp-admins",
"principal_type": "user",
"principal_id": "user-john001",
"account_id": "acc-prod001",
"created_at": "2025-09-30T12:00:00Z"
}
]
}

Remove Member from Group

Removes a member from a group.

DELETE /groups/{id}/bindings/{binding_id}

Example Request

curl -X DELETE https://api.console.solucao42.com.br/groups/grp-admins/bindings/binding-xyz123 \
-H "Authorization: HMAC sa_abc123_acc456_xyz:signature" \
-H "x-date: 2025-09-30T12:00:00Z" \
-H "x-nonce: unique-request-id" \
-H "x-content-sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"

Response

204 No Content

Policy Attachment Operations

Attach Policy to Group

Attaches a policy to a group.

POST /groups/{id}/policies/{policy_id}

Example Request

curl -X POST https://api.console.solucao42.com.br/groups/grp-admins/policies/pol-admin-access \
-H "Authorization: HMAC sa_abc123_acc456_xyz:signature" \
-H "x-date: 2025-09-30T12:00:00Z" \
-H "x-nonce: unique-request-id" \
-H "x-content-sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"

Response

204 No Content

Detach Policy from Group

Detaches a policy from a group.

DELETE /groups/{id}/policies/{policy_id}

Example Request

curl -X DELETE https://api.console.solucao42.com.br/groups/grp-admins/policies/pol-old-policy \
-H "Authorization: HMAC sa_abc123_acc456_xyz:signature" \
-H "x-date: 2025-09-30T12:00:00Z" \
-H "x-nonce: unique-request-id" \
-H "x-content-sha256: e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"

Response

204 No Content

Response Codes

CodeDescription
200Success
201Created
204No Content (delete/attachment successful)
400Invalid request body
401Authentication failed
403Insufficient permissions
404Group not found
422Validation error

Permissions

Required Permissions

ActionPermission
List groupsgroups:ListGroups
Get groupgroups:GetGroup
Create groupgroups:CreateGroup
Update groupgroups:UpdateGroup
Delete groupgroups:DeleteGroup
Add membergroups:AddMember
Remove membergroups:RemoveMember
Attach policygroups:AttachPolicy
Detach policygroups:DetachPolicy

Notes

  • Groups are scoped to the organization
  • Members are scoped to specific accounts via bindings
  • A user/service account can belong to multiple groups
  • Group membership is account-specific (same user can be in different groups per account)
  • Deleting a group does not delete members or policies