Class ComponentResource

java.lang.Object
com.atlassian.jira.rest.v2.issue.ComponentResource

@Path("component") @Consumes("application/json") @Produces("application/json") public class ComponentResource extends Object
Since:
4.2
  • Constructor Details

  • Method Details

    • getComponent

      @GET @Path("{id}") public javax.ws.rs.core.Response getComponent(@PathParam("id") String id)
      Returns a project component.
      Parameters:
      id - a String containing the component key
      Returns:
      a response containing a JSOn representation of a project component, or a 404 NOT FOUND if there is no component with the given id or the calling user does not have permission to view it.
    • createComponent

      @POST public javax.ws.rs.core.Response createComponent(ComponentBean bean)
      Create a component via POST.
    • updateComponent

      @PUT @Path("{id}") public javax.ws.rs.core.Response updateComponent(@PathParam("id") String id, ComponentBean bean)
      Modify a component via PUT. Any fields present in the PUT will override existing values. As a convenience, if a field is not present, it is silently ignored.

      If leadUserName is an empty string ("") the component lead will be removed.

    • getComponentRelatedIssues

      @GET @Path("{id}/relatedIssueCounts") public javax.ws.rs.core.Response getComponentRelatedIssues(@PathParam("id") String id)
      Returns counts of issues related to this component.
      Parameters:
      id - a String containing the component id
      Returns:
      an issue counts bean
    • delete

      @DELETE @Path("{id}") public javax.ws.rs.core.Response delete(@PathParam("id") String id, @QueryParam("moveIssuesTo") String moveIssuesTo)
      Delete a project component.
      Parameters:
      id - The component to delete.
      moveIssuesTo - The new component applied to issues whose 'id' component will be deleted. If this value is null, then the 'id' component is simply removed from the related isues.
      Returns:
      An empty or error response.
    • getPaginatedComponents

      @GET @Path("page") @Produces("application/json") @ExperimentalApi public javax.ws.rs.core.Response getPaginatedComponents(@DefaultValue("0") @QueryParam("startAt") Long startAt, @DefaultValue("100") @QueryParam("maxResults") Integer maxResults, @DefaultValue("") @QueryParam("query") String query, @QueryParam("projectIds") List<Long> projectIds)
      Returns paginated list of filtered active components
      Parameters:
      startAt - the index of the first components to return
      maxResults - the maximum number of components to return
      query - the string that components names will be matched with
      projectIds - the set of project ids to filter components
      Since:
      9.2