Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Next »

Folders can be accessed through this API using the GET service.

Authentication - Use Basic Authentication for this API.

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.

API URLs

http://host:port/flexdeploy/rest/v1/folder/{id}

Request

Parameter
Required
Type
Description
idYesURLThis is a URL path parameter for the id which is used to find a folder.

Response

AttributesTypeDescription
folderNameStringThis is the name of the folder.
folderIdStringThis is the type of the folder.
parentFolderIdLongThis is the Id of the parent folder of this folder.
descriptionStringThis is a description of this folder.
isActiveBooleanThis Boolean indicates whether or not this folder is marked as active.
subFoldersList<Long>This List contains the Id's of the active Folders in this Folder.
applicationsList<Long>This List contains the Id's of the active Applications in this Folder.

Response Codes

HTTP CodeDescription
200Folder found and returned
400Bad request
401Unauthorized
500Unexpected internal server error

Example

If we had a Folder in our database with the name '' with the following attributes:

Folder - "Folder1"
{
   "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/v1/folder/12709

The GET request would return the  following JSON Folder object

GET JSON Response
{
   "folderId": 12709,
   "parentFolderId": 99,
   "folderName": "Folder1",
   "isActive": true,
   "subFolders": [
		12343,
		15467,
		90234
	],
   "applications": [],
   "description": "This is a folder"
}

Get(Using Query Parameters)

This GET service will find a folder by querying based on a folder name and return the JSON representations of the objects satisfying the query. If no query parameters are given this request will return the entire list of folders.

API URLs

http://host:port/flexdeploy/rest/v1/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/v1/folder?folderName={name}

To search for all Folders:

http://host:port/flexdeploy/rest/v1/folder

The query parameters are not case sensitive. Searching by folderName=NAME is the same as searching by folderName=name.

Request

Parameter
Required
Type
Description
folderNameNoQuery - String

This is a URL query parameter for the name which is used to query Folders with.

Contains ignore case search for folder name. Applications are not returned.

Response

AttributesTypeDescription
folderNameStringThis is the name of the folder.
folderIdStringThis is the type of the folder.
parentFolderIdLongThis is the Id of the parent folder of this folder.
descriptionStringThis is a description of this folder.
isActiveBooleanThis Boolean indicates whether or not this folder is marked as active.
subFoldersList<Long>This List contains the Id's of the active Folders in this Folder.
applicationsList<Long>This List contains the Id's of the active Applications in this Folder.

Response Codes

HTTP Code
Description
200Folders were found and returned
400Bad request
401Unauthorized
500Unexpected internal server error

Example

If we had Folders in our database with the names 'Folder1' and 'Folder2' and the following attributes:

Folder - "Folder1"
{
   "folderId": 12709,
   "parentFolderId": 99,
   "folderName": "Folder1",
   "isActive": true,
   "subFolders": [
		12343,
		15467,
		90234
	],
   "applications": [],
   "description": "This is a folder"
}
Folder - "Folder2"
{
   "folderId": 15467,
   "parentFolderId": 12709,
   "folderName": "Folder2",
   "isActive": true,
   "subFolders": [
		12991
	],
   "applications": [
		43271
	],
   "description": "This is another folder"
}

When we run a GET request at the following URL

http://host:port/flexdeploy/rest/v1/folder?folderName=Folder1

The GET request would return the  following JSON workflow object

Search By folderName=folder1
[ 
 {
   "folderId": 12709,
   "parentFolderId": 99,
   "folderName": "Folder1",
   "isActive": true,
   "subFolders": [
		12343,
		15467,
		90234
	],
   "applications": [],
   "description": "This is a folder"
 }
]
  • No labels