The following REST APIs are available for managing user and their permissions in FMPS.
A POST method that registers a new user, and can only be used when typeOfAuth is set as USERLOGIN in development.json. Only a user with administrative privileges can register other users.
http://<FMPS_server>:<port>/v16/auth/register
Name | Type | Description |
---|---|---|
content-type |
String | Type of content that is sent in the request. |
X-Access-Token |
String | The authentication token that is sent in the request. This must be of another user with administrative privileges. |
{
"content-type": "application/json",
"X-Access-Token": "eyJ0eXAiOiJKhjshjafakjfkadfas"
}
The authorization header must also contain the basic authentication type authorization containing credentials (email and password) of the user who is to be registered. For example:
Authorization: Basic YWJjZEBhZG9iZS5jb206YWJjZA==
Name | Type | Description |
---|---|---|
email |
JSON | An email ID with which the user account is created. |
{"email":"fmadmin@adobe.com"}
Returns a HTTP 200 (Successful) response with the user object.
Code | Type | Description |
---|---|---|
400 |
String | A bad request is sent. |
406 |
String | The request is not acceptable |
409 |
String | User with the same credentials is already present. |
A PUT method that changes the user permissions. There are two types of user permissions: USER and ADMIN. Only a user with ADMIN permissions can invoke this API.
To assign administrative permissions to your default (first) LDAP user, you will have to use the MongoDB’s command-line tool. See Install and configure MongoDB for more details.
http://<FMPS_server>:<port>/v16/user/changePermission/:id
Name | Type | Description |
---|---|---|
content-type |
String | Type of content that is sent in the request. |
X-Access-Token |
String | The authentication token that is sent in the request. This must be of another user with administrative permissions. |
{
"content-type": "application/json",
"X-Access-Token": "eyJ0eXAiOiJKhjshjafakjfkadfas"
}
Name | Type | Description |
---|---|---|
id |
String | The user ID of a user whose has to be granted administrative permissions. |
5e4302fafdfdfadsfdfasgafsafgsag
Name | Type | Description |
---|---|---|
userPermission | String | The type of permission that you want to assign to the user. Use ADMIN for administrative permissions, and USER for non-administrative permissions. |
{
"userPermission": "ADMIN"
}
Returns a HTTP 200 (Successful) response with the user object.
Code | Type | Description |
---|---|---|
400 |
String | A bad request is sent. |
422 |
String | The request is sent with incorrect data. |
A POST method that logs the user into the system when USERLOGIN authentication mechanism is used.
http://<FMPS_server>:<port>/v16/auth/login
Name | Type | Description |
---|---|---|
content-type |
String | Type of content that is sent in the request. |
X-Access-Token |
String | The authentication token that is sent in the request. |
Authorization | String | A USERLOGIN (basic) authentication type authorization header containing credentials (email and password) of the user that wants to login. |
{ "content-type": "application/json",}
The authorization header must also contain the basic authentication type authorization containing credentials (email and password) of the user who wants to login. For example:
Authorization: Basic dXNlcm5hbWVAYWRvYmUuY29tOnBhc3N3b3Jk
Returns a HTTP 200 (Successful) response with the user’s access token.
Code | Type | Description |
---|---|---|
400 |
String | A bad request is sent. |
403 |
String | Access not granted. |
406 |
String | The request is not acceptable. |
A POST method that logs the user into the system when LDAP authentication mechanism is used.
http://<FMPS_server>:<port>/v16/auth/ldap
Name | Type | Description |
---|---|---|
content-type |
String | Type of content that is sent in the request. |
Authorization | String | A USERLOGIN (basic) authentication type authorization header containing credentials (email and password) of the user that wants to login. |
{ "content-type": "application/json",}
The authorization header must also contain the basic authentication type authorization header containing credentials (email and password) of the user who wants to login. For example:
Authorization: Basic dXNlcm5hbWVAYWRvYmUuY29tOnBhc3N3b3Jk
Returns a HTTP 200 (Successful) response with the user’s access token.
Code | Type | Description |
---|---|---|
400 |
String | A bad request is sent. |
401 |
String | Use is not authorized. |
406 |
String | The request is not acceptable. |