Connecting to the REST data source

You can extract data from REST v1 or REST v2 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.

For more information about how user names and passwords are stored, see Security considerations for IBM® Rational Publishing Engine.

Procedure

  1. In the Document Specification window, expand Templates > Data Sources.
  2. Right-click the data source and select a configuration option:
    • If there is configuration layer metadata for the data source, click Configure using metadata.
      1. If authentication is required to connect to the data source specified in the configuration layer metadata, a window opens where you can enter your user name, password, and authentication type. Click OK.
      2. Select the value to use from the configuration layer and click OK.

        After selecting a value from the configuration layer, the data source is configured and you are not required to complete the remainder of this task.

    • If there is not configuration layer metadata for the data source, click Configure Data Source and continue to the next step.
  3. Specify the resource information for the REST resource:
    1. URL: Specify the base URL for the resource. If you do not know the URL, click Discover to locate the resource. If you clicked Discover, continue to the step 4 without completing the remaining substeps in this step.
    2. User: If the resource is in a secured server, specify the user name.
    3. Password: If the resource is in a secured server, specify the password.
    4. Authentication: Select the authentication type that applies to your data source. You can select one of the following authentication types:
      • Auto
      • Basic
      • Form
      • OAuth
    5. Accept header: Enter an accept type for your stylesheet. Examples:
      • image/jpeg
      • text/html
      • application/xml
      • */*
    6. Click OK.
  4. If you clicked Discover to locate the resource, complete the wizard:
    1. In the Welcome window, click Next.
    2. In the Base configuration window, specify the details for the data source:
      • Name: Specify a name for the data source.
      • Description: Specify a description for the data source.
      • Base URL: Resource navigation is available for resources that have an href attribute.
      • Authentication type: Select the authentication type that applies to your data source.
      • User and Password: The credentials you use to authenticate with your data source application.
      • Select context: For Design Management data sources.
    3. Select a resource. The base URL you entered is automatically appended with ?metadata=schema. To select the resources:
      • In the XML schema section of the Locate resource using Data Service window, expand the resource list.
      • In the Element attributes section, select an href and click Next.
      • Click Next. The resource URL displays for the selected resource.
    4. Select the URL and click Finish or use the URL to locate the child resource. 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.
  5. Click OK. The REST data configuration process is complete and the information is added to the Document Specification window.

Example

For more information on identifying a base URL, see the Integrating documentation for your data source.

Feedback