You can extract data from REST data sources by exposing
the Rational® REST Get Specification.
Before you begin
Configuring a REST data source requires a URL to the resource.
If the resource is stored on a secured server, a user name and password
are needed.
About this task
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.
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.
- User: If the resource is in a
secured server, specify the user name.
- Password: If the resource is
in a secured server, specify the password.
- Authentication: Select the authentication
type that applies to your data source. You can select one
of the following authentication types:
Accept header:
Enter an accept type for your stylesheet. Examples: - image/jpeg
- text/html
- application/xml
- */*
See Adding a REST data source schema with the schema discovery wizard for more information
on 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 Data Services application,
select Locate using data service to locate
the resource. Resource navigation is available for resources that
have an href attribute. Expand the list to find the
resource.
- To select the resources:
- Select an element in the XML schema tree.
- Select the href value from the attributes
list.
- Click Next. The resource URL
displays for the selected resource.
- 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.
- Select the href value from the attributes
list.
- Click Finish. The wizard completes
and the URL displays in the Configuration window.
If the resource is stored on a secured server, enter a user name and
password in the Configuration window.
- Click OK. The REST data configuration
process is complete and the information is added to the Document
Specification window.