Postman

For automated API calls, Postman is the preferred way to interact with POM in order to call ad hoc processes and perform data load activities. The steps below explain how to configure Postman for first-time use with POM.

Note:

POM versions earlier than v21 allow Basic Authentication, while v21+ requires OAuth 2.0 as detailed below.
  1. As a pre-requisite, retrieve the Client ID and Client Secret from Retail Home’s ‘Create IDCS OAuth 2.0 Client’. Refer to the Retail Home Administration Guide for complete details on retrieving the Client ID and Client Secret info if you have not done it before.

  2. In the Postman application, click New->HTTP Request.

  3. Set Request Type as POST and set the Request URL (Example for RI schedule):

    https://<Region-LB>/<POM-Subnamespace>/ProcessServices/services/private/executionEngine/schedules/RI/execution

    For example:

    https://home.retail.us-region-1.ocs.oc-test.com/rgbu-common-rap-prod-pom/ProcessServices/services/private/executionEngine/schedules/RI/execution
  4. Perform the following steps before sending the POST request to retrieve your authentication token:

    1. Authorization Tab:

      Type: OAuth 2.0

      Add authorization data to: Request Headers

      Postman Authorization Tab
    2. Configure the New Token:

      1. Token Name: PROD5555

      2. Grant Type: Client Credentials

      3. Access Token URL: https://<Customer-IDCS>/oauth2/v1/token

        For example: https://idcs-fe5f77f8a44.identity.c9dev.oc9dev.com/oauth2/v1/token

      4. Client ID: A unique “API Key” generated when registering your application in the Identity Cloud Services admin console.

      5. Client Secret: A private key similar to a password that is generated when registering your application in the Identity Cloud Services admin console.

      6. Scope: rgbu:pom:services-administrator-<Env-INDEX>

        For example: rgbu:pom:services-administrator-PROD5555

      7. Client Authentication: Send as Basic Auth header

      Postman Configure New Token
    3. Click the Get New Access Token button.

      Postman Authentication Complete Window
  5. The Access Token is displayed in the MANAGE ACCESS TOKENS pop-up window. Click the Use Token button.

    MANAGE ACCESS TOKENS Window
  6. The generated token is populated in the Access Token section.

    Access Token Field Populated
  7. In the Parameters, provide a key of skipVersion with a value of true.

    skipVersion Parameter
  8. Click the Body tab to enter the JSON for running POM batches.

  9. Select the raw radio button and JSON file type.

  10. Enter the JSON XML and click the Send button in the Body tab.

    1. If the returned Status is "200 OK" and 'executionEngineInfo': “STARTED” is in the response body, then the batch started as expected.

    2. If the status is not 200 and either of 401 (authorization error) or 500 (incorrect body content) or 404 (server down) and so on, then perform error resolution as needed.

    Example request and response for the HIST_ZIP_FILE_LOAD_ADHOC process:

    Sample JSON Request and Response

    Additional examples of Postman Body JSON XML are listed below.

    Nightly Batch

    {
    "cycleName"    :  "Nightly",
    "flowName"     :  "Nightly",
    "requestType"  :  "POM Scheduler"
    }
    

    With One Process – Applicable for Nightly and Ad Hoc

    {
    "cycleName"     :  "Nightly",
    "flowName"      :  "Nightly",
    "requestType"   :  "POM Scheduler",
    "processName"   :  "LOAD_AGGREGATION_BCOST_IT_DY_A_PROCESS"
    }
    

    With Dynamic Parameters – Applicable for Nightly and Ad Hoc

    {
    "cycleName"         :  "Adhoc",
    "flowName"          :  "Adhoc",
    "requestType"       :  "POM Scheduler",
    "processName"       :  "HIST_INVRTV_LOAD_ADHOC",
    "requestParameters" :  "jobParams.HIST_LOAD_INVRTV_DAY_JOB=2020-09-09 2021-09-09"
    }