Changes for page Environment endpoints
Last modified by Outhman Moustaghfir on 2022/06/13 13:17
edited by Outhman Moustaghfir
on 2021/11/22 15:23
on 2021/11/22 15:23
edited by Outhman Moustaghfir
on 2021/11/22 12:33
on 2021/11/22 12:33
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -2,160 +2,18 @@ 2 2 3 3 This section will describe in detail how to manage the Environment entity. 4 4 5 + 5 5 = Endpoints : = 6 6 7 -|(% style="width:294px" %)**URL [method]**|(% style="width:539px" %)**Description**|(% style="width:322px" %)**Input example**|(% style="width:495px" %)**Output example** 8 -|(% style="width:294px" %)/rest/environments [GET]|(% style="width:539px" %)Get a list that contains the current environment and its sub-environments. |(% style="width:322px" %)(no input required)|(% style="width:495px" %){{code language="JSON"}}{ 9 - "timestamp": 1637580872193, 10 - "status": "200", 11 - "data": [ 12 - { 13 - "envid": 20, 14 - "parent": 19, 15 - "alias": "TestEnv1", 16 - "code": "", 17 - "sendurl": false, 18 - "active": true, 19 - "timezone": "GMT", 20 - "gitRepository": "" 21 - }, 22 - { 23 - "envid": 19, 24 - "parent": 1, 25 - "alias": "greatEnv", 26 - "code": "122", 27 - "sendurl": false, 28 - "active": true, 29 - "timezone": "GMT", 30 - "gitRepository": "" 31 - }, 32 - { 33 - "envid": 1, 34 - "parent": 1, 35 - "alias": "iXPath", 36 - "code": "", 37 - "sendurl": false, 38 - "active": true, 39 - "timezone": "Europe/Paris", 40 - "gitRepository": "" 41 - }, 42 - { 43 - "envid": 25, 44 - "parent": 1, 45 - "alias": "PAR", 46 - "code": "", 47 - "sendurl": false, 48 - "active": true, 49 - "timezone": "GMT", 50 - "gitRepository": "" 51 - }, 52 - { 53 - "envid": 26, 54 - "parent": 25, 55 - "alias": "PARR", 56 - "code": "", 57 - "sendurl": false, 58 - "active": true, 59 - "timezone": "GMT", 60 - "gitRepository": "" 61 - } 62 - ] 63 -}{{/code}} 64 -|(% style="width:294px" %)/rest/environments/{id} [GET] |(% style="width:539px" %)__Get __an environment object by __id.__|(% style="width:322px" %)The {id} bracket should be replaced by the environment's ID|(% style="width:495px" %){{code language="JSON"}}{ 65 - "timestamp": 1637587579297, 66 - "status": "200", 67 - "data": { 68 - "envid": 1, 69 - "parent": 1, 70 - "alias": "iXPath", 71 - "code": "", 72 - "sendurl": false, 73 - "active": true, 74 - "timezone": "Europe/Paris", 75 - "gitRepository": "" 76 - } 77 -}{{/code}} 78 -|(% style="width:294px" %)/rest/environments/byAlias/{alias} [GET] |(% style="width:539px" %)__Get __an environment object by __alias.__|(% style="width:322px" %)The {alias} bracket should be replaced by the environment's alias.|(% style="width:495px" %){{code language="JSON" layout="LINENUMBERS"}}{ 79 - "timestamp": 1637587579297, 80 - "status": "200", 81 - "data": { 82 - "envid": 1, 83 - "parent": 1, 84 - "alias": "iXPath", 85 - "code": "", 86 - "sendurl": false, 87 - "active": true, 88 - "timezone": "Europe/Paris", 89 - "gitRepository": "" 90 - } 91 -}{{/code}} 92 -|(% style="width:294px" %)/rest/environments/childs/{id} [GET] |(% style="width:539px" %)Get children list of a certain environment by ID.|(% style="width:322px" %)The {id} bracket should be replaced by the environment's id|(% style="width:495px" %)((( 93 -if by example, the env "iXPath" with EnvID=1 has 2 children : "greatEnv" and "PAR" , the returned object will be : 8 +|(% style="width:294px" %)**URL [method]**|(% style="width:539px" %)**Description**|(% style="width:338px" %)**Input example**|(% style="width:479px" %)**Output example** 9 +|(% style="width:294px" %)/rest/environments [GET]|(% style="width:539px" %)Get a list that contains the current environment and its sub-environments |(% style="width:338px" %)(no input required)|(% style="width:479px" %) 10 +|(% style="width:294px" %) |(% style="width:539px" %) |(% style="width:338px" %) |(% style="width:479px" %) 11 +|(% style="width:294px" %) |(% style="width:539px" %) |(% style="width:338px" %) |(% style="width:479px" %) 12 +|(% style="width:294px" %) |(% style="width:539px" %) |(% style="width:338px" %) |(% style="width:479px" %) 13 +|(% style="width:294px" %) |(% style="width:539px" %) |(% style="width:338px" %) |(% style="width:479px" %) 14 +|(% style="width:294px" %) |(% style="width:539px" %) |(% style="width:338px" %) |(% style="width:479px" %) 15 +|(% style="width:294px" %) |(% style="width:539px" %) |(% style="width:338px" %) |(% style="width:479px" %) 94 94 95 -{{code language="JSON"}} 96 -{ 97 - "timestamp": 1637587991054, 98 - "status": "200", 99 - "data": [ 100 - { 101 - "envid": 19, 102 - "parent": 1, 103 - "alias": "greatEnv", 104 - "code": "122", 105 - "sendurl": false, 106 - "active": true, 107 - "timezone": "GMT", 108 - "gitRepository": "" 109 - }, 110 - { 111 - "envid": 25, 112 - "parent": 1, 113 - "alias": "PAR", 114 - "code": "", 115 - "sendurl": false, 116 - "active": true, 117 - "timezone": "GMT", 118 - "gitRepository": "" 119 - } 120 - ] 121 -} 122 -{{/code}} 123 -))) 124 -|(% style="width:294px" %)/rest/environments/folder/{alias} [GET]|(% style="width:539px" %)__Create__ all folders needed for the environment. |(% style="width:322px" %)The {alias} bracket should be replaced by the environment's alias.|(% style="width:495px" %){{code language="JSON"}} { 125 - "timestamp": 1637587991054, 126 - "status": "200", 127 - "data": "OK" 128 - }{{/code}} 129 -|(% style="width:294px" %)/rest/environments [POST]|(% style="width:539px" %)__Create__ a new environment in the database|(% style="width:322px" %){{code language="json"}} { 130 - "alias" : "eud", 131 - "parent" : 1, 132 - "active" : true, 133 - "code" : "ADE", 134 - "sendurl" : true, 135 - "timezone" : "GMT", 136 - "gitRepository" : null 137 - }{{/code}}((( 138 - 139 139 140 -NB : **"alias"** , **"parent"** and **"active" **are mandatory fields. 141 141 142 142 143 -)))|(% style="width:495px" %){{code language="json"}}{ 144 - "timestamp": 1637590549094, 145 - "status": "200", 146 - "data": { 147 - "envid": 37, 148 - "parent": 1, 149 - "alias": "eud", 150 - "code": "ADE", 151 - "sendurl": true, 152 - "active": true, 153 - "timezone": "GMT", 154 - "gitRepository": null 155 - } 156 -}{{/code}} 157 -|(% style="width:294px" %) |(% style="width:539px" %) |(% style="width:322px" %) |(% style="width:495px" %) 158 - 159 - 160 - 161 -