You can extract data from REST data sources by exposing
the Rational REST Get Specification.
Before you begin
A schema is required to design templates and generate documents.
Schemas for REST data sources are obtained through the Schema Discovery
feature of Document Studio.
About this task
Configuring a REST data source requires providing the URL
of the resource and optionally a user name and password. The user
name and password are needed if the resource is at a secure location.
Procedure
- In the Document Specification window,
expand .
- Right-click the data source and then select Configure
Data Source.
- Specify the resource information for the REST resource:
- Specify the URL for the REST resource. If you do not know
the URL, click Discover to locate the resource.
- If the resource is at a secure location, supply the user name
and password.
- Click OK.
- In the Welcome window, click Next.
- Specify the connection details:
- URL: Specify the base URL for
the resource.
- Authentication Type: Select the
authentication type from the list.
- User: Specify the user name if
the resource is at a secure location.
- Password: Specify the password
if the resource is at a secure location.
See Creating REST data source schema for more
information about the base URL and the credentials.
- Click Next.
- In the Create a Resource window, specify
the details for the new resource:
- Name: Specify a name for the
new resource.
- Description: Specify a description
for the new resource.
- Relative path: Specify a relative
path for the new resource.
If the REST data source is accessible through the Rational Insight
Data Services, use the Locate using data service option
to locate the resource. Resource navigation is available for resources
having an href attribute. You drill down until you identify the resource
you need.
- To select the resources:
- In the left pane, select an element in the XML schema
tree.
- In the right pane, select the href value
from the attributes list box.
- Click Next. The resource URL
is displayed for the selected resource.
At this point, either select the URL and click Finish or
use the URL to locate the child resource.
- To locate the child resource:
- Select the resource URL and click Next.
- Select an element in the XML schema tree from the left
pane.
- Select the href value from the attributes list box from
the right pane.
- After you identify the resource, click Finish.
The wizard completes and the URL you have discovered is displayed
in the Configuration window. You can provide a user name and password
in the configuration window if the resource is at a protected location.
- Click OK. The REST data configuration
process is completed and the information is added to the Document
Specification window. Alternatively, you can
manually enter the URL and credentials in the Properties window.