Oracle by Example brandingGet Started with User Accounts REST API - Setup Postman

section 0Before You Begin

This 15 minute tutorial shows you how to setup postman which is used throughout this training to make rest calls.


This tutorial uses the Postman application to interact with the Workers API.

What Do You Need?

  • Postman App or another client.
  • HCM Cloud user account information.

section 1Add an Environment

The samples provided use a URL token. Setting an environment variable allows postman to replace the token with the environment string. This step is optional. You may manually replace the token with your environment details.

  1. Click Manage Environments.
    Manage Environments
  2. Name the environment Oracle Test Env.

  3. Give the environment the following variables:

    Note: The Initial Value must come from your environment.

    Attribute Value
    Variable url
    Initial Value
    Variable User
    Initial Value Integration_User01
    Variable Password
    Initial Value Password123
  4. Click Add.

section 2Create a New Collection

  1. Create a collection.

    Create a new collection
  2. On the Description tab, name the collection ##_UserAccountsCollection.
  3. On the Authorization tab, set type as Basic Auth, and set the credentials to {{User}} and {{Password}}
  4. In the Pre-request Scripts tab, enter the following code:

    var moment = require('moment');
    pm.globals.set("dateStamp", moment().format("YYYY-MM-DD"));
    pm.globals.set("5DaysAgo", moment().add('days', -5).format("YYYY-MM-DD"));
    pm.globals.set("4DaysAhead", moment().add('days', 4).format("YYYY-MM-DD"));
    pm.globals.set("5DaysAhead", moment().add('days', 5).format("YYYY-MM-DD"));
    pm.globals.set ("endDate" , '4712-12-31');

    This code snippit will generate dynamic dates that can be used in your request.

  5. Click Create.

next stepNext Tutorial

Manage User Accounts