Defining the REST Service Endpoints

When the REST service has been defined, the next step is to indicate where the service is available by defining REST service endpoints for the different environments.

Before you begin

For this tutorial the service must already exist in both the Staging and Production environments and a REST Service Endpoint will be created for each of these environments.

Procedure

  1. Optional: If you have security enabled and have assigned separate user IDs for each of the governance enablement profile roles, as described in Governing an existing service, log in to the WSRR web user interface with the user ID that is assigned to the Operations role.
  2. In the web user interface, switch to the Operations perspective by selecting Operations from the Perspective list.
  3. Create a new REST service endpoint for the Staging environment.
    1. Click Actions > Create > REST > Create REST Service Endpoint.
    2. In the Name field, enter http://CSStagingHost:9081/services/catalog/.
    3. In the Description field, enter Service Endpoint for Catalog Service on the Staging system.
    4. In the Version field, enter 1.0.
    5. In the Base URL field, enter http://CSStagingHost:9081/services/catalog/, which is the root of the URL of the endpoint that services the collection of REST resources represented by the Catalog search service.
    6. In the Service Namespace field, enter http://commonServices.org/.
    7. In the Endpoint Type field, enter REST.
    8. In the Service Name field, enter Catalog Search.
    9. In the Service Version field, enter 1.0.
    10. Click Finish to save the new REST service endpoint.
  4. Add the Staging environment classification to the endpoint.
    1. Click Edit Classifications.
    2. Expand Governance Profile Taxonomy > Environment.
    3. Select the check box for Staging, and click Add. The Staging classification is added to the Classification list.
    4. Click OK to assign the classification.
  5. Add the visibility classification to the endpoint. Because this is an existing service in the Staging environment, it has an internal endpoint; this classification declares the endpoint.
    1. Click Edit Classifications.
    2. Expand Visibility Classification System > Visibility.
    3. Select the check box for Internal and click Add. The Internal classification is added to the Classification list. In this example, the Staging host is an internal system for testers rather than for general consumers.
    4. Click OK to assign the classification.
  6. Activate the endpoint. Because this is an existing service in the Staging environment it is already being used, so you must activate the description of the endpoint to reflect this.
    1. Click Approve for Use. The endpoint governance state changes to Online.
  7. Create a new REST service endpoint for the Production environment.
    1. Click Actions > Create > REST > Create REST Service Endpoint.
    2. In the Name field, enter http://CSProductionHost:9443/services/catalog/.
    3. In the Description field, enter Service Endpoint for Catalog Service on the Production system.
    4. In the Version field, enter 1.0.
    5. In the Base URL field, enter http://CSProductionHost:9443/services/catalog/ which is the root of the URL of the endpoint that services the collection of REST resources represented by the Catalog search service.
    6. In the Service Namespace field, enter http://commonServices.org/.
    7. In the Endpoint Type field, enter REST.
    8. In the Service Name field, enter Catalog Search.
    9. In the Service Version field, enter 1.0.
    10. Click Finish to save the new REST service endpoint.
  8. Add the Production environment classification to the endpoint.
    1. Click Edit Classifications.
    2. Expand Governance Profile Taxonomy > Environment.
    3. Select the check box for Production, and click Add. The Production classification is added to the Classification list.
    4. Click OK to assign the classification.
  9. Add the visibility classification to the endpoint. Because this is an existing service in the Production environment, it has an external endpoint; this classification declares this endpoint.
    1. Click Edit Classifications.
    2. Expand Visibility Classification System > Visibility.
    3. Select the check box for External and click Add. The External classification is added to the Classification list.
    4. Click OK to assign the classification.
  10. Activate the endpoint. Because this is an existing service in the Production environment it is already being used, so you must activate the description of the endpoint to reflect this.
    1. Click Approve for Use. The endpoint governance state changes to Online.
    You now have two definitions of a REST service endpoint for the Catalog service; one for each of the environments. You must associate these endpoints with the REST service that it is representing.
  11. Associate the REST Service Endpoints with the REST Service.
    1. In the web user interface, switch to the Development perspective if necessary, by selecting Development from the Perspective list.
    2. Select View > Service Model > REST Services.
    3. Select CatalogSearch from the collections view.
    4. Click Edit Relationships to add the new REST endpoints.
    5. Click Add REST Service Endpoint under Add Relationship in the details view for this REST service.
    6. In the Name field under Search for Existing Entity, enter *.
    7. Click Search.
    8. Select the check box for http://CSProductionHost:9443/services/catalog/ and http://CSStagingHost:9081/services/catalog/
    9. Click Apply Selected Targets.
    10. Click Finish to save the REST service.

Results

In this tutorial, you completed the following activities: