Package com.xebialabs.xlrelease.api.v1
Interface FolderApi
- All Superinterfaces:
ApiService
@Path("/api/v1/folders")
@Produces("application/json")
@Consumes("application/json")
public interface FolderApi
extends ApiService
Operations on folders.
-
Field Summary
FieldsFields inherited from interface com.xebialabs.xlrelease.api.ApiService
DEFAULT_RESULTS_PER_PAGE, DEFAULT_RESULTS_PER_PAGE_STRING, DEPTH, ORDER_BY, PAGE, PAGE_IS_OFFSET, RESULTS_PER_PAGE, ROLE_IDS_DATA
-
Method Summary
Modifier and TypeMethodDescriptionAdds a new folder inside the specified folder.void
addPermissionsToTeamById
(String folderId, String teamId, List<String> permissions) void
addPermissionsToTeamByName
(String folderId, String teamName, List<String> permissions) void
addPrincipalsToTeamById
(String folderId, String teamId, List<String> principalNames) void
addPrincipalsToTeamByName
(String folderId, String teamName, List<String> principalNames) void
addRoleNamesToTeamById
(String folderId, String teamId, List<String> roleNames) void
addRoleNamesToTeamByName
(String folderId, String teamName, List<String> roleNames) createTeam
(String folderId, CreateTeam createTeam) default String
createTeam
(String folderId, String name, List<String> principals, List<String> roles, List<String> permissions) createVariable
(String folderId, Variable variable) Adds a folder variable.void
Deletes the specified folder and all the contents inside.void
deleteTeamById
(String folderId, String teamId) void
deleteTeamByName
(String folderId, String teamName) void
deleteVariable
(String folderId, String variableId) Deletes a folder variable.Finds a folder from a given path.Returns the specified folder with default depth.Returns the specified folder.Returns possible permissions.Returns folder effective teams.getTemplates
(String folderId) Returns the templates for the given folder with default pagination and depth.getTemplates
(String folderId, Long page, Long resultPerPage) Returns the templates for the given folder.getTemplates
(String folderId, Long page, Long resultPerPage, Integer depth) Deprecated.Since 24.1.0.getTemplates
(String folderId, String kind, Long page, Long resultPerPage) Returns the list of release or workflow templates for the given folder.Deprecated.Since 24.1.0.getVariable
(String folderId, String variableId) Returns the folder variable for the given identifier.boolean
isFolderOwner
(String folderId) list
(String parentId, Long page, Long resultPerPage, Integer depth, Boolean decorateWithPermissions) Lists the folders inside a given folder.listRoot()
Returns a list of all folders directly under the root directory.Returns a list of folders from the root directory.listVariables
(String folderId, boolean folderOnly) Returns folder variables list.listVariableValues
(String folderId, boolean folderOnly) Returns folder variables list with replaced variable values.void
Move a folder to another folder.void
moveTemplate
(String folderId, String templateId) Move a template to another folder without merging permissions.void
moveTemplate
(String folderId, String templateId, Boolean mergeTeams) Move a template to another folder.void
removePermissionsFromTeamById
(String folderId, String teamId, List<String> permissions) void
removePermissionsFromTeamByName
(String folderId, String teamName, List<String> permissions) void
removePrincipalsFromTeamById
(String folderId, String teamId, List<String> principalNames) void
removePrincipalsFromTeamByName
(String folderId, String teamName, List<String> principalNames) void
removeRoleNamesFromTeamById
(String folderId, String teamId, List<String> roleNames) void
removeRoleNamesFromTeamByName
(String folderId, String teamName, List<String> roleNames) void
Rename a folder.searchReleases
(String folderId, ReleasesFilters releasesFilters) Returns the releases started from this folder with default pagination and depth.searchReleases
(String folderId, Long page, Long resultPerPage, ReleasesFilters releasesFilters) Returns the releases started from this folder.searchReleases
(String folderId, Long page, Long resultPerPage, Integer depth, ReleasesFilters releasesFilters) Deprecated.Since 24.1.0.default String
Set teams of the folder.updateVariable
(String folderId, Variable variable) Updates properties of a folder variable by its ID.updateVariable
(String folderId, String variableId, Variable variable)
-
Field Details
-
EXPRESSION_FOLDER_ID
- See Also:
-
-
Method Details
-
serviceName
- Specified by:
serviceName
in interfaceApiService
-
listRoot
@GET @Path("/list") List<Folder> listRoot(@QueryParam("page") Long page, @QueryParam("resultsPerPage") Long resultPerPage, @QueryParam("depth") Integer depth, @QueryParam("permissions") Boolean decorateWithPermissions) Returns a list of folders from the root directory.- Parameters:
page
- the page of results to return. Defaults at 0 if page set to nullresultPerPage
- the number of results per page. Defaults at 50 if set to nulldepth
- the depth to search for. Defaults at 1 if set to nulldecorateWithPermissions
- the boolean to decorate the folders with the effective permissions. Defaults to false if set to null- Returns:
- a list of the folders
-
listRoot
Returns a list of all folders directly under the root directory.- Returns:
- a list of the folders
-
list
@GET @Path("/{folderId:.*(Folder[^/]*|Applications)}/list") List<Folder> list(@PathParam("folderId") String parentId, @QueryParam("page") Long page, @QueryParam("resultsPerPage") Long resultPerPage, @QueryParam("depth") Integer depth, @QueryParam("permissions") Boolean decorateWithPermissions) Lists the folders inside a given folder.- Parameters:
parentId
- the parent folder to retrieve frompage
- the page of results to return. Defaults at 0resultPerPage
- the number of results per page. Defaults at 50depth
- the depth to search for. Defaults at 1- Returns:
- the list of folders beneath a given folder
-
find
@GET @Path("/find") Folder find(@QueryParam("byPath") String path, @QueryParam("depth") Integer depth) Finds a folder from a given path.- Parameters:
path
- the path for the folder to search ondepth
- the depth to search for. Defaults at 1- Returns:
- the folder found in the path
-
getFolder
@GET @Path("/{folderId:.*(Folder[^/]*|Applications)}") Folder getFolder(@PathParam("folderId") String folderId, @QueryParam("depth") Integer depth) Returns the specified folder.- Parameters:
folderId
- the id of the folderdepth
- the depth to search for. Defaults at 1- Returns:
- the specified folder
-
getFolder
Returns the specified folder with default depth.- Parameters:
folderId
- the folder id- Returns:
- the given folder
-
getTemplates
@Deprecated(since="24.1.0") @GET @Path("/{folderId:.*(Folder[^/]*|Applications)}/templates") List<Release> getTemplates(@PathParam("folderId") String folderId, @DefaultValue("RELEASE") @QueryParam("kind") String kind, @QueryParam("page") Long page, @QueryParam("resultsPerPage") Long resultPerPage, @QueryParam("depth") Integer depth) Deprecated.Since 24.1.0. Please usegetTemplates(String, String, Long, Long)
Returns the list of release or workflow templates for the given folder.- Parameters:
folderId
- the id of the folderkind
- the kind of template. Default value is release.page
- the page of results to return. Defaults at 0resultPerPage
- the number of results per page. Defaults at 50depth
- the (optional) depth to search for; defaults at 1- Returns:
- the list of templates in the folder
-
getTemplates
@GET @Path("/{folderId:.*(Folder[^/]*|Applications)}/templates") List<Release> getTemplates(@PathParam("folderId") String folderId, @DefaultValue("RELEASE") @QueryParam("kind") String kind, @QueryParam("page") Long page, @QueryParam("resultsPerPage") Long resultPerPage) Returns the list of release or workflow templates for the given folder.- Parameters:
folderId
- the id of the folderkind
- the kind of template. Default value is release.page
- the page of results to return. Defaults at 0resultPerPage
- the number of results per page. Defaults at 50- Returns:
- the list of templates in the folder
-
getTemplates
@Deprecated(since="24.1.0") default List<Release> getTemplates(String folderId, Long page, Long resultPerPage, Integer depth) Deprecated.Since 24.1.0. Please usegetTemplates(String, Long, Long)
Returns the templates for the given folder.- Parameters:
folderId
- the id of the folderpage
- the page of results to return. Defaults at 0resultPerPage
- the number of results per page. Defaults at 50depth
- the (optional) depth to search for; defaults at 1- Returns:
- the list of templates in the folder
-
getTemplates
Returns the templates for the given folder.- Parameters:
folderId
- the id of the folderpage
- the page of results to return. Defaults at 0resultPerPage
- the number of results per page. Defaults at 50- Returns:
- the list of templates in the folder
-
getTemplates
Returns the templates for the given folder with default pagination and depth.- Parameters:
folderId
- the folder id- Returns:
- the list of templates in the folder
-
searchReleases
@Deprecated(since="24.1.0") @POST @Path("/{folderId:.*(Folder[^/]*|Applications)}/releases") List<Release> searchReleases(@PathParam("folderId") String folderId, @QueryParam("page") Long page, @QueryParam("numberbypage") Long resultPerPage, @QueryParam("depth") Integer depth, ReleasesFilters releasesFilters) Deprecated.Since 24.1.0. Please usesearchReleases(String, Long, Long, ReleasesFilters)
Returns the releases started from this folder.- Parameters:
folderId
- the id of the folderpage
- the page of results to return. Defaults at 0resultPerPage
- the number of results per page. Defaults at 50depth
- the depth to search forreleasesFilters
- releaseFilter to filter the release search- Returns:
- the list of releases
-
searchReleases
@POST @Path("/{folderId:.*(Folder[^/]*|Applications)}/releases") List<Release> searchReleases(@PathParam("folderId") String folderId, @QueryParam("page") Long page, @QueryParam("numberbypage") Long resultPerPage, ReleasesFilters releasesFilters) Returns the releases started from this folder.- Parameters:
folderId
- the id of the folderpage
- the page of results to return. Defaults at 0resultPerPage
- the number of results per page. Defaults at 50releasesFilters
- releaseFilter to filter the release search- Returns:
- the list of releases
-
searchReleases
Returns the releases started from this folder with default pagination and depth.- Parameters:
folderId
- the folder idreleasesFilters
- the releaseFilters to filter the release search on- Returns:
- the list of releases in a folder
-
moveTemplate
@POST @Path("/{folderId:.*(Folder[^/]*|Applications)}/templates/{templateId:.*Release[^/]*}") void moveTemplate(@PathParam("folderId") String folderId, @PathParam("templateId") String templateId, @QueryParam("mergePermissions") Boolean mergeTeams) Move a template to another folder.- Parameters:
folderId
- the target folder the template will be moved totemplateId
- the id of the template to be moved
-
moveTemplate
Move a template to another folder without merging permissions.- Parameters:
folderId
- the id of the parent foldertemplateId
- the id of the template to be moved
-
addFolder
@POST @Path("/{folderId:.*(Folder[^/]*|Applications)}") Folder addFolder(@PathParam("folderId") String parentId, Folder folder) Adds a new folder inside the specified folder.- Parameters:
parentId
- the id of the folder to create the folder infolder
- the folder to create the new folder in- Returns:
- the newly created folder
-
delete
@DELETE @Path("/{folderId:.*(Folder[^/]*|Applications)}") void delete(@PathParam("folderId") String folderId) Deletes the specified folder and all the contents inside.- Parameters:
folderId
- the id of the folder to delete
-
move
@POST @Path("/{folderId:.*(Folder[^/]*|Applications)}/move") void move(@PathParam("folderId") String folderId, @QueryParam("newParentId") String newParentId) Move a folder to another folder. Following restrictions apply to folder being moved: it must not contain any scheduled or running releases, the folder and all its children must not contain any triggers, and it must not contain any releases with references to connections not available under new parent folder.- Parameters:
folderId
- the id of the folder to movenewParentId
- the id of the parent folder the folder will be moved under
-
rename
@POST @Path("/{folderId:.*(Folder[^/]*|Applications)}/rename") void rename(@PathParam("folderId") String folderId, @QueryParam("newName") String newName) Rename a folder.- Parameters:
folderId
- the id of the folder to renamenewName
- the new name of the folder
-
getPermissions
Returns possible permissions.- Returns:
- list of permissions for folders, templates and releases
-
getTeams
@GET @Path("/{folderId:.*(Folder[^/]*|Applications)}/teams") List<TeamView> getTeams(@PathParam("folderId") String folderId) Returns folder effective teams.- Parameters:
folderId
- the id of the folder- Returns:
- list of effective teams
-
setTeams
@POST @Path("/{folderId:.*(Folder[^/]*|Applications)}/teams") List<TeamView> setTeams(@PathParam("folderId") String folderId, List<TeamView> teamDtos) Set teams of the folder.If teams were previously inherited they will be detached after the update. To use inherited teams on a folder submit empty list of teams.
- Parameters:
folderId
- the identifier of the folder- Returns:
- a list of updated teams
-
isFolderOwner
@GET @Path("/{folderId:.*(Folder[^/]*|Applications)}/folderOwner") boolean isFolderOwner(@PathParam("folderId") String folderId) -
listVariables
@GET @Path("/{folderId:.*(Folder[^/]*|Applications)}/variables") List<Variable> listVariables(@PathParam("folderId") String folderId, @QueryParam("folderOnly") boolean folderOnly) Returns folder variables list.- Parameters:
folderId
- the folder identifier.folderOnly
- filter if you only want to get information from your parentId. (optional)- Returns:
- variables list.
-
listVariableValues
@GET @Path("/{folderId:.*(Folder[^/]*|Applications)}/variableValues") Map<String,String> listVariableValues(@PathParam("folderId") String folderId, @QueryParam("folderOnly") boolean folderOnly) Returns folder variables list with replaced variable values.- Parameters:
folderId
- the folder identifier.folderOnly
- filter if you only want to get information from your parentId. (optional)- Returns:
- variables list.
-
createVariable
@POST @Path("/{folderId:.*(Folder[^/]*|Applications)}/variables") Variable createVariable(@PathParam("folderId") String folderId, Variable variable) Adds a folder variable.- Parameters:
folderId
- the folder identifier.variable
- the folder variable to add.- Returns:
- the added folder variable.
-
getVariable
@GET @Path("/{folderId:.*(Folder[^/]*|Applications)}/{variableId:.*Variable[^/]*}") Variable getVariable(@PathParam("folderId") String folderId, @PathParam("variableId") String variableId) Returns the folder variable for the given identifier.- Parameters:
folderId
- the folder identifier.variableId
- the variable identifier.- Returns:
- the variable.
-
updateVariable
-
updateVariable
Updates properties of a folder variable by its ID.- Parameters:
folderId
- the folder identifier.variable
- the variable to update.- Returns:
- the updated variable.
-
deleteVariable
@DELETE @Path("/{folderId:.*(Folder[^/]*|Applications)}/{variableId:.*Variable[^/]*}") void deleteVariable(@PathParam("folderId") String folderId, @PathParam("variableId") String variableId) Deletes a folder variable.- Parameters:
folderId
- the folder identifier.variableId
- the variable identifier.
-
getTeam
-
findTeam
-
createTeam
@POST @Path("/{folderId:.*(Folder[^/]*|Applications)}/create-team") String createTeam(@PathParam("folderId") String folderId, CreateTeam createTeam) -
createTeam
-
deleteTeamByName
-
deleteTeamById
-
addPrincipalsToTeamById
-
addPrincipalsToTeamByName
-
removePrincipalsFromTeamById
-
removePrincipalsFromTeamByName
-
addRoleNamesToTeamById
-
addRoleNamesToTeamByName
-
removeRoleNamesFromTeamById
-
removeRoleNamesFromTeamByName
-
addPermissionsToTeamById
-
addPermissionsToTeamByName
-
removePermissionsFromTeamById
-
removePermissionsFromTeamByName
-