GuidesAuthentication

Overview

Authentication covers how to login (authenticate against the API endpoint) and get the privileges, against which organization(s) and site(s) the admin is granted to.

See If Login Already

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

GET /api/v1/self

Response if a valid session has been created

Status: 200 OK

{
    "email": "test@mistsys.com",
    "first_name": "John",
    "last_name": "Smith",
    "phone": "14081112222",
    "phone2": "",
    "via_sso": false,
    "tags": [ "has_8021x", "mist" ]
}

Definitions

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 login via_sso is more restricted. (password and email cannot be changed)
tagslistlist of strings indicating capabilities. e.g. what to show/hide/disable/enable for this user

Response if two-factor authentication is pending

Status: 200 OK

{
    "email": "test@mistsys.com",
    "privileges": null,
    "two_factor_required": true,
    "two_factor_passed": false
}

Login Lookup

POST /api/v1/login/lookup

Example

{
    "email": "test@mistsys.com"
}

Parameter

NameTypeDescription
emailstringRequired.

Response if user does not exist

Status: 404 Not Found

Response if local account exists

Status: 200 OK

Response if SSO user exists

Status: 200 OK

{
    "sso_url": "https://my.sso/idp_sso_url"
}

Logout

POST /api/v1/logout

Response

Status: 200 OK

{
    // if configured in SSO as custom_logout_url
    "forward_url": "https://my.sso/custom_logout_url"
}

On this page