Changes for page Environment endpoints
Last modified by Outhman Moustaghfir on 2022/06/13 13:17
<
>
edited by Outhman Moustaghfir
on 2021/11/22 12:39
on 2021/11/22 12:39
edited by Outhman Moustaghfir
on 2021/11/22 15:24
on 2021/11/22 15:24
Change comment:
(Autosaved)
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -5,7 +5,7 @@ 5 5 = Endpoints : = 6 6 7 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"}}{ 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 9 "timestamp": 1637580872193, 10 10 "status": "200", 11 11 "data": [ ... ... @@ -61,12 +61,100 @@ 61 61 } 62 62 ] 63 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Ā : 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 + 140 +NB : **"alias"** , **"parent"** and **"active" **are mandatory fields. 141 + 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}} 64 64 |(% style="width:294px" %) |(% style="width:539px" %) |(% style="width:322px" %) |(% style="width:495px" %) 65 -|(% style="width:294px" %) |(% style="width:539px" %) |(% style="width:322px" %) |(% style="width:495px" %) 66 -|(% style="width:294px" %) |(% style="width:539px" %) |(% style="width:322px" %) |(% style="width:495px" %) 67 -|(% style="width:294px" %) |(% style="width:539px" %) |(% style="width:322px" %) |(% style="width:495px" %) 68 -|(% style="width:294px" %) |(% style="width:539px" %) |(% style="width:322px" %) |(% style="width:495px" %) 69 -|(% style="width:294px" %) |(% style="width:539px" %) |(% style="width:322px" %) |(% style="width:495px" %) 70 70 71 71 72 72