URI template component requirements

The variable and literal components of a URI template require specific formatting. Apply these requirements to URI templates when you define different service REST rules for distinct resource URIs.

The following requirements apply to URI template components:

  • The first component in a URI template must be a literal component.
  • Variable components must start with '{' and end with '}', and these characters cannot be nested.
  • Variable components cannot be empty.
  • A component cannot contain both literal and variable syntax, for example, api_{id}.
  • Components cannot start with special characters except for '{', '}', and '/'.
  • Components cannot contain reserved characters such as '?' or '#'.
  • Regular expression syntax is not supported.