About Application Portal API¶
EnOS Application Portal is a unified portal for permission management and application access. You can get information on users, assets, and applications by Open APIs provided by Application Portal APIs to facilitate application development or permission management.
For more information about Application Portal, see About Application Portal.
For more information about EnOS APIs, see About EnOS API.
To learn how to call an EnOS API, see Get Started with EnOS API.
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>
APIs¶
Authentication¶
Operation Name |
Description |
Available on EnOS Cloud |
Available on EnOS Edge |
---|---|---|---|
Confirm the password of a login user |
√ |
× |
|
Get information about the user who is currently logged-in through the 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 |
√ |
√ |
|
Request a new access token using the refresh token |
√ |
√ |
|
Reset the password of a user with the token |
√ |
× |
|
Revoke a user’s refresh token |
√ |
√ |
|
Send a verification code to a user’s email |
√ |
× |
|
Verify a verification code |
√ |
× |
User and Organization¶
Operation Name |
Description |
Available on EnOS Cloud |
Available on EnOS Edge |
---|---|---|---|
Select the organization that the user needs to use after login |
√ |
√ |
|
Create a user and assign an OU to the user without logging in to Application Portal |
√ |
× |
|
Create or update a menu group |
√ |
× |
|
Create a user with default password, and add the user to an OU |
√ |
× |
|
Create a record of audit logs |
√ |
× |
|
Create organization structure nodes |
√ |
× |
|
Create a role |
√ |
× |
|
Delete organization structure nodes |
√ |
× |
|
Assign users to an organization without logging in to Application Portal |
√ |
× |
|
Get the API authorization information of an application in a specified OU |
√ |
× |
|
List all users that can be managed under the current account |
√ |
√ |
|
List the organizations which the current user belongs according to the access token |
√ |
√ |
|
Get the list of languages available for an organization |
√ |
√ |
|
Authorize the application to get a list of all the users under a specified organization without logging in to the Application Portal |
√ |
√ |
|
Get all roles under an organization structure |
√ |
√ |
|
Get the menu groups of an application |
√ |
× |
|
Based on the |
√ |
√ |
|
Get all user groups in an OU |
√ |
× |
|
Get the menu groups, operational permissions, and visible organization structures assigned to a role |
√ |
× |
|
Get the organization structure root node assigned to an application |
√ |
× |
|
Get all organization structure nodes assigned to an application |
√ |
× |
|
Get the organization structures that are available for user |
√ |
× |
|
Get user list of a role |
√ |
× |
|
Get user list of a user group |
√ |
× |
|
Get the information of the current user |
√ |
√ |
|
Get the domain information of a user using the email address |
√ |
√ |
|
Get information of the organization structure to which a user is assigned |
√ |
√ |
|
Get all roles that are assigned to a user |
√ |
√ |
|
Get the permissions that are assigned to a user for the current application |
√ |
× |
|
Get basic information about a user, such as the user ID, based on the user’s email, account and domain, or phone number and phone area code |
√ |
× |
|
Get the asset permissions of users without logging in to Application Portal |
√ |
× |
|
Get the roles of users without logging in to Application Portal |
√ |
× |
|
Get the organization structures of users without logging in to Application Portal |
√ |
× |
|
Get the user groups of users without logging in to Application Portal |
√ |
× |
|
Assign organization structures to a user without logging in to Application Portal |
√ |
× |
|
Assign assets to organiztion structure nodes |
√ |
× |
|
Associate a resource to a specified organization structure node |
√ |
× |
|
Assign roles to a user without logging in to Application Portal. |
√ |
× |
|
Assign user groups to a user without logging in to Application Portal. |
√ |
× |
|
Query audit logs |
√ |
× |
|
Query the user events on menu access |
√ |
× |
|
Remove organization structures for a user without logging in to Application Portal. |
√ |
× |
|
Remove roles for a user without logging in to Application Portal. |
√ |
× |
|
Remove user groups for a user without logging in to Application Portal. |
√ |
× |
|
Remove a user from an OU without logging in to Application Portal. |
√ |
× |
|
Update organization structure nodes |
√ |
× |
|
Update the API authorization information of an application in a specified OU |
√ |
× |
|
Assign or remove menu groups, operational permissions, or visible organization structures to/from a role |
√ |
× |
|
Assign or remove asset permissions to/from a user |
√ |
× |
|
Update user information |
√ |
× |
Resource¶
Operation Name |
Description |
Available on EnOS Cloud |
Available on EnOS Edge |
---|---|---|---|
Authorize the new asset created on EnOS to the asset creator |
√ |
√ |
|
Check if the current user has the access permission for the queried asset |
√ |
√ |
|
Create a resource type |
√ |
× |
|
Delete resources |
√ |
× |
|
Delete resource types |
√ |
× |
|
Get all assets that the current user can access under a specified application |
√ |
√ |
|
Get all the assets that a specified user can access under a specified organization |
√ |
√ |
|
Get the upstream organizational structure where the asset is located |
√ |
√ |
|
Get the list of resources |
√ |
× |
|
Get the list of resource types. |
√ |
× |
|
Get all the assets that the user can access under an organization structure |
√ |
√ |
|
Register a resource |
√ |
× |
|
Synchronize assets on the EnOS to the Application Portal |
√ |
√ |
|
Get the list of users who have access permission to a specific asset |
√ |
√ |
|
Update resource information |
√ |
× |
|
Update resource type information |
√ |
× |
Application¶
Operation Name |
Description |
Available on EnOS Cloud |
Available on EnOS Edge |
---|---|---|---|
Create common messages and alert messages on the Application Portal |
√ |
√ |
|
Create message rules |
√ |
× |
|
Delete message rules |
√ |
× |
|
Get the information of an application |
√ |
× |
|
Get the list of application menus and permissions |
√ |
√ |
|
Get the list of application permission points and menus |
√ |
× |
|
Get the list of colors for configuring the message icon |
√ |
√ |
|
Get the list of ringtones for configuring the message |
√ |
√ |
|
Get a list of applications that the current user has permission to access through the access token |
√ |
√ |
|
Get the list of unresolved messages that are reported for the applications |
√ |
√ |
|
Search message rules |
√ |
× |
|
Update the information of an application |
√ |
× |
|
Update message rules |
√ |
× |
|
Update the status of the message |
√ |
√ |
API Editions¶
The following table lists the API services included in Application Portal Enterprise and Lightweight editions.
Category |
Enterprise |
Lightweight |
---|---|---|
√ |
√ |
|
√ |
√ |
|
√ |
√ |
|
√ |
√ |
Common Error Codes¶
Code |
Error Information |
Description |
---|---|---|
0 |
Success |
|
31400 |
parameter.invalid.[parameter name] |
The [parameter name]([parameter value]) is invalid. For example, parameter.invalid.userId indicates that the userId is invalid. |
31401 |
unauthenticated |
Please authentication first. Indicates that the user has not logged on. |
31403 |
permission.denied |
Permission denied. Indicates that user has no permission to access or perform operations. |
31404 |
[entity name].not.exist |
The [entity name]([entity ID]) does not exist. For example, user.not.exist indicates that the user does not exist, and organization.user.not.exist indicates that the user does not exist under the organization. |
31408 |
[entity name].already.existed |
The [entity name]([entity ID]) is already existed. For example, user.already.existed indicates that the user alreadys exists, and organization.user.already.existed indicates that the user already exists under the organization. |
31409 |
[] |
The [entity name]([entity ID]) is conflict. Indicates that the account has been logged on from a different location. |
31410 |
[entity name].expired |
The [entity name]([entity ID/value]) is expired. For example, cache.token.expired indicates that the token has expired. |
31415 |
[].out.range |
The []([]) is out of range |
31429 |
[operation name.entity name].exhausted |
Try [operation name.entity name] too many times. Please try again [time] later. For example, login.ip.exhausted indicates that there are too many login attempts from the IP address. |
31432 |
[entity name].too.many |
Too many [entity name]. For example, user.too.many indicates that there are too many instances of the user (there should only be one instance). |
31500 |
system.internal.error |
System internal error |
31504 |
timeout |
Service timeout |
31512 |
organization unselected |
Please select organization first. Indicates that the user has not selected an organization. |