Class ProjectRoleResource

java.lang.Object
com.atlassian.jira.rest.v2.issue.project.ProjectRoleResource

@Path("project/{projectIdOrKey}/role") @Consumes("application/json") @Produces("application/json") public class ProjectRoleResource extends Object
Since:
v4.4
  • Constructor Details

  • Method Details

    • getProjectRoles

      @GET public javax.ws.rs.core.Response getProjectRoles(@PathParam("projectIdOrKey") String projectIdOrKey)
      Returns all roles in the given project Id or key, with links to full details on each role.
      Parameters:
      projectIdOrKey - the project id or project key
      Returns:
      list of roles and URIs to full details
    • getProjectRole

      @GET @Path("{id}") public javax.ws.rs.core.Response getProjectRole(@PathParam("projectIdOrKey") String projectIdOrKey, @PathParam("id") Long id)
      Returns the details for a given project role in a project.
      Parameters:
      projectIdOrKey - the project id or project key
      id - the project role id
      Returns:
      full details on the role and its actors. Actors are sorted by their display name.
    • setActors

      @PUT @Path("{id}") public javax.ws.rs.core.Response setActors(@PathParam("projectIdOrKey") String projectIdOrKey, @PathParam("id") Long id, ProjectRoleActorsUpdateBean actors)
      Updates a project role to include the specified actors (users or groups). Can be also used to clear roles to not include any users or groups.

      For user actors, their usernames should be used.

      Parameters:
      projectIdOrKey - the project id or project key
      id - the project role id
      actors - the actors to set for the role
      Returns:
      full details on the role and its actors after modification
    • addActorUsers

      @POST @Path("{id}") public javax.ws.rs.core.Response addActorUsers(@PathParam("projectIdOrKey") String projectIdOrKey, @PathParam("id") Long id, ProjectRoleResource.ActorsMap actors)
      Adds an actor (user or group) to a project role.

      For user actors, their usernames should be used.

      Parameters:
      projectIdOrKey - the project id or project key
      id - the project role id
      actors - the actors to add to the role
      Returns:
      full details on the role and its actors after modification
    • deleteActor

      @DELETE @Path("{id}") public javax.ws.rs.core.Response deleteActor(@PathParam("projectIdOrKey") String projectIdOrKey, @PathParam("id") Long id, @QueryParam("user") String username, @QueryParam("group") String groupname)
      Deletes actors (users or groups) from a project role.
      Parameters:
      projectIdOrKey - the project id or project key
      id - the project role id
      username - the username of the user to remove from the project role
      groupname - the groupname to remove from the project role
      Returns:
      no content on success