Automation - Run HCM Console Script
This step involves executing the Postman collection for collective creation of hierarchical data, file uploads, template generation, validation, and campaign creation within the same
Last updated
This step involves executing the Postman collection for collective creation of hierarchical data, file uploads, template generation, validation, and campaign creation within the same
Last updated
All content on this page by eGov Foundation is licensed under a Creative Commons Attribution 4.0 International License.
Import the environment variable file and collection file in Postman.
Click on the Import button and drop both files.
Go to the Environment tab on the left side and click on it.
Certain values of environment variables should be changed depending on the following:
URL: This depends on the environment being used (for example, development, staging, production).
tenantid: Identifies the specific tenant for which the operations are being performed.
projecttype: Specifies the type of project, which can be either "LLIN-mz" or "MR-DN" (MDMS configuration).
locale: Defines the locale/language for localization purposes (e.g., en_IN for English in India, en_MZ for English in Mozambique).
msgId: Unique identifier combined with locale (e.g., 1710912592752|en_MZ). In msg id, change as per the locale used.
Go to the collection tab on the left side and click on it.
Start executing the script one by one.
In Filestore upload API, upload the Excel sheet in the file field by uploading the valid file. You will get a filestore id in response.
For example, A valid file can be created - if hierarchyType is "MH" and the sheet has 6 levels consisting of COUNTRY, PROVINCE, DISTRITO, POST ADMINISTRATIVE, LOCALITY and VILLAGE. Change the sheet name to MH_COUNTRY, MH_PROVINCE, MH_DISTRITO, MH_POST ADMINISTRATIVE, MH_LOCALITY, and MH_VILLAGE and all the boundaries as per hierarchy and upload the Excel sheet.
The sample sheet with valid data is given below:
Based on the campaign type, create a draft campaign by changing the variable of project type.
From 13. check the Excel with filestore Target API, and click on the filestore link by clicking on ctrl+click. It will download the target file.
From 14. filestore upload target API. After downloading the file, upload the valid file by filling in the target column in the sheet. You will get a filestore id in response.
Sample Sheet:
From 17, check the Excel with filestore API. Click on the filestore link (ctrl+click). It will download the facility file.
From 18, filestore upload Facility API; after downloading the file, upload the valid file by filling in the facility usage and boundary code column in the sheet. You will get a filestore id in response.
Sample Sheet:
From 21, check the Excel with filestore API, and click on the filestore link by pressing ctrl+click. It will download the user file.
From 22, filestore upload User API. After downloading the file, upload the valid file by filling in all columns in the sheet. You will get a filestore id in response.
Sample Sheet:
From 29, you have to create a campaign as per the campaign type i.e. LLIN/IRS and MRDN.
Based on Campaign create curl of campaign type, delivery rules and additional details are specified. change dates wherever required.
From 32, check user creds Excel. You will be able to get the user credentials Excel sheet by clicking on the filestore link (ctrl+click).
In the user credentials sheet, you will be able to see the username and password to log into the app.
Sample Sheet:
Auth token: Obtains credentials required to execute the collection.
Create boundary-hierarchy-definition: Creates a new hierarchy definition.
Search boundary-hierarchy-definition: Searches for a hierarchy definition created by the user.
F ilestore upload: Uploads boundaries stored in an Excel file.
Boundary bulk upload: Uploads boundaries for previously created hierarchies.
Boundary relationship search API: Searches relationships of boundary uploads within a specified hierarchy.
Upsert localisations: Inserts or updates localizations for headers related to hierarchy names in a spreadsheet.
Search Localisations: Verifies if localisations have been successfully created.
Campaign create draft: Initiates the creation of a campaign with project type, name, start/end dates, delivery rules, and selected boundaries.
Campaign search: Searches the drafted campaign
Template Generate API - boundary: Generates a template for uploading targets.
Template Download API - boundary: Retrieves Filestore ID generated from template generate API for boundary templates.
Get Excel: Fetches and downloads the Excel file associated with a Filestore ID.
Filestore upload: Uploads a target file by filling in all necessary data.
Template Generate API - facility: Generates a template for uploading facilities.
16.Template Download API - facility: Retrieves Filestore ID generated from Template Generate API for facility templates.
Get Excel: Fetches and downloads the Excel file associated with a Filestore ID.
Filestore upload: Uploads a facility file by filling in all necessary data.
Template Generate API - user: Generates a template for uploading users.
Template Download API - user: Retrieves Filestore ID generated from Template Generate API for user templates.
Get Excel: Fetches and downloads the Excel file associated with a Filestore ID.
Filestore upload: Uploads a user file by filling in all necessary data.
Validate resource boundary: Checks the correctness of an uploaded boundary file.
Search API: Searches for the validated boundary file.
Validate resource facility: Checks the correctness of an uploaded facility file.
Search API: Searches for the validated facility file.
Validate resource user: Checks the correctness of an uploaded user file.
Search API: Searches for the validated user file.
Campaign create: Creates a campaign using resource IDs and Filestore IDs validated through previous APIs.
Campaign search API: Searches for a campaign and checks its status (creating, created, or failed).
Search API - user creds: Fetches user credentials resource ID.
Check user creds Excel.