Using the Environment Object in Plugin Lifecycle Methods
Plugins receive environment parameters to simplify API calls and reduce the need for manual configuration.
System integrators can construct a full path to a REST API by combining:
- Environment name
- REST server URL
- Path to the desired REST API
The recommended approach is to use the parameters provided by the
environment object, which is available in the following
Plugin API lifecycle methods:
- init
- open
- updateResult
- wakeup
Environment Object Parameters
| Parameter | Description |
|---|---|
environmentName |
Name of the current environment. Use this for scope composition. |
fsUrl |
Field Service REST server URL. |
faUrl |
Fusion Services REST server URL. Available only for Oracle Fusion Field Service environments. |
Example Usage
Constructing REST API paths using the environment object:
- Field Service API:
https://xxxxxxxxx.fs.ocs.oraclecloud.com/rest/ofscMetadata/v1/activityTypes
- Fusion Services API:
https://xxxxxxxxx.fa.ocs.oraclecloud.com/hcmRestApi/scim/Users
Sample Payload
{
"apiVersion": 1,
"method": "init" | "open" | "updateResult" | "wakeup",
...
"environment": {
"environmentName": "xxxxxxxxx",
"fsUrl": "https://xxxxxxxxx.fs.ocs.oraclecloud.com",
"faUrl": "https://xxxxxxxxx.fa.ocs.oraclecloud.com"
}
}