Adding Service Operations to REST Service Definitions

This section discusses how to:

  • Add existing service operations to REST service definitions.

  • Define new service operations for REST service definitions.

You can add a REST service operation that already exists in the database to a REST service definition, or you can add a new REST service operation to the database.

The process for adding existing REST service operations to REST services is identical to the process for adding non-REST services to non-REST service operations.

Important! You can add only those service operations defined as REST service operations to REST service definitions; you cannot add non-REST service operations to REST services and you cannot add REST service operations to non-REST services.

See Adding Existing Service Operations to Service Definitions.

The only way to add a new REST service operation to the database is from a REST service, using the Add button in the Service Operations section of the Services page (IB_SERVICEDEFN).

The type of service, provider or consumer, determines the type of service operation that the system adds. If you are working with a provider service and add a service operation, a provider service operation is added to the service; if you are working with a consumer service and add a service operation, the system adds a consumer service operation.

Image: Services page

This example illustrates the Services page. The example shows the service definition for the WEATHERSTATION service. The service is a provider service, as indicated by the selection of the Is Provider check box.

Services page

Use the Service Operations section on the Services page to add REST service operation definitions to the system. The system automatically appends the service operation name with the name of the selected REST method. This functionality allows you to reuse the service operation name using other method types. The system allows you to enter a service operation name in mixed-cased. The service operation name you enter becomes the default service operation alias.

So for example, if you enter a service operation name of WeatherStation and select the GET method from the REST Method drop-down list, the system names the operation WEATHERSTATION_GET and the service operation alias is WeatherStation.

If a service is defined as a provider service, all service operations you create from the service definition are provider services operations. If a service is defined as a consumer service, all service operations you create from the service definition are consumer service operation.

After you provide a service operation name and a REST method and click the Add button, the new service operation appears in the Service Operations component and you can proceed to configure the operation.

Image: Service Operations – General tab

This example illustrates the Service Operations – General tab. The example shows a new REST service operation called WEATHERSTATION_GET.

Service Operations - General page

To add a new service operation for a REST-based service:

  1. Access the Services page (PeopleTools > Integration Broker > Integration Setup > Services).

    The Services page appears.

  2. In the Service Operations section, locate the Service Operation field and enter a name for the new service operation.

  3. From the REST Method drop-down list, select the HTTP method for manipulating the resources defined in the service operation. The valid values are:

    • Delete.

    • Get.

    • Head.

    • Patch.

    • Post.

    • Put.

    REST methods are defined elsewhere in the product documentation.

  4. Click the Add button.

The Service Operations-Definitions page appears. Use the page to configure the service operation.