The B12 API is hosted at https://b12.apprentx.rocks/api. An access token is required to access it, available on demand.
The B12 provisioning API implements the SCIM specification:
https://www.rfc-editor.org/rfc/rfc7644
B12 SCIM attributes
SCIM attribute mapping defines the attributes that synchronize between an Identity Provider (IdP) and B12 when users are provisioned and updated.
Below is the list of SCIM attributes that B12 supports.
Core
Chaque ressource SCIM inclut ces attributs communs:
| SCIM attribute | Description | Type | Mandatory | Default |
| id | B12 ID | String | Yes | |
| schemas | Array | Yes | ||
| schemas[] | String | Yes | ||
| meta | Object | Yes | ||
| meta.resourceType | String | Yes | ||
| meta.created | Datetime | Yes | ||
| meta.lastModified | Datetime | Yes | ||
| meta.location | String | No | ||
| meta.version | String | No |
https://www.rfc-editor.org/rfc/rfc7643#section-3.1
User
| SCIM attribute | Description | Type | Mandatory | Default |
| userName | Sous format email | String | Yes | |
| name | Object | Yes | ||
| name.givenName | Prénom de l'utilisateur | String | Yes | |
| name.familyName | Nom de famille de l'utilisateur | String | Yes | |
| active | Boolean | No | true | |
| emails | Array | Yes | ||
| emails[].value | String | Yes | ||
| preferredLanguage | B12 ne supporte que le français et l'anglais | String | No | "fr-CA" |
| timezone | Sous le format IANA ex.: "Europe/Paris" | String | No | "America/Toronto" |
| roles | Array | No | [{ value: "LEARNER" }] | |
| roles[].value | Valeurs possibles: LEARNER, MANAGER, TRAINER, DESIGNER, ADMIN | String | Yes |
https://www.rfc-editor.org/rfc/rfc7643#section-4.1
User extension
Custom attributes can be mapped from an IdP to custom fields in B12. SCIM attributes are in the following format:
urn:ietf:params:scim:schemas:extension:customb12:2.0:User:[B12_USER_FIELD_ID]| SCIM attribute | Description | Type | Mandatory | Default |
|
urn:ietf:params: scim:schemas: extension:customb12: 2.0:User |
Object | No | ||
|
urn:ietf:params: scim:schemas: extension:customb12: 2.0:User:[B12_USER_FIELD_ID] |
String | No |
Endpoints
GET /api/scim/v2/Users
To fetch an array of users matching a specified filter.
GET /api/scim/v2/Users/:userId
To fetch a user by id.
POST /api/scim/v2/Users
To create a user.
PATCH /api/scim/v2/Users/:userId
To update a user by id.
DELETE /api/scim/v2/Users/:userId
To delete (deactivate) a user by id.