Creating REST data source schema

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)

About this task

Note: Complete this task to help in locating the schema in Rational Team Concert and data sources using data services. For other REST based applications, see your product documentation for information about generating schemas.

Procedure

  1. In Document Studio, click Data > Schema Discovery > REST Schema Discovery.
  2. Specify the connection details:
    1. Name: Enter a name for the data source.
    2. Description: Enter a description for the data source.
    3. Base URL: Specify the base URL for the resource.
    4. Authentication Type: Select the authentication type from the list.
    5. User: If the resource is in a secured server, specify the user name.
    6. Password: If the resource is in a secured server, specify the password.
  3. Click Next.
  4. In the Create a Resource window, specify the details for the new resource:
    1. Name: Enter a name for the new resource.
    2. Description: Enter a description for the new resource.
    3. Relative path: Enter a relative path for the new resource.
    If the REST data source is accessible through the Data Services adapters, 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.
  5. 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.
  6. 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.
  7. 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.

What to do next

Add this schema to you template. See Adding data source schemas.

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. Base URL: 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 data services 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. Authentication Type: Select Form Authentication or OAuth Authentication.
    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.
  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