Interface FolderApi

All Superinterfaces:
ApiService

@Path("/api/v1/folders") @Produces("application/json") @Consumes("application/json") public interface FolderApi extends ApiService
Operations on folders.
  • Field Details

  • Method Details

    • serviceName

      default String serviceName()
      Specified by:
      serviceName in interface ApiService
    • 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 null
      resultPerPage - the number of results per page. Defaults at 50 if set to null
      depth - the depth to search for. Defaults at 1 if set to null
      decorateWithPermissions - the boolean to decorate the folders with the effective permissions. Defaults to false if set to null
      Returns:
      a list of the folders
    • listRoot

      default List<Folder> 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 from
      page - the page of results to return. Defaults at 0
      resultPerPage - the number of results per page. Defaults at 50
      depth - 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 on
      depth - 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 folder
      depth - the depth to search for. Defaults at 1
      Returns:
      the specified folder
    • getFolder

      Folder getFolder(String folderId)
      Returns the specified folder with default depth.
      Parameters:
      folderId - the folder id
      Returns:
      the given 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, @QueryParam("depth") Integer depth)
      Returns the list of release or workflow templates for the given folder.
      Parameters:
      folderId - the id of the folder
      kind - the kind of template. Default value is release.
      page - the page of results to return. Defaults at 0
      resultPerPage - the number of results per page. Defaults at 50
      depth - the (optional) depth to search for; defaults at 1
      Returns:
      the list of templates in the folder
    • getTemplates

      default List<Release> getTemplates(String folderId, Long page, Long resultPerPage, Integer depth)
      Returns the templates for the given folder.
      Parameters:
      folderId - the id of the folder
      page - the page of results to return. Defaults at 0
      resultPerPage - the number of results per page. Defaults at 50
      depth - the (optional) depth to search for; defaults at 1
      Returns:
      the list of templates in the folder
    • getTemplates

      List<Release> getTemplates(String folderId)
      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

      @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)
      Returns the releases started from this folder.
      Parameters:
      folderId - the id of the folder
      page - the page of results to return. Defaults at 0
      resultPerPage - the number of results per page. Defaults at 50
      depth - the depth to search for
      releasesFilters - releaseFilter to filter the release search
      Returns:
      the list of releases
    • searchReleases

      List<Release> searchReleases(String folderId, ReleasesFilters releasesFilters)
      Returns the releases started from this folder with default pagination and depth.
      Parameters:
      folderId - the folder id
      releasesFilters - 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 to
      templateId - the id of the template to be moved
    • moveTemplate

      void moveTemplate(String folderId, String templateId)
      Move a template to another folder without merging permissions.
      Parameters:
      folderId - the id of the parent folder
      templateId - 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 in
      folder - 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.
      Parameters:
      folderId - the id of the folder to move
      newParentId - 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 rename
      newName - the new name of the folder
    • getPermissions

      @GET @Path("/permissions") List<String> 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

      @PUT @Path("/{folderId:.*(Folder[^/]*|Applications)}/{variableId:.*Variable[^/]*}") Variable updateVariable(@PathParam("folderId") String folderId, @PathParam("variableId") String variableId, Variable variable)
    • updateVariable

      Variable updateVariable(String folderId, Variable variable)
      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.