Distinct URI specification for service REST rules

Different service REST rules are specified for different resource URIs. This functionality provides different processing options, request handling, and response handling for each distinct resource URI. Additionally, it eliminates the need to maintain complex logic used to handle all possible resource URI paths.

By using URI templates, you can define different service REST rules for distinct resource URIs. You define these fields when you create a new REST service rule. The resource URI includes the following components:

  • The service package – A data instance that is used to support the deployment of services. For more information about service packages, see About Service Package data instances.
  • The service version – The version number of a service rule.
  • A URI template – A template that supports literal and variable path parameters. With this component, you can map a resource URI to a service REST rule. For information about formatting requirements of the parameters in a URI template, see URI template component requirements.

The following list contains examples of distinct resource URIs that you can map to different service REST rules:

  • api/vi/cases
  • api/v1/cases/C_100
  • api/v1/cases/C_100/attachments
  • api/v1/cases/C_100/attachments/A_100

For each resource URI, api indicates the service package, v1 indicates the service version, and the text after v1/ indicates URI templates. Because each resource URI tcontains a distinct URI template, each resource URI tis mapped to a different service REST rule.