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 User with Password

Create a user with initial password and add to the OU

×

Create and Join User

Create a user and assign an OU to the user

×

Create User and Choose Organization

Create a user and assign an OU to the user

×

Get Manageable User List

Get list of all manageable users under the account permissions

Get Organization User List

Get list of all users under an OU

Get App User List

Get list of users visible to the application based on application’s accessKey

Get User Base Info

Get a user’s basic information like user ID based on email, account and domain, or phone number and area code

×

Get User Domain

Get a user’s domain information via the email address

Get User Information

Get a user’s account information

Join Users

Add users to OU in batch

×

Remove User

Remove a user from OU

×

Update User Information

Update a user’s information

×

User Authentication


Operation Name

Description

Available on EnOS Cloud

Available on EnOS Edge

Choose Organization

Select an OU to enter after the user log in

Confirm Password

Confirm the password of a login user

×

Get Token Information

Get information about a user through Access Token

Get Password Token

Get the token for resetting the password of a user

×

Log In

Log in to the account

Log In Via Authorization Code

Log in to Application Portal by using the Single Sign-On authorization code

×

Log Out

Log out of the account

Reset Password with Token

Reset the password of a user with the token

×

Refresh Access Token

Request a new Access Token using the Refresh Token

Revoke Refresh Token

Revoke a user’s Refresh Token

Send Verification Code

Send a verification code to a user’s email

×

Verify Code

Verify a verification code

×

User Group


Operation Name

Description

Available on EnOS Cloud

Available on EnOS Edge

Assign User Groups

Assign user groups to a user

×

Get Organization User Group List

Get list of user groups in the OU

×

Get Users by User Group

Get the user list of a user group

×

Get Users UserGroup List

Get user groups for users in batch

×

Remove User Groups

Remove a user from user groups

×

Application


Operation Name

Description

Available on EnOS Cloud

Available on EnOS Edge

Create or Update Menu Group

Create or update a menu group

×

Get Application Authorization

Get API permission information of application in an OU

×

Get Application Information

Get the information of an application

Get App Menu and Permission

Get the list of an application’s permissions and menus

Get Application Menu Group

Get an application’s menu group

×

Get App Resources by User and Organization

Get the list of permissions and menus that a user has access to for a specified application in the OU

×

Get User Permissions

Get permissions of an application authorized for a user

×

Get User’s Applications

Get the list of applications that a user has access to via Access Token

Update Application Authorization

Update the API permissions authorized for an application in an OU

×

Update Application Information

Update the information of an application

×

Organization/OU


Operation Name

Description

Available on EnOS Cloud

Available on EnOS Edge

Get Organization List

Get list of OUs that the user belongs to based on Access Token

Get Organization Language List

Get list of available languages under an OU

Role


Operation Name

Description

Available on EnOS Cloud

Available on EnOS Edge

Assign User Roles

Assign roles to a user

×

Create Role

Create a role

×

Get Organization Roles

Get all roles in an OU

Get Role Permission

Get menu groups, permissions or visible organization structures assigned to a role

×

Get User Roles

Get roles for a user

Get Users Role List

Get roles for users in batch

×

Get Users by Role

Get the list of users with a specific role

×

Remove User Roles

Remove roles from a user

×

Update Role Permission

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

Assign organization structures to a user

×

Assign Assets to Organization Structure

Mount assets to an organization structure node

×

Create Organization Structure

Create organization structure nodes

×

Delete Organization Structure

Delete organization structure nodes

×

Get Asset Structure

Get the upstream organization structure where an asset is located

Get Structure by App

Get the organization structure root nodes mounted under an application

×

Get Structure by Detail

Get the complete organization structures mounted under an application

×

Get Structure by User

Get the organization structures that a user has access to

×

Get User Structures

Get the organization structure nodes assigned to a user

Get Users Structure List

Get organization structures for users in batch

×

Remove Organization Structures

Remove organization structures from a user

×

Update Organization Structure

Modify organization structure nodes

×

Resource


Operation Name

Description

Available on EnOS Cloud

Available on EnOS Edge

Authorize Asset

Authorize assets to a user

Check Asset Permission

Check if a user has permission for the assets

Get Structure Asset

Get the assets that a user has permission for under a specified organization structure

Get Users Asset List

Get the assets within the permissions of users

×

Get Users with Asset Access

Get the list of users with permission for a specific asset

Sync Asset

Synchronize assets with the specified tags to the Admin Console

Update User Asset Permission

Assign or remove asset permissions to/from a user

×

Associate Resource to Organization Structure Node

Associate resources to an organization structure node in batch

×

Create Resource Type

Create a resource type

×

Delete Resource

Delete resources

×

Delete Resource Type

Delete resource types

×

Get Assets by Application

Get all resources that the user has permission for under a specified application

Get Assets by Organization

Get all resources that a user has permission for under a specified OU

Get Resource List

Get the resource list of an OU

×

Get Resource Type

Get the resource type list of an OU

×

Register Resource

Register a resource

×

Update Resource

Edit the information of a resource

×

Update Resource Type

Edit the information of a resource type

×

Log


Operation Name

Description

Available on EnOS Cloud

Available on EnOS Edge

Create Audit Log

Create an audit log event

×

Query Audit Logs

Query audit log records

×

Query Menu Access Logs

Query the menu access records of a user

×

Message


Operation Name

Description

Available on EnOS Cloud

Available on EnOS Edge

Create Message

Create messages on Application Portal

Create Message Rules

Create message rules

×

Delete Message Rules

Delete message rules

×

Get Colors of the Message Icon

Get available message icon color list

Get Message Ringtones

Get available message ringtone list

Get Unresolved Messages

Get the list of unresolved messages generated from an application

Search Message Rules

Search message rules

×

Update Message Rules

Update message rules

×

Update Messages

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.