ESF provides a built-in REST Service based on the osgi-jax-rs-connector project.
By default, REST service providers register their services using the context path
The REST service provides the BASIC Authentication support. The allowed users and associated roles can be specified via the REST Service configuration as depicted in the image below:
The System Administrator is required to specify:
- user.name - Specifies the list of users allowed to use the REST APIs
- password - Specifies the password for each user
- roles - The list of roles for each user as a list separated by the ';' character
of the users allowed to interact with the REST APIs provided by this ESF bundle.
By default, ESF comes pre-configured with the following credentials:
- user.name - admin
- password - admin
- roles - assets
ESF exposes REST APIs for the Asset instances instantiated in the framework.
Assets REST APIs are available in the context path
Following, the supported REST endpoints:
Returns the list of available assets.
Returns the list of available channels for the selected asset (specified by the corresponding PID)
Returns the read for all the READ channels in the selected Asset
The list of channels where the READ operation should be performed.
Returns the result of the read operation for the specified channels.
The list of channels and associated values that will be used for the WRITE operation. The expected format is:
Performs the write operation for the specified channels returning the result of the operation.
Please refer to this page for an example on how to use Assets REST APIs
Updated almost 2 years ago