Adding a REST data source schema with the schema discovery wizard

A data source schema can be created for a REST data source. Creating schemas simplifies authoring document templates for modules with the same structure, and same or similar attribute list.

About this task

When you use the Schema Discovery wizard to create data source schemas, you can select from the two reportable REST options that your application might support, either REST API 1.0 or REST API 2.0. Check with your system administrator if you do not know the REST API version that your application supports.

Schema Discovery (REST API 1.0)

Procedure

  1. In Document Studio, click Data > Schema Discovery > REST Schema Discovery.
  2. Specify the connection details:
    1. Enter a Name for the data source.
    2. Enter a Description for the data source.
    3. Specify the Base URL for the resource.
    4. Select the Authentication Type from the list. If no type is selected, each type is tested until the correct type is found. Specifying a type allows this process to be eliminated.
    5. If the resource is in a secured server, specify the User name.
    6. If the resource is in a secured server, specify the Password.
  3. Click Next.
  4. Depending on whether your data source uses the Data services, one of the following windows display:

    If the data source does not use the Data services, the Create a Resource window displays.

    1. Enter a Name for the new resource.
    2. Enter a Description for the new resource.
    3. Enter a Relative path for the new resource.
    If the REST data source is accessible through the Reporting Data Services Adapters, the Locate using data service window displays.
    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.
  5. Select the URL and either 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 pane.
    3. Select href from the attributes list.
  6. If you located a child resource, click Finish. The wizard completes and the URL displays in the Configuration window. Enter a user name and password in the configuration window if the resource is on a secured server.

Schema Discovery (REST API 2.0)

About this task

Note: Rational® Publishing Engine supports only the abbreviated RDF. The providers must accept and honor application/xml requests. See Open Services for Lifecycle Collaboration Core Specification Version 2.0.
Rational Publishing Engine only supports OSLC v2 providers that follow the Reportable REST v2 Specification.
  • An OSLC Service must have Query Capabilities defined in Service Resource for all resources intended for Reporting.
  • Each Query Capability for Reporting:
    • Must have oslc:queryBase pointing to the resource that has a list of resources intended for Reporting. The resources in the list must be identified as oslc:isMemberProperty in the Resource Shape Resource of the list resource.
    • Must have oslc:resourceShape to describe the list resource.

Procedure

  1. Click Data > Schema Discovery > REST v2 Schema Discovery.
  2. Specify the connection details:
    1. Specify the Base URL for the resource.
      You must know the URL of the service provider that you want to accept. This URL is the counterpart of the Reporting data services application URL for the reportable REST data source. Rational Publishing Engine fetches the data from the data source as a list of queries. These resources are stored by the service from which data can be queried and interpreted. The service also provides a query service that helps filter data according to a set condition or refine the subsets of data. These queries are for a type of resource and allow you to access the resource of a specific type. A reportable ID2 service can expose many resources types, such as a product or user change request. The query service helps the user to retrieve data efficiently or a subset of the data, but it is not mandatory. The query service exists for all the resources. Every product can define its resources and the queries that access these resources.
    2. Select an Authentication Type from the list.
    3. If the resource is in a secured server, specify the User name.
    4. If the resource is in a secured server, specify the Password.
  3. Click Next.
  4. Select a REST v2 service and its corresponding query and click Next. The properties of the selected services display.
  5. Select the required properties from the list and click Test oslc.select. A Result Confirmation window displays the selected services. Confirm that the services are correct. If you click Correct, the Test oslc.select field status changes to true. Click Next.

    The Test oslc.properties field is not used often.

  6. You must enter only the filter or sort clause of the query, such as cq:Product{cq:Product="Rational Publishing Engine"} in the Query include oslc.where clause and the Query include oslc.orderBy clause.
  7. Click the Test oslc.where and Test oslc.orderBy to verify the connection. Rational Publishing Engine creates the full request using the options defined.
  8. Click Next. The summary of your query displays. Click Finish. The wizard completes and the URL display in the Configuration window. If the resource is on a secured server, you can provide a user name and password in the Configuration window.

Feedback