Use REST APIs for Operational Events

REST APIs enable creation of events related to the health of connected assets for maintenance, or events corresponding to the operational progress of production activity performed by an equipment resource in a manufacturing plant.

You should have configured the authentication mechanism to post events from your external system or IIoT environment to Smart Operations, as follows:

  • The IIoT environment or external system should use OAuth Integration for authentication and authorization to be able to post data for Smart Operations.
  • The IIoT environment or external system should have the provision to capture Oracle Client ID, Secret (masked), Scope, Oracle AUTH Token URL, and Oracle Fusion Cloud Endpoint URL.
  • The IIoT environment or external system should be able to invoke the Oracle AUTH Token URL with client ID, secret, and scope to retrieve the bearer token.
  • The IIoT environment or external system should be able to POST events to the Oracle Fusion Cloud Endpoint URL using the retrieved bearer token.
    Note: See Create Operational Events in the REST API for Oracle Supply Chain Management Cloud guide for sample payload examples.

Create an Identity Domain Application and Configure Authorization

Generate a client ID and client secret that can be used to configure OAuth integration in your IIoT environment or external system. You can create one or more identity domain applications for each integration.

  1. Sign in to your Oracle Identity Cloud Service console as an administrator.

  2. From the navigation menu, select Identity & Security.

  3. Under Identity, click Domains and select the identity domain.

  4. Click Integrated applications.

  5. On the Integrated applications page, click Add application.

  6. In the Add application dialog, select Confidential Application and click Launch workflow.

  7. Provide a name for the application. For example, SMART_OPERATIONS_HTTP_CLIENT.

  8. On the Configure OAuth step, select Configure this application as a client now under Client configuration.

  9. Under Authorization, select Client credentials.

  10. Under Token issuance policy select Add resources.

  11. Under Resources, click Add scope.
  12. Search for the scope spectra-scm-core.

  13. Under Select scope, select Urn:opc:resource:fusion:{namespace}:scm-core/api/scm-core/operational-data and click Add.

    Here {namespace} is your instance namespace.

  14. Click Next, then Finish.
  15. Click Activate to activate the application.

    You can get the client ID and client secret under the General Information section.

Assign Job Role to the Client ID

Associate the Smart Operations Service Agent job role (ORA_SCM_SMO_SMART_OPERATIONS_SERVICE_AGENT_JOB) or the custom job role with the confidential application Client ID. This ensures that the Client ID generated for OAuth integration in the IIoT environment or external system is authorized to post events to Smart Operations.

  1. In the Security Console, switch to the Application Extensions tab.
  2. Under Custom OAuth Client Applications, click your application name.
  3. On the application page, click the Roles tab.
  4. Click Add to add the job role.
  5. In the Add Role dialog, search for ORA_SCM_SMO_SMART_OPERATIONS_SERVICE_AGENT_JOB.
  6. Select and add the Smart Operations Service Agent role.

Verify Event Payload Transmission

Invoke the Oracle AUTH Token URL with client ID, secret, and scope to retrieve the bearer token. Post events to the Oracle Fusion Cloud Endpoint URL using the bearer token.

Note:

Your external system or IIoT environment should be able to get a SUCCESS response on event POST. If the response is not received, the system should be able to retry to POST the event. Additionally, your external system or IIoT environment should be able to capture the logs of both successful and failed POST events.

What to Do Next

Smart Operations let users create operational rules for asset faults, asset statuses, and operational parameter events. These operational rules evaluate the incoming events and execute automated workflow actions if the rule conditions are met. To create operational rules using Smart Operations, refer to the user guides for Manufacturing and Maintenance:

Smart Operations maintain a record of operational data and events, such as operation execution start or stop, quantity report events, asset status events, operational parameters, and meter readings. You can view the accepted and rejected operational event records and also view operational events that failed to process. Use the Operational Data task or action in the Work Execution work area to look at operational events.