This repository was archived by the owner on Aug 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
API.Routes.Register
Mestre-Tramador edited this page Aug 18, 2022
·
1 revision
/register
Passing valid data, a User can be created on the system.
| Name | Value | Description |
|---|---|---|
| Content-Type | application/json |
The User data shall be passed as JSON. |
{
"name": "Exper User",
"email": "unique.user@exper.com",
"password": "exper-pswd"
}| Field | Type | Required | Description |
|---|---|---|---|
| name | string |
true |
The complete name of the User. |
string |
true |
A unique email to serve as identifier. | |
| password | string |
true |
The password to allow the authentication. |
{
"user": {
"id": 1,
"name": "Exper Admin",
"email": "admin@exper.com",
"created_at": "2022-08-18T14:42:02.752Z",
"updated_at": "2022-08-18T14:42:02.752Z"
},
"token": "eyJhbGciOiJIUzI1NiJ9.eyJwYXNzd29yZCI6ImV4cGVyMTIzIiwiZW1haWwiOiJhZG1pbkBleHBlci5jb20ifQ.hCVaxs2PcGbragrSPcycbRkVyDytE8SRbsw1n23U3mM",
}Returns the User inserted data and also its unique ID and the JWT of the current session.
{
"error": "There was an error saving the User!"
}This error generally occurs when incorrect data format is sended.
{
"field": [
"First problem with the field.",
"Second problem..."
]
}Each one of the Request Body fields can be a key, with an array of strings detailing the errors.
Exper-Dat-Reader is licensed under the GNU GENERAL PUBLIC LICENSE Version 3.
If you'd like to contribute, please read our Contribution Guidelines.