Set a SCIM group's role mapping
const url = 'http://localhost:8080/api/v1/orgs/example/scim/groups/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/mapping';const options = { method: 'PUT', headers: { cookie: 'cetra_session=<cetra_session>', 'Content-Type': 'application/json' }, body: '{"org_role":"owner","projects":[{"project_id":"2489E9AD-2EE2-8E00-8EC9-32D5F69181C0","role":"admin"}]}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request PUT \ --url http://localhost:8080/api/v1/orgs/example/scim/groups/2489E9AD-2EE2-8E00-8EC9-32D5F69181C0/mapping \ --header 'Content-Type: application/json' \ --cookie cetra_session=<cetra_session> \ --data '{ "org_role": "owner", "projects": [ { "project_id": "2489E9AD-2EE2-8E00-8EC9-32D5F69181C0", "role": "admin" } ] }'Replaces the group’s org role and project roles (D-EA-14). A member gets the highest of their groups’ roles, else the default role; owners are never changed. The org role is admin, member or viewer; owner is a 400. Raising a role needs the scim feature, and writing a project role needs project_roles; lowering works without them (D-EA-19). A mapping with neither an org role nor a project is a 400: delete it instead. While SCIM is on, the group’s members are recomputed. Owners only, session only.
Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Org UUID or slug.
Group id.
Request Bodyrequired
Section titled “Request Bodyrequired”PUT /api/v1/orgs/{org}/scim/groups/{id}/mapping body. The new mapping replaces the old
one; a mapping with neither an org role nor a project is refused (use DELETE).
object
The org role the group gives: admin, member or viewer. Omit it to give none.
One project role per project, at most 200. Omit the list to map no project.
A project role of a group mapping.
object
Project id.
The project role: admin, member, viewer or none (hidden).
Responses
Section titled “Responses”The group, with its new mapping.
One SCIM group of the org, with its role mapping (D-EA-14). The display name is shown to owners on their settings page only; it is never logged or recorded.
object
The name the identity provider gave the group.
The identity provider’s external id, when it sent one. Absent when it did not.
Group id.
The group’s role mapping. Absent when the group maps nothing.
object
The org role the group gives: admin, member or viewer. null when it gives none.
One project role per project. Empty when the group maps no project.
A project role of a group mapping.
object
Project id.
The project role: admin, member, viewer or none (hidden).
How many SCIM users are in the group.
Example
{ "mapping": { "org_role": "owner", "projects": [ { "role": "admin" } ] }}The request is malformed or a filter is invalid.
RFC 7807 problem document.
Spec 09 § Conventions.
object
Machine-readable error code.
Extra explanation. Omitted when absent.
Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.
One field that failed validation.
Spec 09 § Conventions.
object
Request field, query parameter, or expression the error refers to.
What is wrong with the field.
Location inside the field value, for filter and SQL errors.
object
1-based column number, in characters.
1-based line number, in characters.
HTTP status code.
Short human-readable summary, the reason phrase of status.
Problem type URI. Always about:blank in this version.
Example
{ "code": "bad_request"}No credentials, or the credentials are invalid.
RFC 7807 problem document.
Spec 09 § Conventions.
object
Machine-readable error code.
Extra explanation. Omitted when absent.
Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.
One field that failed validation.
Spec 09 § Conventions.
object
Request field, query parameter, or expression the error refers to.
What is wrong with the field.
Location inside the field value, for filter and SQL errors.
object
1-based column number, in characters.
1-based line number, in characters.
HTTP status code.
Short human-readable summary, the reason phrase of status.
Problem type URI. Always about:blank in this version.
Example
{ "code": "bad_request"}The credentials do not allow this operation, or the organization’s plan does not include it (code plan_required).
RFC 7807 problem document.
Spec 09 § Conventions.
object
Machine-readable error code.
Extra explanation. Omitted when absent.
Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.
One field that failed validation.
Spec 09 § Conventions.
object
Request field, query parameter, or expression the error refers to.
What is wrong with the field.
Location inside the field value, for filter and SQL errors.
object
1-based column number, in characters.
1-based line number, in characters.
HTTP status code.
Short human-readable summary, the reason phrase of status.
Problem type URI. Always about:blank in this version.
Example
{ "code": "bad_request"}The resource does not exist.
RFC 7807 problem document.
Spec 09 § Conventions.
object
Machine-readable error code.
Extra explanation. Omitted when absent.
Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.
One field that failed validation.
Spec 09 § Conventions.
object
Request field, query parameter, or expression the error refers to.
What is wrong with the field.
Location inside the field value, for filter and SQL errors.
object
1-based column number, in characters.
1-based line number, in characters.
HTTP status code.
Short human-readable summary, the reason phrase of status.
Problem type URI. Always about:blank in this version.
Example
{ "code": "bad_request"}Too many requests.
RFC 7807 problem document.
Spec 09 § Conventions.
object
Machine-readable error code.
Extra explanation. Omitted when absent.
Field errors. Omitted when empty, because RFC 7807 clients expect the member to be absent.
One field that failed validation.
Spec 09 § Conventions.
object
Request field, query parameter, or expression the error refers to.
What is wrong with the field.
Location inside the field value, for filter and SQL errors.
object
1-based column number, in characters.
1-based line number, in characters.
HTTP status code.
Short human-readable summary, the reason phrase of status.
Problem type URI. Always about:blank in this version.
Example
{ "code": "bad_request"}