-
Notifications
You must be signed in to change notification settings - Fork 4
API User
mkb edited this page Jul 4, 2013
·
1 revision
This request will deliver the either the user model (if logged in) or the two URLs for registering and "I forgot my password".
/user
HTTP GET Request:
http://www.example.com/rest.php/user
GET Variables: none
Reply:
{
"register_url": "\/Home\/specialpage\/register",
"pwreset_url": "\/Home\/specialpage\/pwreset"
}HTTP GET Request:
http://www.example.com/rest.php/user
GET Variables: none
Reply:
{
"Name": "Toni",
"Logo": "\/typo3conf\/ext\/we_betatext\/default.jpg",
"Verified": 1,
"profile_url": "\/Home\/specialpage\/editprofile"
}There are 3 different possible replies:
- 200 - User Model JSON
- 401 - 'Authentication failed'
- 401 - 'User not found'
HTTP POST Request:
/login
POST Variables:
{
"username": "Alice@example.com",
"password": "ieV8Lu5Oophu"
}Reply:
{
"Name": "Alice",
"Logo": "\/typo3conf\/ext\/we_betatext\/default.jpg",
"Verified": "0"
}This request will be replied with in any case with the two URLs to register and reseting the password.
HTTP POST Request:
/logout
POST Variables: none
Reply:
{
"register_url": "\/Home\/specialpage\/register",
"pwreset_url": "\/Home\/specialpage\/pwreset"
}