Skip to Content
Author's profile photo Raghavendra Kulkarni

Manage Data Quality API using SAP API Management – Part 3

In this blog, we will create Data Quality API Proxy using SAP API Management. Previously in the   Data Quality Management Service in Cloud Platform trial blog, we discovered Data Quality API in the SAP API Business Hub and activated the service in our CP-trial account.

Before we proceed, we assume that SAP API Management service is activated on Cloud Platform trial account, for details please refer blog  SAP API M Overview & Getting started.

Note: You can discover Documentation, Production & Trial URLs of Data Quality Management Service in the overview tab of the Data Quality API

1. Launch API Portal and create an API Proxy using your trial or productive URL of Data Quality Service

In order to test API Proxy using reverseGeo, we add it as resource on API Proxy.

Based on the API documentation of Data Quality API we know that reverseGeo only supports POST operation.  So we select only POST operation and then click on Save & Deploy button

3. Data Quality Management service is protected by the HCPOAuth, we need to generate Bearer token to test created API Proxy.

Refer previous blog ‘ Data Quality Management Service in CP trial account ‘ to Generate OAuth token

4. Perform POST operation on the resource reverseGeo, to do POST operation click on the POST button, Test console comes up.

Enter header parameters :

  1.  Authorization    –>   Bearer <Generated OAuth token>    ()
  2. Content  Type   –>   application/json
  3. Pay Load :
               "geoInput": {        
               "latitude": 43.811276,
              "longitude": -91.256977
             "maxRecords": 3
            "outputFields": [

5. Post operation response

6. Now we will add an additional security measure to existing OAuth by adding Verify_API_Key policy. After adding this policy the API consumer will be required to provide an API_Key to access the API.

7. Open the Policy editor of the API in the edit mode, select the ProxyEndPoint–>PreFlow & Click on the + button to add the Verify API Key policy.

8. Verify API Key policy added on the PreFlow of the Proxy End Point.

Change the APIKey ref parameter to ‘ request.header.apikey ‘, click on Update button and Save the API.

9. To perform POST operation on the resource reverseGeo, now we need to provide OAuth token & apikey.

If you try to access API with just the OAuth token but without apikey, you would see a message as shown below.

Note: In order to acquire an APIKey please refer blog SAP API Policy Management


Accessing API with OAuthtoken & apikey



Let’s go back to SAP API Business Hub

1. Download Data Quality Management API by clicking the Action icon & select Download API

Select the JSON format.

2. Create API in API Management using the downloaded OAS file from API Business Hub

Launch APIPortal, click on the link Import API


3. Import the downloaded OAS json file.

4. Navigate to the Target End tab, change the Sandbox URL of SAP API Business Hub to our production URL and click on Save & Deploy.

5. Navigate to the Resources tab, as seen in SAP API Business Hub all the 5 resources of the API are added.

Now test all the resources of the API by getting the OAuth token

In the next blog Part 4 of this series, we will handle OAuth token generation using the policies.

Assigned Tags

      Be the first to leave a comment
      You must be Logged on to comment or reply to a post.