Note | ||
---|---|---|
| ||
This API is only available in versions 0.x. As of versions 1.x, the logout function is deprecated |
General Information
...
Service | API | Method |
---|---|---|
urac | / |
logout | GET |
...
Workflow:
...
...
Description |
---|
...
N/A | N/A | N/A | N/A |
...
Output
Valid Response
Code Block | ||||
---|---|---|---|---|
| ||||
{
"result": true,
"data": {
"_id": "57063608622c47b5c097d19b",
"locked": true,
"username": "owner",
"firstName": "owner",
"lastName": "owner",
"email": "owner@soajs.org",
"ts": 1460024840683,
"status": "active",
"profile": {},
"groups": ["owner"],
"config": {},
"tenant": {
"id": "5551aca9e179c39b760f7a1a",
"code": "DBTN"
},
"groupsConfig": [{
"_id": "57063608622c47b5c097d19d",
"locked": true,
"code": "owner",
"name": "Owner Group",
"description": "this is the owner group that owns the dashboard",
"tenant ": {
"id ": "5551aca9e179c39b760f7a1a",
"code ": "DBTN"
}
}]
},
"soajsauth": "Basic c29hanM6QzAyMzcybVZla3AybWdjODNxNHJOSnQ3QVJkVktlNmdMd0U="
} |
Invalid Response
Code Block | ||||
---|---|---|---|---|
| ||||
{
"result":false,
"errors":{
"codes":[400],
"details":[
{
"code":400,
"message":"Problem with the provided password"
}
]
}
} |
Error Codes400 Problem with the provided password 401 Unable to log in the user. User not found.
Code
Description
N/A | This api does not need any parameters |
Example (CURL)
...
Request
Code Block | ||||
---|---|---|---|---|
| ||||
> CURL -X POSTGET http://127.0.0.1:4000/urac/login -d 'username=john&password=johnpassword'logout |
Response
Code Block | ||||
---|---|---|---|---|
| ||||
{ "result": true, "data": { "_id": "57063608622c47b5c097d19b", "locked": true, "username": "john", "firstName": "John", "lastName": "Doe", "email": "john@domain.com", "ts": 1460024840683, "status": "active", "profile": {}, "groups": ["administrator"], "config": {}, "tenant": { "id": "4442aca8e268c28b650f6a2a", "code": "TEST" }, "groupsConfig": [{ "_id": "55ffbb4bc92cb880753f8d3e", "locked": true, "code": "administrator", "name": "Administrator", "description": "Administrator Group for tenant Test", "tenant ": { "id ": "4442aca8e268c28b650f6a2a", "code ": "TEST" } }] }, "soajsauth": "Basic c29hanM6QzAxNkh5YXdPclhESVkxeU1makJyYV85OHdza2k5bWVDRTY=" } |