Resource Operations API Example

The ResourceOperations API process illustrates how to create, read, update, and delete the FHIR resource via REST APIs.

For more information about the FHIR palette ResourceOperationsAPI activity, see Resource Operations API.

ResourceOperationsAPI Process

The ResourceOperationsAPI process is illustrated in the following image:

Process Definition

The process performs the following operations:

The BW REST resource is divided into four sections:

  • The post operation creates the FHIR resource with a unique ID

  • The get operation reads the FHIR resource with a resource ID.

  • The put operation updates the FHIR resource as requested.

  • The delete operation deletes any FHIR resource with a resource ID.

    After running the process, the system generated a Swagger URL. For more information about creating an API activity process, see Creating BusinessWorks CRUD API Operations documentation.

    Open Swagger url on a browser. The definition of each operation is present in Swagger under each section as shown in the following image. You can run the operation by providing proper inputs.

    Process Output

    Run the desired operation using Swagger or the desired client. The API activity sends the operation outcome to the user through an HTTP response and an HTTP status code. The operation outcome includes the FHIR resource for a successful operation and an error message for an unsuccessful one.