Registers a new client.
Property | Type | Required |
---|---|---|
username | alphanumeric, unique | Yes |
password1 | String at least 8 alpha-numeric characters | Yes |
password2 | String at least 8 alpha-numeric characters, should equal 'password1' | Yes |
requires an @ and a . as in a typical email address, unique |
no |
Success
{
key: 'a123123b321321c123123',
};
Fail
{
username: 'Reason for failure',
email: 'Reason for failure',
password1: 'Reason for failure',
password2: 'Reason for failure'
}
// params:
{
username,
email, // Optional
password,
}
// params:
{
// none
}
// params:
{
email
}
// params:
{
uid,
token,
new_password1,
new_password2
}
// params:
{
new_password1,
new_password2,
old_password
}
// todo
### GET, PUT, PATCH -- `/hairschool/rest-auth/user/`
### POST -- `/hairschool/rest-auth/rest-auth/facebook/`
### POST -- `/hairschool/rest-auth/rest-auth/twitter/`
Gets all users in database.
Token must be set in Authorization headers as 'token a123123b321321c123123'
Success
{
[
{
username: 'username',
email: 'email'
},
{
username: 'username',
email: 'email'
},
{
username: 'username',
email: 'email'
},
// ... continues to lists all users
]
};
Fail
{
detail: 'Failure info'
}