Configuring the REST data source

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

  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. URL: Specify the base URL for the resource.
    2. Authentication Type: Select the authentication type from the list.
    3. User: Specify the user name if the resource is at a secure location.
    4. 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.
  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 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.
  8. To select the resources:
    1. In the left pane, select an element in the XML schema tree.
    2. In the right pane, select the href value from the attributes list box.
    3. 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.
  9. To locate the child resource:
    1. Select the resource URL and click Next.
    2. Select an element in the XML schema tree from the left pane.
    3. Select the href value from the attributes list box from the right pane.
  10. 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.
  11. 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.

Feedback