cerberus-core icon indicating copy to clipboard operation
cerberus-core copied to clipboard

Application endpoint modification

Open Nouxx opened this issue 4 years ago • 0 comments

Hello,

Currently, the front is calling 3 endpoints to fetch all the necessary information :

  • https://qa.cerberus-testing.org/ReadApplication?application=CerberusFront
  • https://qa.cerberus-testing.org/ReadApplicationObject?application=CerberusFront
  • https://qa.cerberus-testing.org/ReadCountryEnvironmentParameters?system=CERBERUS&application=CerberusFront&iSortCol_0=3

What do you think of grouping this information in a single endpoint which would return someting like :

{
    "hasPermissions": true,
    "messageType": "OK",
    "contentTable": {
        "UsrModif": "",
        "poolSize": 0,
        "bugTrackerNewUrl": "",
        "subsystem": "",
        "description": "Cerberus Front Application (cerberus-angular)",
        "DateCreated": "Oct 7, 2019 2:08:37 PM",
        "sort": 1,
        "svnurl": "",
        "type": "GUI",
        "mavengroupid": "",
        "DateModif": "Jan 1, 1970 1:01:01 AM",
        "bugTrackerUrl": "",
        "system": "CERBERUS",
        "application": "CerberusFront",
        "UsrCreated": "cvannouque",
        "deploytype": "NONE",
        "objects": [
            {
                "application": "CerberusFront",
                "usrcreated": "cvannouque",
                "usrmodif": "cvannouque",
                "ID": 91,
                "datecreated": "2019-11-25 17:26:40.0",
                "screenshotfilename": "",
                "datemodif": "2019-11-25 17:26:40.0",
                "value": "id=username",
                "object": "USER_FIELD"
            },
            {
                "application": "CerberusFront",
                "usrcreated": "cvannouque",
                "usrmodif": "cvannouque",
                "ID": 93,
                "datecreated": "2019-11-25 17:32:46.0",
                "screenshotfilename": "",
                "datemodif": "2019-11-25 17:32:53.0",
                "value": "xpath=//*[@id=\"kc-login\"]",
                "object": "USER_LOGIN_BUTTON"
            },
            {
                "application": "CerberusFront",
                "usrcreated": "cvannouque",
                "usrmodif": "cvannouque",
                "ID": 92,
                "datecreated": "2019-11-25 17:27:49.0",
                "screenshotfilename": "",
                "datemodif": "2019-11-25 17:27:49.0",
                "value": "id=password",
                "object": "USER_PASSWORD_FIELD"
            }
        ],
        "environments": [
            {
                "country": "FR",
                "urlLogin": "",
                "ip": "https://front-qa.cerberus-testing.org/",
                "poolSize": 2,
                "mobilePackage": "",
                "url": "",
                "environment": "QA",
                "system": "CERBERUS",
                "application": "CerberusFront",
                "domain": "",
                "var4": "",
                "var3": "",
                "var2": "",
                "var1": "",
                "mobileActivity": ""
            }
        ]
    },
    "message": "Application - SELECT was finished with success!"
}

Nouxx avatar Mar 23 '20 20:03 Nouxx