Aller au contenu
NimbusNexus

Groupes d’utilisateurs

Un groupe d’utilisateurs est un ensemble nommé d’utilisateurs à qui vous pouvez accorder des rôles collectivement. Au lieu d’accorder reader sur un projet à quinze ingénieurs un par un, vous l’accordez au groupe backend-team et vous ajoutez les nouveaux ingénieurs au groupe. Accordez le rôle avec POST /api/v1/roles/grant, en indiquant le group et le project, et ajoutez des membres avec POST /api/v1/groups/grant.

La portée d’un groupe est un espace de travail. Un utilisateur peut appartenir à plusieurs groupes ; un groupe peut détenir des rôles dans plusieurs projets de son espace de travail. Les attributions de rôles sont additives — un utilisateur obtient l’union de tous les rôles qui lui sont accordés directement et de tous les rôles accordés aux groupes dont il fait partie.

Pour les petites équipes (moins de ~10 personnes), les attributions par utilisateur suffisent généralement. Les groupes deviennent la bonne réponse quelque part entre 10 et 50 utilisateurs, quand « auditer qui a accès au projet X » doit pouvoir se faire en quelques secondes, et non en vérifiant 30 entrées IAM à la main.

Étapes suivantes

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 →