Get Application Data

How to get the application data through the Cosync REST API

The getApplication function will retrieve the application name and data from the application record. This function does not require that a user be logged in to the application. The function will also return the application two-factor verification type. It will also return the password filtering parameters set at the application level.

URL
    /api/appuser/getApplication
Method
    GET
Headers
    app-token: "<App Token>"
Data Parameter
    None

Response:

Success:

StatusCode:
200 (OK)
Contents:
    {
        name: "<application name>",
        twoFactorVerification: "<'none' | 'google' | 'phone'>",
        passwordFilter: "<true | false>",
        passwordMinLength: "<integer>",
        passwordMinUpper: "<integer>",
        passwordMinLower: "<integer>",
        passwordMinDigit: "<integer>",
        passwordMinSpecial: "<integer>",
        appData: "<application data>"
    }

#### Error:

##### *StatusCode*:
400 (BAD REQUEST)
500 (INTERNAL SERVER ERROR)
##### *Contents*:
{
    code: "<internal error code>",
    message: "<readable error description>"
}
The internal codes are integers:

* 400 - invalid app token
* 401 - app no longer exists
* 402 - app is suspended
* 403 - missing parameter
* 404 - user account is suspended
* 500 - internal server error
* 602 - invalid data