Adding URI Templates

URI templates are strings that can be transformed into URIs after embedded variables are substituted. URI templates use a simple syntax where braces denote variables to be replaced when the templates are converted to actual URLs. Application Services only supports direct variable substitution.

The denoted variables identified with the { } are replaced with the actual value as defined on the Base Template Parameters page. When the Base Template Parameters page is saved, a restricted document is created defining the primitives used for value replacement within the URI template. The Document will only contain primitives and collections of these primitives. The following naming convention is used:

Document Package: ASF_SERVICE Document: <App Service ID>_ASF Version: v1

The string entered for the template will be validated to insure that there is no equivalent or ambiguously defined template currently entered on the grid. Moreover the values used within the { } must be defined on the Base Template Parameters page.

For more information on REST resources, see Understanding REST Resource Definition Concepts.

Note: The document created for the application service will be in restricted mode. For more information on the document created see Using the Document Tree to View Document Information.

Use the Add URI Template button on the Root Resource page to access the URI Template Builder.

This example illustrates the fields and controls on the Add URI Template page. You can find definitions for the fields and controls later on this page.

Add URI Template page

The URI Template Builder is divided into 2 sections:  Expression Workspace and URI Template.

Field or Control

Description

Expression Type

Simple String is the default. Simple String is used for Provider REST web services. Other styles are available from the drop down list.

See Understanding URI Template Expressions and Expansions.

Add Base Template Parameters button

Select to add additional base parameters.

See Adding Base Template Parameters.

Parameters defined on the Base Template Parameters page can be selected to build out the URI.

URI Template

The Root Resource must always be the first string defined for the URI Template.

See Building the URI Template