getSelf

GET https://{{host}}/api/v1/self

Get ‘whoami’ and privileges (which org and which sites I have access to)

Response Parameter

NameTypeDescription
emailstringemail of logged-in user
first_namestringfirst name of logged-in user
last_namestringlast name of logged-in user
phonestringphone number (numbers only, including country code)
phone2stringsecondary phone number (numbers only, including country code)
via_ssobooleanan admin alogin via_sso is more restircted. (password and email cannot be changed)
compliance_statusstringoptional, restricted / blocked (trade compliance status)
tagslistlist of strings indicating capabilities. e.g. what to show/hide/disable/enable for this user
no_trackingbooleanwhen it doesn’t exist, it’s assumed true on EU (i.e. no tracking, the user has to opt-in); otherwise, the user would have to opt-out

RESPONSES

status: OK

{"email":"test@mistsys.com","first_name":"John","last_name":"Smith","phone":"14081112222","phone2":"","via_sso":false,"no_tracking":false,"privileges":[{"scope":"org","org_id":"9ff00eec-24f0-44d7-bda4-6238c81376ee","name":"TestCompany","role":"write","views":["location"],"msp_id":"9520c63a-f7b3-670c-0944-727774d5a722","msp_name":"MSP","msp_url":"https://...","msp_logo_url":"https://.../logo/9520c63a-f7b3-670c-0944-727774d5a722.jpeg","orggroup_ids":["9ff00eec-24f0-44d7-bda4-6238c81376ee"]},{"scope":"site","site_id":"d96e3952-53e8-4266-959a-45acd55f5114","name":"Mist Office","role":"admin","org_id":"9ff00eec-24f0-44d7-bda4-6238c81376ee","org_name":"TestCompany","sitegroup_ids":["581328b6-e382-f54e-c9dc-999983183a34"],"msp_id":"9520c63a-f7b3-670c-0944-727774d5a722","msp_url":"https://...","msp_logo_url":"https://.../logo/9520c63a-f7b3-670c-0944-727774d5a722.jpeg"},{"scope":"msp","msp_id":"9520c63a-f7b3-670c-0944-727774d5a722","name":"MSP","msp_url":"https://...","msp_logo_url":"https://.../logo/9520c63a-f7b3-670c-0944-727774d5a722.jpeg","role":"admin"}],"tags":["has_8021x","mist"]}