Workflow Builder — Publish to Production
Context
What is this? Why is this required?
- This API enables the duplication of workflow-related files from one
appIdto another. - Frequent manual MRs being raised cause missed configs due to limited reviewer context.
- Automating MRs ensures accurate, tested deployments across appIds.
What files are copied?
- HV Central Config
- Workflow config
- UI Config
- Text Config
- GKYC configurations
- Request Param Config
- Response Summary
- VKYC configurations
- Thomas configurations
- All Thomas API configurations used in the workflow
How does it work?
- The API finds the workflow-related files in the source appId in HV Central Config, GKYC Config, VKYC Config and Thomas Configs.
- The API creates an MR to the target appId for all the files found.
- If no files are found, it will say that there are no files to copy.
cURL with details
warning
The MRs created should still be reviewed. The API only creates the MR, and does not do any additional processing. If the files have issues, it will copy those issues to the target appId as well.
Note: The appId used for authentication should be the same as the toAppId.
curl --location 'https://ind-engine.thomas.hyperverge.co/v1/copyWorkflowConfigurationsViaGitlab' \
--header 'Content-Type: application/json' \
--header 'appid: <appId>' \
--header 'appkey: <appKey>' \
--header 'transactionid: something' \
--data '{
"fromAppId":"3okkhb",
"toAppId":"55a3a6",
"workflowId":"hfc_lplmobile_2"
}'
Sample responses
Success response
{
"status": "success",
"result": {
"workflowId": "hfc_lplmobile_2",
"data": {
"mrLinks": {
"hvCentralConfigMrLink": "https://gitlab.com/hvlabs/configurations/hv-central-config/-/merge_requests/13117",
"gkycConfigMrLink": "https://gitlab.com/hvlabs/gkyc/gkyc-configs/-/merge_requests/2156",
"vkycConfigMrLink": "No files to copy",
"thomasConfigMrLink": "https://gitlab.com/hvlabs/thomas/thomas-config/-/merge_requests/2331"
},
"updates": {
"hvConfigFiles": [
{
"from": "https://gitlab.com/hvlabs/configurations/hv-central-config/-/blob/master/buckets/hv-central-config/audit-portal/prod/workflow-builder/workflows/appIds/3okkhb/hfc_lplmobile_2.json",
"to": "https://gitlab.com/hvlabs/configurations/hv-central-config/-/blob/master/buckets/hv-central-config/audit-portal/prod/workflow-builder/workflows/appIds/55a3a6/hfc_lplmobile_2.json"
},
{
"from": "https://gitlab.com/hvlabs/configurations/hv-central-config/-/blob/master/buckets/hv-central-config/audit-portal/prod/workflow-builder/text_ui_configs/appIds/3okkhb/hfc_lplmobile_2_en_text_config.json",
"to": "https://gitlab.com/hvlabs/configurations/hv-central-config/-/blob/master/buckets/hv-central-config/audit-portal/prod/workflow-builder/text_ui_configs/appIds/55a3a6/hfc_lplmobile_2_en_text_config.json"
},
{
"from": "https://gitlab.com/hvlabs/configurations/hv-central-config/-/blob/master/buckets/hv-central-config/audit-portal/prod/workflow-builder/text_ui_configs/appIds/3okkhb/hfc_lplmobile_2_ui_config.json",
"to": "https://gitlab.com/hvlabs/configurations/hv-central-config/-/blob/master/buckets/hv-central-config/audit-portal/prod/workflow-builder/text_ui_configs/appIds/55a3a6/hfc_lplmobile_2_ui_config.json"
}
],
"gkycConfigFiles": [
{
"from": "https://gitlab.com/hvlabs/gkyc/gkyc-configs/-/blob/main/buckets/prod-gkyc-ind/request-param-config/3okkhb.json",
"to": "https://gitlab.com/hvlabs/gkyc/gkyc-configs/-/blob/main/buckets/prod-gkyc-ind/request-param-config/55a3a6.json"
},
{
"from": "https://gitlab.com/hvlabs/gkyc/gkyc-configs/-/blob/main/buckets/prod-gkyc-ind/response-summary/3okkhb.json",
"to": "https://gitlab.com/hvlabs/gkyc/gkyc-configs/-/blob/main/buckets/prod-gkyc-ind/response-summary/55a3a6.json"
}
],
"vkycConfigFiles": [],
"thomasConfigFiles": [
"https://gitlab.com/hvlabs/thomas/thomas-config/-/tree/main/sync_buckets/PANDetailedFetchWithoutPhoneNumber/default/ClientConfig.json",
"https://gitlab.com/hvlabs/thomas/thomas-config/-/tree/main/sync_buckets/ckyc-default/default/ClientConfig.json",
"https://gitlab.com/hvlabs/thomas/thomas-config/-/tree/main/sync_buckets/hfcAddressSplit/default/ClientConfig.json"
]
}
}
}
}
Failure responses
{
"status": "failure",
"error": "<Error message>"
}
Examples
If the appId used for authentication is not the toAppId:
{
"status": "failure",
"error": "AppId used for authentication must be same as toAppId"
}
If the appIds entered are the same:
{
"status": "failure",
"error": "fromAppId and toAppId must be different!"
}
If the workflowId or appId does not exist:
{
"status": "failure",
"error": "No workflow exists for id: temp_hfc_lplmobile_2 in appId: 3okkhb"
}