Access the REST APIs
About this task
The Plant Applications Web Client provides a Swagger-based UI to view and run the Representational State Transfer (REST) APIs.
Starting Plant Applications 2022, the default https port is 443. If you use the default port, you need not include it in the Rest API calls.
You can access the UI from the list of supported Web browsers by entering a URL in the following format: https://<server_name>:<port_number>/<micro_service_name>/swagger-ui.html.
Where:
- <server_name>: Represents the name of the server on which the Plant Applications Web Client is installed.
- port_number: Represents the network port used by the Plant
Applications Web Client.Note:
By default, the Web Client installs on port 443. When port 443 is not available, then the Web Client tries to install on port 5059. If you are installing Operations Hub and Plant Applications Web Client on the same machine, then Web Client will be installed on port 5059. If the Web Client is running on 443, then you do not need to specifically provide the port number while accessing the URL. For example, https://<server_name>/<micro_service_name>/swagger-ui.html.
If the Web client is running on 5059, then you must provide the port number in the URL. For example, https://<server_name>:5059/micro_service_name>/swagger-ui.html.
- <micro_service_name>: Represents the name of the microservice for which you want to access the REST APIs. See Swagger URLs.
For exchanging data between the client-server system, user authentication is required.
Procedure
-
Access the following URL: https://<server name of web client>:<port
number>/<application service name>/swagger-ui.html
- For Workorder Service: https://webclientservername:5059/workorder- service/apidocs/index.html
- For Esignature-app-service Service: https:// webclientservername:<port>/esignature-app-service/swagger-ui/
The Swagger UI appears.
-
Only for Work Order Service: To access the Swagger UI for Work Order Service,
you must perform following steps in the Operations Hub Server:
-
To access the user interface for any required service for example, Activities
App service, enter the following URL in a compatible web browser:
https://<server_name>:<port_number>/<micro_service_name>/swagger-ui.html.
The Swagger UI appears.
-
Select Authorize.
The Available authorizations page appears.
-
Enter the following values, and select Authorize.
Field Description User Name Enter the Plant Applications Web Client login user name. Password Enter the Plant Applications Web Client login password. client_id Enter a client id value that was used during the installation. client_secret Enter the password. This password is set during the Web Client installation.