Creating the custom access profile to get the UserData from REST service

In this lesson, you create an extended configuration file to retrieve warranty information from REST service.

About this task

REST services are built on top of OAGIS services. REST services use an access profile and XPath to get data from an OAGIS noun. The access profiles that are used by REST services are defined in the Rest.war/WEB-INF/config/ You can extend the configuration files to overwrite the data mapping, Rest.war/WEB-INF/config/


  1. Start WebSphere Commerce Developer utility
  2. Open Java EE perspective and select the Enterprise Explorer view.
  3. Go to the WCDE_installdir\workspace\Rest\WebContent\WEB-INF\config directory.
  4. Right-click the config folder and create an extension folder called
  5. Create a custom configuration file called wc-rest-resourceconfig.xml. Copy the following snippet into the file:
    <?xml version="1.0" ?>
    Define the custom access profile to get the user data information from REST service.
      <Resource name="productview">
         description="Get product by unique ID" 	
    In the extended configuration file, specify the following information:
    • The resource to be customized. In this scenario, the resource name is productview since Warranty is added against the product level.
    • The GetUri you want to customize. In this scenario, retrieve the data by using productId.
    • The description. In this scenario, the description is to get product by part number.
    • The access profile. The extended access profile controls the amount of data that the expression builder returns.
    • The search profile. The extended search profile retrieves the user data information from the search index.
    For more information, see Customizing and configuring REST resources using the BOD mapping framework.
  6. Save and close the file.
  7. Restart your test server.
  8. Verify that REST has access to warranty information.
    1. Launch poster for Firefox..
    2. In the URL field, input your URL for the product with warranty information.


      Hit the URL to test
    3. Press GET.
      The user data is retrieved through productId number 17101 via REST service. Ensure that you see xcatentry_WARRANTYTERM and xcatentry_WARRANTYTYPE in the results.

      REST service response with warranty term and warranty type displayed.


By verifying through poster, you successfully created a custom access profile to get userData from REST services. You are ready to proceed to the next lesson.