Note
This page is still a work in progress!
Authentication APIs¶
- Log in to a dashboard application
- Log out of the dashboard application
- Redirect URL for login using authorization grant type
Log in to a dashboard application¶
Overview¶
| Overview | Logs in to the apps in dashboard runtime such as portal, monitoring or business-rules app. |
| API Context | /login/{appName} |
| HTTP Method | POST |
| Request/Response Format | |
| Runtime | Dashboard |
Parameter description¶
| Parameter | Type | Description | Possible Values |
|---|---|---|---|
appName |
Path param | The application to which you need to log in. | portal/monitoring/business-rules |
| username | Body param | Username for the login | |
| password | Body param | Password for the login | |
| grantType | Body param | Grant type used for the login | password/
|
|
Body param | Whether remember me function enabled | false/true |
curl command syntax¶
curl -X POST "https://analytics.wso2.com/login/{appName}" -H "accept: application/json" -H "Content-Type: application/x-www-form-urlencoded" -d "username={username}&password={password}&grantType={grantTypr}&rememberMe={rememberMe}"
Sample curl command¶
curl -X POST "https://localhost:9643/login/portal"
-H "Content-Type: application/x-www-form-urlencoded" -d "username=admin&password=admin&grantType=password"
Sample output¶
{"authUser":"admin","pID":"71368eff-cc71-44ef","lID":"a60c1098-3de0-42fb","validityPeriod":3600}
Response¶
| HTTP Status Code | 200 or 404 For descriptions of the HTTP status codes, see HTTP Status Codes . |
Log out of the dashboard application¶
Overview¶
| Overview | Logs out of the dashboard application. |
| API Context | /logout/{appName} |
| HTTP Method | POST |
| Request/Response Format | application/json |
| Runtime | Dashboard |
curl command syntax¶
curl -X POST "https://analytics.wso2.com/logout/{appName}" -H "accept: application/json" -H "Authorzation: Bearer {access token}"
Sample curl command¶
curl -X POST "https://analytics.wso2.com/logout/portal" -H "accept: application/json" -H "Authorzation: Bearer 123456"
Sample output¶
N/A
Response¶
| HTTP Status Code | 200 or 404 For descriptions of the HTTP status codes, see HTTP Status Codes . |
Redirect URL for login using authorization grant type¶
Overview¶
| Overview | Redirects URL by the IS in authorization grant type - OAuth2. |
| API Context | /login/callback/{appName} |
| HTTP Method | GET |
| Request/Response Format | JSON |
| Runtime | Dashbaord |
Parameter description¶
| Parameter | Description |
|---|---|
{appName} |
The application of which the URL needs to be redirected. |
curl command syntax¶
Sample curl command¶
curl -X GET "https://localhost:9643/login/callback/portal"
Sample output¶
Response¶
| HTTP Status Code | 200 or 404 For descriptions of the HTTP status codes, see HTTP Status Codes . |