About Application Portal Service APIs¶
EnOS Application Portal is a flexible permission management portal and a unified application access portal. For administrators, it provides a Role-Based Access Control(RBAC) system. For application developers, it provides specified console and standardized APIs, SDKs, and development tools. For end users, it delivers a smooth and convenient application access experience.
Through Application Portal Service APIs, application developers can authenticate accounts and obtain and manage user, OU, resource, and application information. For a complete list of interfaces and functional descriptions of Application Portal Service APIs, see API List.
Prerequisites¶
Ensure that you have obtained a service account, and the service account has the permission to call the Application Portal Service APIs. For more information, see API Authentication.
Java SDK¶
To use enos-app-portal-sdk in your project, you’ll need to add the following dependencies to the pom.xml
file. You may need to change the version number accordingly.
<dependency>
<groupId>com.envisioniot</groupId>
<artifactId>enos-app-portal-sdk</artifactId>
<version>0.0.25</version>
</dependency>
API List
¶
You can see what operations can be used via these APIs, and whether it is applicable to EnOS Cloud and EnOS Edge in the following tables.
User¶
Operation Name |
Description |
Available on EnOS Cloud |
Available on EnOS Edge |
---|---|---|---|
Create a user with initial password and add to the OU |
√ |
× |
|
Create a user and assign an OU to the user |
√ |
× |
|
Create a user and assign an OU to the user |
√ |
× |
|
Get list of all manageable users under the account permissions |
√ |
√ |
|
Get list of all users under an OU |
√ |
√ |
|
Get list of users visible to the application based on application’s |
√ |
√ |
|
Get a user’s basic information like user ID based on email, account and domain, or phone number and area code |
√ |
× |
|
Get a user’s domain information via the email address |
√ |
√ |
|
Get a user’s account information |
√ |
√ |
|
Add users to OU in batch |
√ |
× |
|
Remove a user from OU |
√ |
× |
|
Update a user’s information |
√ |
× |
User Authentication¶
Operation Name |
Description |
Available on EnOS Cloud |
Available on EnOS Edge |
---|---|---|---|
Select an OU to enter after the user log in |
√ |
√ |
|
Confirm the password of a login user |
√ |
× |
|
Get information about a user through Access Token |
√ |
√ |
|
Get the token for resetting the password of a user |
√ |
× |
|
Log in to the account |
√ |
√ |
|
Log in to Application Portal by using the Single Sign-On authorization code |
√ |
× |
|
Log out of the account |
√ |
√ |
|
Reset the password of a user with the token |
√ |
× |
|
Request a new Access Token using the Refresh Token |
√ |
√ |
|
Revoke a user’s Refresh Token |
√ |
√ |
|
Send a verification code to a user’s email |
√ |
× |
|
Verify a verification code |
√ |
× |
User Group¶
Operation Name |
Description |
Available on EnOS Cloud |
Available on EnOS Edge |
---|---|---|---|
Assign user groups to a user |
√ |
× |
|
Get list of user groups in the OU |
√ |
× |
|
Get the user list of a user group |
√ |
× |
|
Get user groups for users in batch |
√ |
× |
|
Remove a user from user groups |
√ |
× |
Application¶
Operation Name |
Description |
Available on EnOS Cloud |
Available on EnOS Edge |
---|---|---|---|
Create or update a menu group |
√ |
× |
|
Get API permission information of application in an OU |
√ |
× |
|
Get the information of an application |
√ |
√ |
|
Get the list of an application’s permissions and menus |
√ |
√ |
|
Get an application’s menu group |
√ |
× |
|
Get the list of permissions and menus that a user has access to for a specified application in the OU |
√ |
× |
|
Get permissions of an application authorized for a user |
√ |
× |
|
Get the list of applications that a user has access to via Access Token |
√ |
√ |
|
Update the API permissions authorized for an application in an OU |
√ |
× |
|
Update the information of an application |
√ |
× |
Organization/OU¶
Operation Name |
Description |
Available on EnOS Cloud |
Available on EnOS Edge |
---|---|---|---|
Get list of OUs that the user belongs to based on Access Token |
√ |
√ |
|
Get list of available languages under an OU |
√ |
√ |
Role¶
Operation Name |
Description |
Available on EnOS Cloud |
Available on EnOS Edge |
---|---|---|---|
Assign roles to a user |
√ |
× |
|
Create a role |
√ |
× |
|
Get all roles in an OU |
√ |
√ |
|
Get menu groups, permissions or visible organization structures assigned to a role |
√ |
× |
|
Get roles for a user |
√ |
√ |
|
Get roles for users in batch |
√ |
× |
|
Get the list of users with a specific role |
√ |
× |
|
Remove roles from a user |
√ |
× |
|
Assign or remove menu groups, permissions or visible organization structures to/from role |
√ |
× |
Organization Structure¶
Operation Name |
Description |
Available on EnOS Cloud |
Available on EnOS Edge |
---|---|---|---|
Assign organization structures to a user |
√ |
× |
|
Mount assets to an organization structure node |
√ |
× |
|
Create organization structure nodes |
√ |
× |
|
Delete organization structure nodes |
√ |
× |
|
Get the upstream organization structure where an asset is located |
√ |
√ |
|
Get the organization structure root nodes mounted under an application |
√ |
× |
|
Get the complete organization structures mounted under an application |
√ |
× |
|
Get the organization structures that a user has access to |
√ |
× |
|
Get the organization structure nodes assigned to a user |
√ |
√ |
|
Get organization structures for users in batch |
√ |
× |
|
Remove organization structures from a user |
√ |
× |
|
Modify organization structure nodes |
√ |
× |
Resource¶
Operation Name |
Description |
Available on EnOS Cloud |
Available on EnOS Edge |
---|---|---|---|
Authorize assets to a user |
√ |
√ |
|
Check if a user has permission for the assets |
√ |
√ |
|
Get the assets that a user has permission for under a specified organization structure |
√ |
√ |
|
Get the assets within the permissions of users |
√ |
× |
|
Get the list of users with permission for a specific asset |
√ |
√ |
|
Synchronize assets with the specified tags to the Admin Console |
√ |
√ |
|
Assign or remove asset permissions to/from a user |
√ |
× |
|
Associate resources to an organization structure node in batch |
√ |
× |
|
Create a resource type |
√ |
× |
|
Delete resources |
√ |
× |
|
Delete resource types |
√ |
× |
|
Get all resources that the user has permission for under a specified application |
√ |
√ |
|
Get all resources that a user has permission for under a specified OU |
√ |
√ |
|
Get the resource list of an OU |
√ |
× |
|
Get the resource type list of an OU |
√ |
× |
|
Register a resource |
√ |
× |
|
Edit the information of a resource |
√ |
× |
|
Edit the information of a resource type |
√ |
× |
Log¶
Operation Name |
Description |
Available on EnOS Cloud |
Available on EnOS Edge |
---|---|---|---|
Create an audit log event |
√ |
× |
|
Query audit log records |
√ |
× |
|
Query the menu access records of a user |
√ |
× |
Message¶
Operation Name |
Description |
Available on EnOS Cloud |
Available on EnOS Edge |
---|---|---|---|
Create messages on Application Portal |
√ |
√ |
|
Create message rules |
√ |
× |
|
Delete message rules |
√ |
× |
|
Get available message icon color list |
√ |
√ |
|
Get available message ringtone list |
√ |
√ |
|
Get the list of unresolved messages generated from an application |
√ |
√ |
|
Search message rules |
√ |
× |
|
Update message rules |
√ |
× |
|
Update the status of messages |
√ |
√ |
Common Error Codes¶
Code |
Error Information |
Description |
---|---|---|
0 |
Success |
|
31400 |
parameter.invalid.[parameter name] |
The request parameter is invalid. For example, parameter.invalid.userId means the userId parameter value is invalid. Please modify the parameter value and try again. |
31401 |
unauthenticated |
The user has not logged on. Please log in first. |
31403 |
permission.denied |
The user or application has no permission to access or perform operations. Please contact the administrator. |
31404 |
[entity name].not.exist |
The entity does not exist. For example, user.not.exist indicates that the user does not exist. Please modify the parameter value and try again. |
31408 |
[entity name].already.existed |
The entity name is already existed. For example, user.already.existed indicates that the user already exists. Please modify the parameter value and try again. |
31409 |
[entity name] |
The entity is conflict. For example, the account has been logged on from a different location. Please resolve the conflict and try again. |
31410 |
[entity name].expired |
The entity is expired. For example, token.expired indicates that the token has expired. Please refresh and try again. |
31415 |
[entity].out.range |
The value of the entity is out of range. Please modify the parameter value and try again. |
31429 |
[operation name.entity name].exhausted |
Try the operation too many times. Please try again later. |
31432 |
[entity name].too.many |
Too many entity. For example, user.too.many indicates that there are too many instances of the user. Please modify the parameter value and try again. |
31500 |
system.internal.error |
System internal error. Please contact the system administrator. |
31504 |
timeout |
Service timeout. Please try again later or contact the system administrator. |
31512 |
organization unselected |
The user has not selected an OU. Please select an OU first. |
31403 |
This API can be requested through EnOS APIM only |
This API can be requested through EnOS API Management only. |