HTTP REQUEST : Method GET
HTTP RESPONSE : Content-type application/json
http://eenox.net/api/create/user/en/johndoe/john.doe@mail.com/johnpassword/82RT7F
You will get a unique AUTH TOKEN, (like the one from the JSON object below) for each user. STORE EACH AUTH TOKEN SAFELY to authenticate your users and call REST actions anytime from your web server (STATELESS WAY).
For each request, either you will get successful JSON object response :
{
'STATUS' : 'SUCCESS',
'LABEL' : 'Created successfully',
'TOKEN' : '2cd0f5dae55e15d1d83797c03397222344561f64'
}
Or unsuccessful JSON object without TOKEN but with an explicit human readable label explaining why creation failed :
{
'STATUS' : 'ERROR',
'LABEL' : 'Missing REST parameters'
}
{
'STATUS' : 'ERROR',
'LABEL' : 'Username too long > 40'
}
HTTP REQUEST : Method GET
HTTP RESPONSE : Content-type application/json
http://eenox.net/api/modify/user/fr/john/another@email.com/anotherpwd/2cd0f5dae55e15d1d83797c03397222344561f64
Either you will get successful JSON object response :
{
'STATUS' : 'SUCCESS',
'LABEL' : 'Modified successfully'
}
Or unsuccessful JSON object with an explicit human readable label explaining why request failed :
{
'STATUS' : 'ERROR',
'LABEL' : 'Username invalid characters'
}
{
'STATUS' : 'ERROR',
'LABEL' : 'Email already exists'
}
HTTP REQUEST : Method GET
HTTP RESPONSE : Content-type application/json
http://eenox.net/api/delete/user/2cd0f5dae55e15d1d83797c03397222344561f64
Either you will get successful JSON object response :
{
'STATUS' : 'SUCCESS',
'LABEL' : 'Deleted successfully'
}
Or unsuccessful JSON object with an explicit human readable label explaining why request failed :
{
'STATUS' : 'ERROR',
'LABEL' : 'User not found'
}
{
'STATUS' : 'ERROR',
'LABEL' : 'Missing REST parameters'
}
