Users

Set User's Environment Role

Creates or updates a user's environment role.

put/api/v2/userRoles/{userID}/environments/{environmentID}

Request

  • Base URL: https://app.coalescesoftware.io
  • URL: https://app.coalescesoftware.io/api/v2/userRoles/{userID}/environments/{environmentID}
  • Auth: HTTP bearer

Request body

environmentRole'reader' | 'admin' required

The environment role to set

setDefaultProjectRole'member' | 'admin' | 'architect' | 'contributor'

If the user doesn't have a role for the environment's project, they will be assigned the role specified in setDefaultProjectRole. If setDefaultProjectRole is not specified and the user lacks a project role, attempting to assign an environment role will result in an HTTP 403 error.

Response

A single user's role information

userIDstring required

The user ID.

organizationRolestring

User's organization role. Excluded when requesting specific environments/projects if the role lacks project permissions.

projectRolesobject

Returns a dictionary mapping project IDs to user roles.

Example:

"45a4f214-8a3e-48c7-8c6b-ff284798de4c": "admin"

Format: projectID: userRole

Note: Only includes projects where the user has a role. Environment-only roles are excluded.

environmentRolesobject

Returns a dictionary mapping environment IDs to user roles.

Example:

"33": "admin"

Format: environmentID: userRole

Note: Only includes environments where the user has a role.

Changes

No recorded changes to this operation across all 1 revision of this API.