Show all Accounts the active User can access and with what permission level. Includes their own Account if they have one.
URL : /api/accounts/
Method : GET
Auth required : YES
Permissions required : None
Data constraints : {}
Condition : User can not see any Accounts.
Code : 200 OK
Content : {[]}
Condition : User can see one or more Accounts.
Code : 200 OK
Content : In this example, the User can see three Accounts as AccountAdmin
AA
, Viewer VV
, and Owner OO
- in that order:
[
{
"account": {
"id": 123,
"name": "Lots of Admins Project",
"enterprise": false,
"url": "http://testserver/api/accounts/123/"
},
"permission": "AA"
},
{
"account": {
"id": 234,
"name": "Feel free to View this",
"enterprise": false,
"url": "http://testserver/api/accounts/234/"
},
"permission": "VV"
},
{
"account": {
"id": 345,
"name": "Mr Owner Project",
"enterprise": false,
"url": "http://testserver/api/accounts/345/"
},
"permission": "OO"
}
]