Abbreviations, used in the manual:
RDA - Reference Data Admin
FW - Form Wizard
How to run/test API calls:
Can be triggered from Postman or ARC (Chrome Advanced Rest Client extension).
Applicative mode required headers:
1. Authorization (Basic):
Authorization: Basic “{Authorization Key }” (Example: Basic YWRtaW5AUUE6YWRtaW4=)
The Authorization Key is an encrypted combination of user name and password String representation value and can be generated as follow: from quilliup module in the upper right corner click the User's icon and choose "Authentication":
Fill in the currently logged-in user's password and click "Run". In the "Authentication Key" field relevant Authentication Key value will be shown:
Header Value (when quilliup runs in applicative mode) - User name in format Username@TenantName & valid password value:
1.a. User Name: “{User_Name}”@”{Tenant_Name}” (Example: admin@QA).
2.Content-Type: application/json
Active Directory (AD) mode required headers:
1.Header Name – Authorization (NTLM)
1.a. Header Value - User name in format domainName\userName & valid password value:
- Content-Type: application/json
Deploy Steps:
In order to create a Deploy package (folder that will contain all required data and will be used for further Import process) for required FWs, /deployChosenObjects API of type POST should be implemented.
This API requires Body in next format:
{
"projectId": "cf412243-09c5-475d-bfa5-f44bb0287553",
"environemtId": "0f8d0f03-ecb0-4dc4-bd14-4c17ca408116",
"moduleId": 3,
"packageName": "NP1",
"deleted_objects": [ ... ],
"related_objects": [ … ]
}In order to build /deployChosenObjects API’s body in the required format, the next APIs could be implemented previously:
1. Step 1 - API that returns a list of all Projects in RDA - choose needed Project Id from Response, that will be used for further Deploy process:
- Method – GET
-
Request URL - http://localhost:8080/api/projects?filter=id,name&moduleId=3
- Response will be returned in format:
[
{
"id": "cf412243-09c5-475d-bfa5-f44bb0287553",
"name": "chen_test"
},
{
"id": "15e55ea2-0ad7-4f3d-b164-fb569cafff2f",
"name": "Cycle 4"
}, ...
]
2. Step 2 - API that returns a list of all FWs in a specific project - choose needed FW Id from Response, that will be used for further Deploy process:
- Method – GET
-
Request URL - http://localhost:8080/api/form_wizards?filter=id,name&projectId={Project_ID}
- Response will be returned in format:
[
{
"id": "53d42671-d619-4e6d-a287-f3277c226f14",
"name": "Omer_FW"
},
{
"id": "1f704e0e-2ee3-437b-abfa-852b4a3e6f0f",
"name": "Zen_3013"
},
...
]
3.Step 3 - API that returns Environments list- select Environment Id from Response, that will be used for further Deploy process:
- Method – GET
-
Request URL - http://localhost:8080/api/environments?allowDeploy=true&filter=id,name&ignoreSecurity=true
- Response will be returned in format:
[
{
"id": "de98c6ba-7401-485b-9d5a-4758326d8763",
"name": "Amiran_check"
},
{
"id": "0f8d0f03-ecb0-4dc4-bd14-4c17ca408116",
"name": "Moran_test"
},
...
]4. Step 4 - API that returns Related Objects and Deleted Objects:
- Method – POST
-
Request URL - http://localhost:8080/api/deployments/related_objects
- Body:
{
"environemtId": "{Environment_id_from_Step2}",
"moduleId": 3,
"objects": [
{
"id": "{FW_ID_from_Step1}",
"type": "form_wizards"
}
]
}
- Response will be returned in format:
{ "status": true,
"message": {
"related_objects": [
{
"date": 0,
"displayed": true,
"error": "",
"id": "53d42671-d619-4e6d-a287-f3277c226f14",
"name": "Omer_FW",
"nodes": [
{
"date": 0,
"displayed": true,
"error": "",
"id": "e6b0048c-acf4-41c2-b2bb-dc4ecebce1c0",
"name": "Omer-Test",
"nodes": [],
"objectAction": 3,
"selected": true,
"status": "",
"type": "projects"},
......
],
"deleted_objects": [
{
"date": 1634450754000,
"displayed": true,
"error": "",
"id": "53d42671-d619-4e6d-a287-f3277c226f14",
"name": "Omer_FW",
"nodes": [],
"objectAction": 0,
"selected": true,
"status": "",
"type": "form_wizards" },
.........
]
} }
5. Deploy chosen objects – add the FW's Ids and set the environment to Deploy :
- Method – POST
-
Request URL - http://localhost:8080/api/deployments/deployChosenObjects
- Body:
{
"environemtId": "{Environment_id_from_Step2}",
"moduleId": 3,
"projectId": "{Project_ID_From_Step1}",
"packageName": "{New_deploy_package_name}",
"deleted_objects": [ { deleted_objects from Response from Step4 } ],
"related_objects": [ { related_objects from Response from Step4 } ]
}- Response will be returned in format:
{"status":true, "message":"a2308e00-ac03-4742-8c94-ac10f126013a"}
Import Steps:
In order to import an existing package /api/imports/import API of type POST should be implemented.
This API requires Body in the next format:
{
"projectId": "cf412243-09c5-475d-bfa5-f44bb0287553",
"filePath": "D:\\Public\\ImpFolder\\import\\3\\NP1_20211017150451", -- you can use constant path to the folder that will contain all the packages for Import
"moduleId": 3,
"deleted_objects": [ … ], -- you can use "deleted_objects" value received in “Deploy Steps -> Step 4
"related_objects": [ … ], -- you can use "relted_objects" value received in “Deploy Steps -> Step 4
}1.Step 1 - API that allows to get Project's list - choose needed Project Id from Response, that will be used for further Import process:
- Method – GET
-
Request URL - http://localhost:8080/api/projects?filter=id,name&moduleId=3
- Response will be returned in format:
[
{"id": "cf412243-09c5-475d-bfa5-f44bb0287553", "name": "chen_test"},
{"id": "15e55ea2-0ad7-4f3d-b164-fb569cafff2f", "name": "Check"},
...
]
2. Import package:
- Method – POST
-
Request URL - http://localhost:8080/api/imports/import
- Body:
{
"projectId": "{From_Step1}",
"filePath": "valid path to existing deployed package”,
"moduleId": 3,
"deleted_objects": [ ... ],
"related_objects": [ … ]
}- Response example:
{
"status": true,
"message": {
"related_objects": [
{
"date": 0,
"displayed": true,
"error": "",
"id": "53d42671-d619-4e6d-a287-f3277c226f14",
"name": "Omer_FW",
"nodes": [
{
"date": 0,
"displayed": true,
"error": "",
"id": "e6b0048c-acf4-41c2-b2bb-dc4ecebce1c0",
"name": "Omer-Test",
"nodes": [],
"objectAction": 3,
"selected": true,
"status": "completed",
"type": "projects"
}
……,
"deleted_objects": []
}
}
Comments
0 comments
Article is closed for comments.