Saltar al contenido
NimbusNexus

Grupos de usuarios

Un grupo de usuarios es una colección de usuarios con nombre a la que se pueden conceder roles en conjunto. En lugar de conceder reader en un proyecto a quince ingenieros uno por uno, se lo concedes al grupo backend-team y añades a los nuevos ingenieros al grupo. Concede el rol con POST /api/v1/roles/grant, indicando el group y el project, y añade miembros con POST /api/v1/groups/grant.

Los grupos tienen el alcance de un workspace. Un usuario puede pertenecer a varios grupos; un grupo puede tener roles en varios proyectos dentro de su workspace. Las asignaciones de rol son aditivas — un usuario obtiene la unión de todos los roles que se le han concedido directamente más todos los roles concedidos a cualquier grupo al que pertenezca.

En equipos pequeños (menos de ~10 personas), las concesiones por usuario suelen bastar. Los grupos pasan a ser la respuesta adecuada en algún punto entre 10 y 50 usuarios, cuando la pregunta de "auditar quién tiene acceso al proyecto X" tiene que poder responderse en segundos y no revisando a mano 30 entradas de IAM.

Próximos pasos

  • Usuarios — lo que contienen los grupos.
  • Roles — lo que se concede a un grupo.
  • Workspaces — el alcance de los grupos.

Reference

GET/api/v1/groups/

List Groups

List groups in the caller's workspace, optionally filtered by user membership and search term.

Parameters

NameInTypeDescription
userquerystring | null—
searchquerystring | null—

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X GET "https://api.nimbusnexus.net/api/v1/groups/" \
  -H "Authorization: Bearer $NIMBUS_KEY"
POST/api/v1/groups/

Create Group

Create a new group in the caller's workspace.

Request body

FieldTypeDescription
name*string—
descriptionstring | null—

Responses

  • 201Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X POST "https://api.nimbusnexus.net/api/v1/groups/" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Example"
  }'
POST/api/v1/groups/grant

Grant Group

Add users to groups in a single batched call. Every group and user must be in the caller's workspace.

Request body

JSON body required.

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X POST "https://api.nimbusnexus.net/api/v1/groups/grant" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '[
    {
      "user_id": "<user_id>",
      "group_id": "<group_id>"
    }
  ]'
POST/api/v1/groups/revoke

Revoke Group

Remove users from groups in a single batched call. Every group and user must be in the caller's workspace.

Request body

JSON body required.

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X POST "https://api.nimbusnexus.net/api/v1/groups/revoke" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '[
    {
      "user_id": "<user_id>",
      "group_id": "<group_id>"
    }
  ]'
GET/api/v1/groups/{group_id}

Get Group

Retrieve a single group by ID, scoped to the caller's workspace.

Parameters

NameInTypeDescription
group_id*pathstring—

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X GET "https://api.nimbusnexus.net/api/v1/groups/<group_id>" \
  -H "Authorization: Bearer $NIMBUS_KEY"
PATCH/api/v1/groups/{group_id}

Update Group

Update the name or description of an existing group within the caller's workspace.

Parameters

NameInTypeDescription
group_id*pathstring—

Request body

FieldTypeDescription
namestring | null—
descriptionstring | null—

Responses

  • 200Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X PATCH "https://api.nimbusnexus.net/api/v1/groups/<group_id>" \
  -H "Authorization: Bearer $NIMBUS_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
DELETE/api/v1/groups/{group_id}

Delete Group

Delete a group from the caller's workspace.

Parameters

NameInTypeDescription
group_id*pathstring—

Responses

  • 204Successful Response
  • 400Bad Request
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Validation error
  • 429Too Many Requests
  • 500Internal Server Error

Example

curl -X DELETE "https://api.nimbusnexus.net/api/v1/groups/<group_id>" \
  -H "Authorization: Bearer $NIMBUS_KEY"

Need to make a real call? Try these endpoints in the live Swagger UI →