Anchor | ||||
---|---|---|---|---|
|
Folders can be accessed through this API using the GET service.
Info | ||
---|---|---|
| ||
http://host:port/flexdeploy/rest/folder |
...
Each function returns JSON Folder objects. The Folder Object is an object that has these attributes,
Attributes | Type | Description | |||
---|---|---|---|---|---|
folderName | String | This is the name of the projectfolder. | |||
folderId | String | This is the type of the folder. | |||
parentFolderId | Long | This is the Id of the parent folder of this folder. | folderName | String | This is the Name used to identify this folder. |
description | String | This is a description of this folder. | |||
isActive | Boolean | This Boolean indicates whether or not this folder is marked as active. | |||
subFolders | List<Long> | This List contains the Id's of the active Folders in this Folder. | |||
applications | List<Long> | This List contains the Id's of the active Applications in this Folder. |
GET
There are two implementations of GET. One will find a Folder with the given Id and return the JSON representation of the Folder. The other will find a list of Folders matching the parameters supplied to it.
GET (Using Id)
This GET service will find a Folder by Id and return a JSON representation of it.
Info | ||
---|---|---|
| ||
http://host:port/flexdeploy/rest/folder/{id} |
Parameter | Required | Type | Description |
---|---|---|---|
id | Yes | URL | This is a URL path parameter for the id which is used to find a folder. |
HTTP Code | Description |
---|---|
200 | Folder found and returned |
400 | Bad request |
401 | Unauthorized |
500 | Unexpected internal server error |
Example:
If we had a Folder in our database with the name '' with the following attributes:
Code Block | ||||
---|---|---|---|---|
| ||||
{ "folderId": 12709, "parentFolderId": 99, "folderName": "Folder1", "isActive": true, "subFolders": [ 12343, 15467, 90234 ], "applications": [], "description": "This is a folder" } |
When we run a GET request at the following URL:
http://{host:port}/flexdeploy/rest/folder/12709
The GET request would return the following JSON Folder object
Code Block | ||||
---|---|---|---|---|
| ||||
{ "folderId": 12709, "parentFolderId": 99, "folderName": "Folder1", "isActive": true, "subFolders": [ 12343, 15467, 90234 ], "applications": [], "description": "This is a folder" } |
Get(Using Query Parameters)
...
Info | ||
---|---|---|
| ||
http://host:port/flexdeploy/rest/folder? Append the following character sequences to the above URL to specify Query parameters.Use '&' between successive query parameters:folderName={name} Examples:To search by name only:http://host:port/flexdeploy/rest/folder?folderName={name} To search for all Folders:http://host:port/flexdeploy/rest/folder |
Tip |
---|
The query parameters are not case sensitive. Searching by folderName=NAME is the same as searching by folderName=name. |
Parameters
Parameter | Required | Type | Description |
---|---|---|---|
folderName | No | URL(query) | This is a URL query parameter for the name which is used to query Folders with. |
Response Codes
HTTP Code | Description |
---|---|
200 | Folders were found and returned |
400 | Bad request |
401 | Unauthorized |
500 | Unexpected internal server error |
Example
If we had Folders in our database with the names 'Folder1' and 'Folder2' and the following attributes:
...