Create User
Creates a new user account in the system.
Request
| Property | Value |
|---|---|
| Method | POST |
| URL | /api/users |
| Content-Type | application/json |
| Authentication | Bearer Token |
Request
curl -X POST "{BASE_URL}/api/users" \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"key": "value"}'
Request Body
| Parameter | Type | Required | Description |
|---|---|---|---|
data.attributes.username | string | Yes | User's username |
data.attributes.password | string | Yes | User's password |
data.attributes.accessRights | array | Yes | List of access rights |
data.attributes.accessRights[].name | "server" | "viewer" | "application" | "stream" | Yes | Access right category |
data.attributes.accessRights[].value | "none" | "read_only" | "read_write" | Yes | Access right level |
Example Request
Request Body
{
"data": {
"attributes": {
"username": "username",
"password": "password",
"accessRights": [
{ "name": "server", "value": "read_write" },
{ "name": "viewer", "value": "read_write" },
{ "name": "application", "value": "read_write" },
{ "name": "stream", "value": "read_write" }
]
}
}
}
Response Body
| Parameter | Type | Description |
|---|---|---|
data.id | integer | Unique identifier of the created user |
data.attributes.username.value | string | The username of the created user |
data.attributes.username.editable | boolean | Indicates if the username can be modified |
data.attributes.username.lockedBy | string | Identifier of the entity that locked this field (if locked) |
data.attributes.password.value | string | Masked password value (always returns "******") |
data.attributes.password.editable | boolean | Indicates if the password can be modified |
data.attributes.password.masked | boolean | Indicates if the password value is masked |
data.attributes.password.lockedBy | string | Identifier of the entity that locked this field (if locked) |
data.attributes.algorithm.value | string | Password hashing algorithm |
data.attributes.algorithm.editable | boolean | Indicates if the algorithm can be modified |
data.attributes.algorithm.lockedBy | string | Identifier of the entity that locked this field (if locked) |
data.attributes.accessRights | array | List of access rights assigned to the user |
data.attributes.accessRights[].name | "Server" | "Stream" | "Application" | Access right category name |
data.attributes.accessRights[].value | "NONE" | "READ_ONLY" | "READ_WRITE" | Access right level |
meta.executionTime | integer | Request processing time in milliseconds |
meta.generatedAt | integer | Response generation timestamp (Unix timestamp in ms) |
message | string | Main response status message |
Successful Response (200)
{
"data": {
"id": 1,
"attributes": {
"username": {
"editable": true,
"value": "username"
},
"password": {
"editable": true,
"masked": true,
"value": "******"
},
"algorithm": {
"editable": false,
"value": "PLAIN"
},
"accessRights": [
{ "name": "Server", "value": "NONE" },
{ "name": "Stream", "value": "NONE" },
{ "name": "Application", "value": "NONE" }
]
}
},
"meta": {
"executionTime": 21,
"generatedAt": 1764232021849
},
"message": "User created successfully"
}
Error Responses
| Parameter | Type | Description |
|---|---|---|
message | string | Human-readable error message |
errors.attributes.username | string[] | Array of validation errors for username field |
errors.attributes.password | string[] | Array of validation errors for password field |
errors.attributes.accessRights | string[] | Array of validation errors for accessRights field |
Username Already Exists (409)
{
"message": "User with given username already exists",
"errors": {
"attributes": {
"username": [
"User with this username already exists"
]
}
}
}
Validation Error (400)
{
"message": "Validation failed",
"errors": {
"attributes": {
"username": [
"Username is required"
],
"password": [
"Password is required"
],
"accessRights": [
"Access rights are required"
]
}
}
}
Notes
- The username must be unique across the system.
- All fields in the request body are required.
Support Needed?
Create a free ticket and our support team will provide you necessary assistance.