Connecting to the REST data source

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

  1. In the Document Specification window, expand Templates > Data Sources.
  2. Right-click the data source and then select Configure Data Source.
  3. 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.
  4. In the Welcome window, click Next.
  5. Specify the connection details:
    1. Base URL: Specify the base URL for the resource.
    2. Authentication Type: Select the authentication type from the list.
    3. User: If the resource is in a secured server, specify the user name.
    4. Password: If the resource is in a secured server, specify the password.
    See Creating REST data source schema for more information on the base URL and the credentials.
  6. Click Next.
  7. In the Create a Resource window, specify the details for the new resource:
    1. Name: Specify a name for the new resource.
    2. Description: Specify a description for the new resource.
    3. Relative path: Specify a relative path for the new resource.
    If the REST data source is accessible through the IBM® Rational® Insight Data Services, 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.
  8. To select the resources:
    1. Select an element in the XML schema tree.
    2. Select the href value from the attributes list.
    3. Click Next. The resource URL displays for the selected resource.
  9. Select the URL and click Finish or use the URL to locate the child resource. To locate the child resource:
    1. Select the resource URL and click Next.
    2. Select an element in the XML schema tree.
    3. Select the href value from the attributes list.
  10. 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.
  11. Click OK. The REST data configuration process is complete and the information is added to the Document Specification window.

Feedback