Scim API
This page documents the 20 gateway endpoints tagged scim in the gateway's OpenAPI document. Every example targets a gateway on http://localhost:4000 and authenticates with the SPANWAY_API_KEY environment variable, which holds the master key or a virtual key that has access to the route. Request and response fields are taken from the schema the running gateway publishes at /openapi.json, and the same document is bundled with this site as openapi.json.
| Method | Path | Summary |
|---|---|---|
| GET | /scim/v2 | Discover the SCIM resource types |
| GET | /scim/v2/Groups | List or filter SCIM groups |
| POST | /scim/v2/Groups | Create a SCIM group as a team |
| GET | /scim/v2/Groups/{group_id} | Read one SCIM group |
| PUT | /scim/v2/Groups/{group_id} | Replace a SCIM group |
| PATCH | /scim/v2/Groups/{group_id} | Patch a SCIM group's name or members |
| DELETE | /scim/v2/Groups/{group_id} | Delete a SCIM group and its team |
| GET | /scim/v2/ResourceTypes | List the SCIM resource types |
| GET | /scim/v2/ResourceTypes/{resource_type_id} | Read one SCIM resource type |
| GET | /scim/v2/Schemas | List the SCIM schemas |
| GET | /scim/v2/Schemas/{schema_id} | Read one SCIM schema |
| GET | /scim/v2/ServiceProviderConfig | Describe what this SCIM service supports |
| GET | /scim/v2/Users | List or filter SCIM users |
| POST | /scim/v2/Users | Create a SCIM user |
| GET | /scim/v2/Users/{user_id} | Read one SCIM user |
| PUT | /scim/v2/Users/{user_id} | Replace a SCIM user |
| PATCH | /scim/v2/Users/{user_id} | Patch a SCIM user |
| DELETE | /scim/v2/Users/{user_id} | Delete a SCIM user |
| GET | /scim/v2/placeholders | List placeholder users that shadow real accounts |
| POST | /scim/v2/placeholders/{user_id}/merge | Merge a placeholder user into the account it shadows |
Endpoints
GET /scim/v2
Discover the SCIM resource types
The starting point an identity provider such as Okta or Microsoft Entra ID reads when you connect it, so it learns which kinds of records this gateway accepts: users and groups. Call it with a SCIM token: a deployment-wide one sees every user and team, and an organization token minted under organization single sign-on sees only that organization. Needs an enterprise license. Nothing is changed.
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
feature | query | string or null | No |
Example request:
curl -X GET "http://localhost:4000/scim/v2" \
-H "Authorization: Bearer $SPANWAY_API_KEY"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The User and Group resource types this gateway serves | application/json SCIMResourceTypeList |
| 401 | The bearer token is not a SCIM token | |
| 403 | Needs an enterprise license, and organization_sso for an organization token | |
| 422 | Validation Error | application/json HTTPValidationError |
| 500 | The gateway runs without a database, or could not create a group member it had to provision |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
Resources | array of SCIMResourceTypeDocument | Yes | The resource types |
schemas | array of string | Yes | Always the SCIM ListResponse schema |
totalResults | integer | Yes | How many resource types there are |
GET /scim/v2/Groups
List or filter SCIM groups
Lists the teams an identity provider manages as SCIM groups, one page at a time with startIndex and count (at most 100), optionally filtered by displayName. Call it with a SCIM token: a deployment-wide one sees every user and team, and an organization token minted under organization single sign-on sees only that organization. Needs an enterprise license. Nothing is changed.
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
startIndex | query | integer | No | |
count | query | integer | No | |
filter | query | string or null | No | |
feature | query | string or null | No |
Example request:
curl -X GET "http://localhost:4000/scim/v2/Groups" \
-H "Authorization: Bearer $SPANWAY_API_KEY"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | One page of groups, which are teams | application/json SCIMListResponse |
| 400 | The filter uses an attribute or operator the gateway does not support (scimType invalidFilter). Only displayName eq "<value>" is supported | |
| 401 | The bearer token is not a SCIM token | |
| 403 | Needs an enterprise license, and organization_sso for an organization token | |
| 422 | Validation Error | application/json HTTPValidationError |
| 500 | The gateway runs without a database, or could not create a group member it had to provision |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
Resources | array of SCIMUser-Output or array of SCIMGroup | Yes | The records on this page |
itemsPerPage | integer or null | No | How many records this page holds |
schemas | array of string | No | Always the SCIM ListResponse schema |
startIndex | integer or null | No | The position of the first record on this page, counting from 1 |
totalResults | integer | Yes | How many records match in all |
POST /scim/v2/Groups
Create a SCIM group as a team
Creates a gateway team from a group in the identity provider and adds the listed members. Members with no gateway user yet are created while the scim_upsert_user setting is on, the default, and refused with 400 when it is off. Call it with a SCIM token: a deployment-wide one sees every user and team, and an organization token minted under organization single sign-on sees only that organization. Needs an enterprise license.
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
feature | query | string or null | No |
Request body (application/json, schema SCIMGroup):
| Field | Type | Required | Description |
|---|---|---|---|
displayName | string | Yes | The team name |
externalId | string or null | No | The id the identity provider uses for the record |
id | string or null | No | The gateway id of the record |
members | array of SCIMMember or null | No | The people on the team |
meta | object or null | No | Record metadata such as resourceType, created and lastModified |
schemas | array of string | Yes | The SCIM schema URIs the record follows |
Example request:
curl -X POST "http://localhost:4000/scim/v2/Groups" \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"displayName": "Platform",
"members": [
{
"value": "jane@example.com"
}
],
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:Group"
]
}'
Responses:
| Status | Description | Body |
|---|---|---|
| 201 | The created team with the members that were users | application/json SCIMGroup |
| 400 | A member does not exist or is outside this token's organization | |
| 401 | The bearer token is not a SCIM token | |
| 403 | Needs an enterprise license, and organization_sso for an organization token | |
| 409 | A team with this id already exists | |
| 422 | Validation Error | application/json HTTPValidationError |
| 500 | The gateway runs without a database, or could not create a group member it had to provision |
GET /scim/v2/Groups/{group_id}
Read one SCIM group
Returns one team as a SCIM group with its members. Answers 404 when no team with that id is visible to the token. Call it with a SCIM token: a deployment-wide one sees every user and team, and an organization token minted under organization single sign-on sees only that organization. Needs an enterprise license. Nothing is changed.
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
group_id | path | string | Yes | |
feature | query | string or null | No |
Example request:
curl -X GET "http://localhost:4000/scim/v2/Groups/group_id-123" \
-H "Authorization: Bearer $SPANWAY_API_KEY"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The group with its members | application/json SCIMGroup |
| 401 | The bearer token is not a SCIM token | |
| 403 | Needs an enterprise license, and organization_sso for an organization token | |
| 404 | No group with this id that the token may see | |
| 422 | Validation Error | application/json HTTPValidationError |
| 500 | The gateway runs without a database, or could not create a group member it had to provision |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
displayName | string | Yes | The team name |
externalId | string or null | No | The id the identity provider uses for the record |
id | string or null | No | The gateway id of the record |
members | array of SCIMMember or null | No | The people on the team |
meta | object or null | No | Record metadata such as resourceType, created and lastModified |
schemas | array of string | Yes | The SCIM schema URIs the record follows |
PUT /scim/v2/Groups/{group_id}
Replace a SCIM group
Replaces a team's name and its full member list with what the identity provider sends, adding and removing members to match. Call it with a SCIM token: a deployment-wide one sees every user and team, and an organization token minted under organization single sign-on sees only that organization. Needs an enterprise license.
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
group_id | path | string | Yes | |
feature | query | string or null | No |
Request body (application/json, schema SCIMGroup):
| Field | Type | Required | Description |
|---|---|---|---|
displayName | string | Yes | The team name |
externalId | string or null | No | The id the identity provider uses for the record |
id | string or null | No | The gateway id of the record |
members | array of SCIMMember or null | No | The people on the team |
meta | object or null | No | Record metadata such as resourceType, created and lastModified |
schemas | array of string | Yes | The SCIM schema URIs the record follows |
Example request:
curl -X PUT "http://localhost:4000/scim/v2/Groups/group_id-123" \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"displayName": "Platform",
"members": [
{
"value": "jane@example.com"
}
],
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:Group"
]
}'
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The team after the replacement | application/json SCIMGroup |
| 400 | A member does not exist or is outside this token's organization | |
| 401 | The bearer token is not a SCIM token | |
| 403 | Needs an enterprise license, and organization_sso for an organization token | |
| 404 | No group with this id that the token may see | |
| 422 | Validation Error | application/json HTTPValidationError |
| 500 | The gateway runs without a database, or could not create a group member it had to provision |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
displayName | string | Yes | The team name |
externalId | string or null | No | The id the identity provider uses for the record |
id | string or null | No | The gateway id of the record |
members | array of SCIMMember or null | No | The people on the team |
meta | object or null | No | Record metadata such as resourceType, created and lastModified |
schemas | array of string | Yes | The SCIM schema URIs the record follows |
PATCH /scim/v2/Groups/{group_id}
Patch a SCIM group's name or members
Adds or removes team members, or renames the team, using SCIM PATCH operations, which is how most identity providers push group membership changes. Call it with a SCIM token: a deployment-wide one sees every user and team, and an organization token minted under organization single sign-on sees only that organization. Needs an enterprise license.
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
group_id | path | string | Yes | |
feature | query | string or null | No |
Request body (application/json, schema SCIMPatchOp):
| Field | Type | Required | Description |
|---|---|---|---|
Operations | array of SCIMPatchOperation | Yes | The changes to apply, in order |
schemas | array of string | No | Always the SCIM PatchOp schema |
Example request:
curl -X PATCH "http://localhost:4000/scim/v2/Groups/group_id-123" \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"Operations": [
{
"op": "add",
"path": "members",
"value": [
{
"value": "jane@example.com"
}
]
}
],
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:PatchOp"
]
}'
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The team after the operations | application/json SCIMGroup |
| 400 | An operation is not supported, or a member is outside this token's organization | |
| 401 | The bearer token is not a SCIM token | |
| 403 | Needs an enterprise license, and organization_sso for an organization token | |
| 404 | No group with this id that the token may see | |
| 422 | Validation Error | application/json HTTPValidationError |
| 500 | The gateway runs without a database, or could not create a group member it had to provision |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
displayName | string | Yes | The team name |
externalId | string or null | No | The id the identity provider uses for the record |
id | string or null | No | The gateway id of the record |
members | array of SCIMMember or null | No | The people on the team |
meta | object or null | No | Record metadata such as resourceType, created and lastModified |
schemas | array of string | Yes | The SCIM schema URIs the record follows |
DELETE /scim/v2/Groups/{group_id}
Delete a SCIM group and its team
Deletes the team behind a group when the group is removed in the identity provider. The team's members stay as users. Call it with a SCIM token: a deployment-wide one sees every user and team, and an organization token minted under organization single sign-on sees only that organization. Needs an enterprise license.
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
group_id | path | string | Yes | |
feature | query | string or null | No |
Example request:
curl -X DELETE "http://localhost:4000/scim/v2/Groups/group_id-123" \
-H "Authorization: Bearer $SPANWAY_API_KEY"
Responses:
| Status | Description | Body |
|---|---|---|
| 204 | The team is deleted | |
| 401 | The bearer token is not a SCIM token | |
| 403 | Needs an enterprise license, and organization_sso for an organization token | |
| 404 | No group with this id that the token may see | |
| 422 | Validation Error | application/json HTTPValidationError |
| 500 | The gateway runs without a database, or could not create a group member it had to provision |
GET /scim/v2/ResourceTypes
List the SCIM resource types
Lists the kinds of records an identity provider can manage here, users and groups, with the address and schema of each. Call it with a SCIM token: a deployment-wide one sees every user and team, and an organization token minted under organization single sign-on sees only that organization. Needs an enterprise license. Nothing is changed.
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
feature | query | string or null | No |
Example request:
curl -X GET "http://localhost:4000/scim/v2/ResourceTypes" \
-H "Authorization: Bearer $SPANWAY_API_KEY"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The User and Group resource types this gateway serves | application/json SCIMResourceTypeList |
| 401 | The bearer token is not a SCIM token | |
| 403 | Needs an enterprise license, and organization_sso for an organization token | |
| 422 | Validation Error | application/json HTTPValidationError |
| 500 | The gateway runs without a database, or could not create a group member it had to provision |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
Resources | array of SCIMResourceTypeDocument | Yes | The resource types |
schemas | array of string | Yes | Always the SCIM ListResponse schema |
totalResults | integer | Yes | How many resource types there are |
GET /scim/v2/ResourceTypes/{resource_type_id}
Read one SCIM resource type
Returns one kind of record an identity provider can manage here, User or Group, with its address and schema. Answers 404 for any other id. Call it with a SCIM token: a deployment-wide one sees every user and team, and an organization token minted under organization single sign-on sees only that organization. Needs an enterprise license. Nothing is changed.
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
resource_type_id | path | string | Yes | |
feature | query | string or null | No |
Example request:
curl -X GET "http://localhost:4000/scim/v2/ResourceTypes/resource_type_id-123" \
-H "Authorization: Bearer $SPANWAY_API_KEY"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The resource type | application/json SCIMResourceTypeDocument |
| 401 | The bearer token is not a SCIM token | |
| 403 | Needs an enterprise license, and organization_sso for an organization token | |
| 404 | No resource type with this id | |
| 422 | Validation Error | application/json HTTPValidationError |
| 500 | The gateway runs without a database, or could not create a group member it had to provision |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
description | string or null | No | What the resource type holds |
endpoint | string | Yes | The path its records live under |
id | string | Yes | The resource type id, User or Group |
meta | object or null | No | Record metadata such as resourceType and location |
name | string | Yes | The resource type name |
schema | string | Yes | The URI of the core schema this type uses |
schemas | array of string | Yes | Always the SCIM ResourceType schema |
GET /scim/v2/Schemas
List the SCIM schemas
Lists the field definitions of users and groups, so an identity provider knows which attributes it may send. Call it with a SCIM token: a deployment-wide one sees every user and team, and an organization token minted under organization single sign-on sees only that organization. Needs an enterprise license. Nothing is changed.
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
feature | query | string or null | No |
Example request:
curl -X GET "http://localhost:4000/scim/v2/Schemas" \
-H "Authorization: Bearer $SPANWAY_API_KEY"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The User and Group schemas with their attributes | application/json SCIMSchemaList |
| 401 | The bearer token is not a SCIM token | |
| 403 | Needs an enterprise license, and organization_sso for an organization token | |
| 422 | Validation Error | application/json HTTPValidationError |
| 500 | The gateway runs without a database, or could not create a group member it had to provision |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
Resources | array of SCIMSchema | Yes | The schemas |
schemas | array of string | Yes | Always the SCIM ListResponse schema |
totalResults | integer | Yes | How many schemas there are |
GET /scim/v2/Schemas/{schema_id}
Read one SCIM schema
Returns the field definitions of one schema, given its URI, such as urn:ietf:params:scim:schemas:core:2.0:User. Answers 404 for an unknown URI. Call it with a SCIM token: a deployment-wide one sees every user and team, and an organization token minted under organization single sign-on sees only that organization. Needs an enterprise license. Nothing is changed.
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
schema_id | path | string | Yes | |
feature | query | string or null | No |
Example request:
curl -X GET "http://localhost:4000/scim/v2/Schemas/schema_id-123" \
-H "Authorization: Bearer $SPANWAY_API_KEY"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The schema with its attributes | application/json SCIMSchema |
| 401 | The bearer token is not a SCIM token | |
| 403 | Needs an enterprise license, and organization_sso for an organization token | |
| 404 | No schema with this URI | |
| 422 | Validation Error | application/json HTTPValidationError |
| 500 | The gateway runs without a database, or could not create a group member it had to provision |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
attributes | array of SCIMSchemaAttribute | No | The attributes of the schema |
description | string or null | No | What the schema describes |
id | string | Yes | The schema URI |
meta | object or null | No | Record metadata such as resourceType and location |
name | string | Yes | The schema name |
schemas | array of string | No | Always the SCIM Schema schema |
GET /scim/v2/ServiceProviderConfig
Describe what this SCIM service supports
Tells an identity provider which optional SCIM features this gateway supports. PATCH and equality filters (userName and emails.value on users, displayName on groups, up to 100 results) are supported, while bulk changes, sorting, password changes and ETags are not. Call it with a SCIM token: a deployment-wide one sees every user and team, and an organization token minted under organization single sign-on sees only that organization. Needs an enterprise license. Nothing is changed.
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
feature | query | string or null | No |
Example request:
curl -X GET "http://localhost:4000/scim/v2/ServiceProviderConfig" \
-H "Authorization: Bearer $SPANWAY_API_KEY"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The SCIM features this gateway supports | application/json SCIMServiceProviderConfig |
| 401 | The bearer token is not a SCIM token | |
| 403 | Needs an enterprise license, and organization_sso for an organization token | |
| 422 | Validation Error | application/json HTTPValidationError |
| 500 | The gateway runs without a database, or could not create a group member it had to provision |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
authenticationSchemes | array of object or null | No | How identity providers authenticate, a bearer SCIM token |
bulk | SCIMFeature | No | Whether bulk requests are supported |
changePassword | SCIMFeature | No | Whether password changes are supported |
etag | SCIMFeature | No | Whether ETags are supported |
filter | SCIMFeature | No | Whether list filters are advertised |
meta | object or null | No | Record metadata such as resourceType and location |
patch | SCIMFeature | No | Whether PATCH requests are supported |
schemas | array of string | No | Always the SCIM ServiceProviderConfig schema |
sort | SCIMFeature | No | Whether sorting is supported |
GET /scim/v2/Users
List or filter SCIM users
Lists the gateway users an identity provider manages, one page at a time with startIndex and count (at most 100). An
identity provider sends a filter such as userName eq "jane@example.com" to check whether a person already exists
before creating them. Call it with a SCIM token: a deployment-wide one sees every user and team, and an organization
token minted under organization single sign-on sees only that organization. Needs an enterprise license. Nothing is
changed.
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
startIndex | query | integer | No | |
count | query | integer | No | |
filter | query | string or null | No | |
feature | query | string or null | No |
Example request:
curl -X GET "http://localhost:4000/scim/v2/Users" \
-H "Authorization: Bearer $SPANWAY_API_KEY"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | One page of users, filtered by userName when a filter is given | application/json SCIMListResponse |
| 400 | The filter uses an attribute or operator the gateway does not support (scimType invalidFilter). Only userName eq "<value>" and emails.value eq "<value>" are supported | |
| 401 | The bearer token is not a SCIM token | |
| 403 | Needs an enterprise license, and organization_sso for an organization token | |
| 422 | Validation Error | application/json HTTPValidationError |
| 500 | The gateway runs without a database, or could not create a group member it had to provision |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
Resources | array of SCIMUser-Output or array of SCIMGroup | Yes | The records on this page |
itemsPerPage | integer or null | No | How many records this page holds |
schemas | array of string | No | Always the SCIM ListResponse schema |
startIndex | integer or null | No | The position of the first record on this page, counting from 1 |
totalResults | integer | Yes | How many records match in all |
POST /scim/v2/Users
Create a SCIM user
Creates a gateway user when someone is assigned to the gateway in the identity provider, and adds them to the teams named in groups. Members of the group named by the scim_admin_group setting get the admin role, everyone else the default SCIM role. Answers 409 when a user with that userName already exists, which tells the identity provider to link the existing user instead. When the email already belongs to a gateway account, a deployment-wide token links the request to that account, updates it and answers 201 with its existing id, while an organization token gets 409. Call it with a SCIM token: a deployment-wide one sees every user and team, and an organization token minted under organization single sign-on sees only that organization. Needs an enterprise license.
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
feature | query | string or null | No |
Request body (application/json, schema SCIMUser-Input):
| Field | Type | Required | Description |
|---|---|---|---|
active | boolean | No | False blocks every key of the user, true lets them call models again |
displayName | string or null | No | The name to show for the person |
emails | array of SCIMUserEmail or null | No | The person's email addresses |
entitlements | array of SCIMMultiValuedAttribute or null | No | Entitlements the identity provider assigns, kept with the user |
externalId | string or null | No | The id the identity provider uses for the record |
groups | array of SCIMUserGroup or null | No | The teams the person belongs to |
id | string or null | No | The gateway id of the record |
meta | object or null | No | Record metadata such as resourceType, created and lastModified |
name | SCIMUserName or null | No | The person's name parts |
roles | array of SCIMMultiValuedAttribute or null | No | Roles the identity provider assigns, kept with the user |
schemas | array of string | Yes | The SCIM schema URIs the record follows |
urn:ietf:params:scim:schemas:extension:enterprise:2.0:User | SCIMEnterpriseUser or null | No | Enterprise attributes such as department and manager |
userName | string or null | No | The sign-in name, usually the email address, used as the gateway user id |
Example request:
curl -X POST "http://localhost:4000/scim/v2/Users" \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"active": true,
"emails": [
{
"primary": true,
"value": "jane@example.com"
}
],
"groups": [
{
"display": "Platform",
"value": "team-platform"
}
],
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:User"
],
"userName": "jane@example.com"
}'
Responses:
| Status | Description | Body |
|---|---|---|
| 201 | The created user, a member of the groups it named | application/json SCIMUser-Output |
| 400 | The email or identifier is not acceptable for this token's organization | |
| 401 | The bearer token is not a SCIM token | |
| 403 | Needs an enterprise license, and organization_sso for an organization token | |
| 409 | A user with this userName already exists, or an organization token sent an email another account uses | |
| 422 | Validation Error | application/json HTTPValidationError |
| 500 | The gateway runs without a database, or could not create a group member it had to provision |
GET /scim/v2/Users/{user_id}
Read one SCIM user
Returns one user with their email, active flag and the teams they belong to as groups. Answers 404 when no user with that id is visible to the token. Call it with a SCIM token: a deployment-wide one sees every user and team, and an organization token minted under organization single sign-on sees only that organization. Needs an enterprise license. Nothing is changed.
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
user_id | path | string | Yes | |
feature | query | string or null | No |
Example request:
curl -X GET "http://localhost:4000/scim/v2/Users/user_id-123" \
-H "Authorization: Bearer $SPANWAY_API_KEY"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The user | application/json SCIMUser-Output |
| 401 | The bearer token is not a SCIM token | |
| 403 | Needs an enterprise license, and organization_sso for an organization token | |
| 404 | No user with this id that the token may see | |
| 422 | Validation Error | application/json HTTPValidationError |
| 500 | The gateway runs without a database, or could not create a group member it had to provision |
PUT /scim/v2/Users/{user_id}
Replace a SCIM user
Replaces a user's details with what the identity provider sends, including the teams they belong to. Setting active to false blocks every virtual key of the user so they can no longer call models, and setting it back to true unblocks them. Call it with a SCIM token: a deployment-wide one sees every user and team, and an organization token minted under organization single sign-on sees only that organization. Needs an enterprise license.
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
user_id | path | string | Yes | |
feature | query | string or null | No |
Request body (application/json, schema SCIMUser-Input):
| Field | Type | Required | Description |
|---|---|---|---|
active | boolean | No | False blocks every key of the user, true lets them call models again |
displayName | string or null | No | The name to show for the person |
emails | array of SCIMUserEmail or null | No | The person's email addresses |
entitlements | array of SCIMMultiValuedAttribute or null | No | Entitlements the identity provider assigns, kept with the user |
externalId | string or null | No | The id the identity provider uses for the record |
groups | array of SCIMUserGroup or null | No | The teams the person belongs to |
id | string or null | No | The gateway id of the record |
meta | object or null | No | Record metadata such as resourceType, created and lastModified |
name | SCIMUserName or null | No | The person's name parts |
roles | array of SCIMMultiValuedAttribute or null | No | Roles the identity provider assigns, kept with the user |
schemas | array of string | Yes | The SCIM schema URIs the record follows |
urn:ietf:params:scim:schemas:extension:enterprise:2.0:User | SCIMEnterpriseUser or null | No | Enterprise attributes such as department and manager |
userName | string or null | No | The sign-in name, usually the email address, used as the gateway user id |
Example request:
curl -X PUT "http://localhost:4000/scim/v2/Users/user_id-123" \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"active": false,
"emails": [
{
"primary": true,
"value": "jane@example.com"
}
],
"groups": [
{
"display": "Platform",
"value": "team-platform"
}
],
"schemas": [
"urn:ietf:params:scim:schemas:core:2.0:User"
],
"userName": "jane@example.com"
}'
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The user after the replacement | application/json SCIMUser-Output |
| 400 | The email or identifier is not acceptable for this token's organization | |
| 401 | The bearer token is not a SCIM token | |
| 403 | The token's organization does not own this account | |
| 404 | No user with this id that the token may see | |
| 409 | The new email or identifier belongs to another account | |
| 422 | Validation Error | application/json HTTPValidationError |
| 500 | The gateway runs without a database, or could not create a group member it had to provision |
PATCH /scim/v2/Users/{user_id}
Patch a SCIM user
Changes part of a user, for example only the active flag or the email, using SCIM PATCH operations. Setting active to false blocks every virtual key of the user. Call it with a SCIM token: a deployment-wide one sees every user and team, and an organization token minted under organization single sign-on sees only that organization. Needs an enterprise license.
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
user_id | path | string | Yes | |
feature | query | string or null | No |
Request body (application/json, schema SCIMPatchOp):
| Field | Type | Required | Description |
|---|---|---|---|
Operations | array of SCIMPatchOperation | Yes | The changes to apply, in order |
schemas | array of string | No | Always the SCIM PatchOp schema |
Example request:
curl -X PATCH "http://localhost:4000/scim/v2/Users/user_id-123" \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"Operations": [
{
"op": "replace",
"path": "active",
"value": false
}
],
"schemas": [
"urn:ietf:params:scim:api:messages:2.0:PatchOp"
]
}'
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The user after the operations | application/json SCIMUser-Output |
| 400 | An operation is not supported, or a value is not acceptable for this token | |
| 401 | The bearer token is not a SCIM token | |
| 403 | The token's organization does not own this account | |
| 404 | No user with this id that the token may see | |
| 409 | A patched identifier already names another account | |
| 422 | Validation Error | application/json HTTPValidationError |
| 500 | The gateway runs without a database, or could not create a group member it had to provision |
DELETE /scim/v2/Users/{user_id}
Delete a SCIM user
Removes a user when they are unassigned or deleted in the identity provider. Their virtual keys are blocked, they are taken off every team and the user is deleted. An organization token that does not own the account only removes the user from its organization. Call it with a SCIM token: a deployment-wide one sees every user and team, and an organization token minted under organization single sign-on sees only that organization. Needs an enterprise license.
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
user_id | path | string | Yes | |
feature | query | string or null | No |
Example request:
curl -X DELETE "http://localhost:4000/scim/v2/Users/user_id-123" \
-H "Authorization: Bearer $SPANWAY_API_KEY"
Responses:
| Status | Description | Body |
|---|---|---|
| 204 | Deleted, or only removed from the organization when the token does not own the account | |
| 401 | The bearer token is not a SCIM token | |
| 403 | Needs an enterprise license, and organization_sso for an organization token | |
| 404 | No user with this id that the token may see | |
| 422 | Validation Error | application/json HTTPValidationError |
| 500 | The gateway runs without a database, or could not create a group member it had to provision |
GET /scim/v2/placeholders
List placeholder users that shadow real accounts
Lists user rows that block a real account from being synced. An earlier release created a user keyed by the raw group member value when it could not match it, and that row now shadows the account the value really names, so every push of that member is refused. Fold each one into the account it shadows with the merge route. A row with its own SSO identity or virtual keys is left out, because someone uses that account. Needs a deployment-wide SCIM token. Nothing is changed.
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
feature | query | string or null | No |
Example request:
curl -X GET "http://localhost:4000/scim/v2/placeholders" \
-H "Authorization: Bearer $SPANWAY_API_KEY"
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The placeholder rows with the account each one shadows and the teams it holds | application/json array of SCIMPlaceholder |
| 401 | The bearer token is not a SCIM token | |
| 403 | Placeholder repair needs a deployment-wide SCIM token | |
| 422 | Validation Error | application/json HTTPValidationError |
| 500 | The gateway runs without a database, or could not create a group member it had to provision |
POST /scim/v2/placeholders/{user_id}/merge
Merge a placeholder user into the account it shadows
Folds a placeholder user into the one account its id names by SSO identity or email. The account is added to every team the placeholder is on, then the placeholder is deleted the way the delete user route deletes a user, so the next group push resolves to the real account. Refused with 409 when the row has its own SSO identity, owns virtual keys, or names no account or several. Needs a deployment-wide SCIM token.
Parameters:
| Name | In | Type | Required | Description |
|---|---|---|---|---|
user_id | path | string | Yes | |
feature | query | string or null | No |
Request body (application/json, object):
Example request:
curl -X POST "http://localhost:4000/scim/v2/placeholders/user_id-123/merge" \
-H "Authorization: Bearer $SPANWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{}'
Responses:
| Status | Description | Body |
|---|---|---|
| 200 | The account joined the placeholder's teams and the placeholder is deleted | application/json SCIMPlaceholderMergeResult |
| 401 | The bearer token is not a SCIM token | |
| 403 | Placeholder repair needs a deployment-wide SCIM token | |
| 404 | No placeholder with this id | |
| 409 | The row has its own SSO identity, owns virtual keys, or names no account | |
| 422 | Validation Error | application/json HTTPValidationError |
| 500 | The gateway runs without a database, or could not create a group member it had to provision |
Response fields (200):
| Field | Type | Required | Description |
|---|---|---|---|
merged_into_user_id | string | Yes | The account it was folded into |
placeholder_user_id | string | Yes | The placeholder user that was folded in and deleted |
team_ids | array of string | Yes | The teams that account joined |