Body Required
The user to create
-
The user's identifier
-
The user's security information
Additional properties are allowed.
-
metadata object
The users metadata
Additional properties are allowed.
-
full_name string
The user's optional full name
-
email string
The user's optional email address
-
builtin boolean
True if the user is a built-in read-only user
Responses
-
User successfully created
-
- The provided user name is invalid. Check that it is not empty and it does not contain special characters. (code:
user.user_name.invalid
) - Some of the provided roles are invalid. (code:
user.roles.invalid
) - Some of the provided roles are forbidden. (code:
user.roles.forbidden
) - Trying to set a restricted field. (code:
user.restricted_field
)
- The provided user name is invalid. Check that it is not empty and it does not contain special characters. (code:
-
The username is already in use. (code:
user.user_name.conflict
)
POST /users
curl \
-X POST https://{{hostname}}/api/v1/users \
-d '{"user_name":"string","security":{"roles":["string"],"permissions":["string"],"elevated_permissions":{"enabled":true,"expires_at":"2024-05-04T09:42:00+00:00"},"password":"string","enabled":true,"security_realm":{"type":"native","id":"string"}},"metadata":{"created_by":"string","created_at":"2024-05-04T09:42:00+00:00","updated_by":"string","updated_at":"2024-05-04T09:42:00+00:00","first_login_at":"2024-05-04T09:42:00+00:00","last_login_at":"2024-05-04T09:42:00+00:00"},"full_name":"string","email":"string","builtin":true}'
Request examples
{
"user_name": "string",
"security": {
"roles": [
"string"
],
"permissions": [
"string"
],
"elevated_permissions": {
"enabled": true,
"expires_at": "2024-05-04T09:42:00+00:00"
},
"password": "string",
"enabled": true,
"security_realm": {
"type": "native",
"id": "string"
}
},
"metadata": {
"created_by": "string",
"created_at": "2024-05-04T09:42:00+00:00",
"updated_by": "string",
"updated_at": "2024-05-04T09:42:00+00:00",
"first_login_at": "2024-05-04T09:42:00+00:00",
"last_login_at": "2024-05-04T09:42:00+00:00"
},
"full_name": "string",
"email": "string",
"builtin": true
}
Response examples (200)
{
"user_name": "string",
"security": {
"roles": [
"string"
],
"permissions": [
"string"
],
"elevated_permissions": {
"enabled": true,
"expires_at": "2024-05-04T09:42:00+00:00"
},
"password": "string",
"enabled": true,
"security_realm": {
"type": "native",
"id": "string"
}
},
"metadata": {
"created_by": "string",
"created_at": "2024-05-04T09:42:00+00:00",
"updated_by": "string",
"updated_at": "2024-05-04T09:42:00+00:00",
"first_login_at": "2024-05-04T09:42:00+00:00",
"last_login_at": "2024-05-04T09:42:00+00:00"
},
"full_name": "string",
"email": "string",
"builtin": true
}
Response examples (400)
# Headers
x-cloud-error-codes: user.user_name.invalid
# Payload
{
"errors": [
{
"code": "string",
"message": "string",
"fields": [
"string"
]
}
]
}
Response examples (409)
# Headers
x-cloud-error-codes: user.user_name.conflict
# Payload
{
"errors": [
{
"code": "string",
"message": "string",
"fields": [
"string"
]
}
]
}