Skip to main content

CreateUserRequest

authorization objectrequired
Information about the user authorization. It contains the profile of the user, the authorization model to apply and the asset authorization.
asset object

Information about the user asset authorization. It contains the list of determined assets the user can access.

allboolean

Indicate whether the user has access to all assets or not. If true, the user has access to all assets (codes is ignored).

Example: true
codesundefined[]
modelIdstringrequired
Identifier of authorization model to apply on user. The authorization model is mostly used for determining services scope that user is allowed to use.

Possible values: non-empty

Example: 2b2e8a4b-bfbd-4c56-b8d6-c8cb1d8c58ba
profilestringrequired

Information about the user profile.

It can be Developer, Admin, etc.

Currently, profile is only used for information purpose and does not have any impact on the user rights.

Possible values: non-empty

Example: Developer
companystringrequired
Name of the company the user is working for. As the company is a mandatory field, it is not possible to create a user without a company. Also notice that as the company can access specific assets, the user will be able to access them too.

Possible values: non-empty

Example: corp
emailstring<email>required

Email of the user to create.

It is used as the username for our users in order to sign in our platform.

So it must be unique and valid.

Possible values: non-empty

Example: firstName.lastName@corp.com
firstNamestringrequired

First name of the user to create

Possible values: non-empty

Example: firstName
fromExternalIdpboolean
If the user sign in from an external identity provider, it should be set to true. This is useful to know if the identity is handled externally. In this case, the user will not have any password because the user needs to sign in from it identity provider to use Stonal platform.
Example: false
groupUidsstring[]
List of group uids to apply to the user. Available groups uids can be retrieved from the Stonal platform API via the GET /v1/organizations/{organizationCode}/users/groups endpoint.
Example: ["0192d7b7-2994-7ad5-9952-26862f33c21a","0192d7b7-7073-7e58-896c-07113f22363a"]
lastNamestringrequired

Last name of the user to create

Possible values: non-empty

Example: lastName
permissionUidsstring[]required
List of permission uids to apply to the user. Available permissions uids can be retrieved from the Stonal platform API via the GET /v1/organizations/{organizationCode}/users/permissions endpoint.
Example: ["0192d7b7-2994-7ad5-9952-26862f33c21a","0192d7b7-7073-7e58-896c-07113f22363a"]
CreateUserRequest
{
"authorization": {
"asset": {
"all": true,
"codes": [
"['S01', 'B01']"
]
},
"modelId": "2b2e8a4b-bfbd-4c56-b8d6-c8cb1d8c58ba",
"profile": "Developer"
},
"company": "corp",
"email": "firstName.lastName@corp.com",
"firstName": "firstName",
"fromExternalIdp": false,
"groupUids": [
"0192d7b7-2994-7ad5-9952-26862f33c21a",
"0192d7b7-7073-7e58-896c-07113f22363a"
],
"lastName": "lastName",
"permissionUids": [
"0192d7b7-2994-7ad5-9952-26862f33c21a",
"0192d7b7-7073-7e58-896c-07113f22363a"
]
}