Users
Magistrala CLI provides a simple and efficient way to manage users. Below are the key commands to create, authenticate, and manage users within your system.
Create User
To create a user using Magistrala-CLI
, run the following command:
magistrala-cli users create <first_name> <last_name> <email> <username> <password>
This command registers a new user with the provided details.
Example usage:
magistrala-cli users create jane doe janicedoe@example.com janicedoe 12345678
Expected response:
{
"created_at": "2025-02-11T16:15:12.607701Z",
"credentials": {
"username": "janicedoe"
},
"email": "janicedoe@example.com",
"first_name": "jane",
"id": "26ae3198-6060-4308-824c-c846953b9898",
"last_name": "doe",
"role": "user",
"status": "enabled",
"updated_at": "0001-01-01T00:00:00Z"
}
⚠️ Note: Ensure that usernames are unique to prevent conflicts.