Authentication
A Token is required for accessing the Management APIs and this API creates a Access Token for specified user.
There are 2 options for creating Access Token:
- From Management Console
- From Management API
1. Create Personal API Access Token from Management Console
The user who logs into the application should go to My Profile screen via Quick Menu to update their information.
The picture below shows the Profile settings:
The fields used for the profile configuration are shown in the table below.
Field | Description |
---|---|
Username | The user's login name for the application. |
Full Name | The user's first and last name. |
The user's email address. | |
Preferred Language | The selected language for the application. |
Personal API Access Tokens | This section lists the user's personal API access token information required for accessing the Apinizer Management API. Clicking the Revoke button for the current token cancels it. |
Creating an Personal API Access Token
The Personal API Access Token is used for authentication instead of a password when accessing the Apinizer Management API.
A token can be created through the dialog that appears when the Create API Token button is clicked.
The picture below shows the creating a token dialog:
The fields used for creating a personal API access token are shown in the table below.
Field | Description |
---|---|
Token Name | The name of the token. |
Expiration | The expiration type for the token is selected. |
Expiration Date | If the Expiration field is set to Custom, this field becomes active. A specific date is chosen for the token's expiration. |
2.Create Personal API Access Token from Management API
Endpoint: https://<APINIZER_MANAGER_ADDRESS>/apiops/auth/token
HTTP Method: POST
Request Headers:
Header | Value |
---|---|
Content-Type | application/x-www-form-urlencoded |
Accept | application/json |
Request Body: (urlencoded)
Parameter | Value |
---|---|
grant_type | client_credentials |
client_id | username of the Apinizer User used for management application login |
client_secret | password of the Apinizer User used for management application login |
Response:
Status | Status Code | Description | Body | Header |
---|---|---|---|---|
Success | 200 | successful operation | { | Content-Type: application/json;charset=UTF-8 |
Error | 400 | bad request | { "error": "...", "error_description": "..." } | Content-Type: application/json;charset=UTF-8 |
Error | 401 | not authorized for this operation | { | Content-Type: application/json;charset=UTF-8 |
Error | 500 | internal error | { "error": "...", "error_description": "..." } | Content-Type: application/json;charset=UTF-8 |