Class UserPropertyResource

java.lang.Object
com.atlassian.jira.rest.v2.user.UserPropertyResource

@Path("user/properties") @Consumes("application/json") @Produces("application/json") public class UserPropertyResource extends Object
Since:
v7.0
  • Constructor Details

  • Method Details

    • getPropertiesKeys

      @GET public jakarta.ws.rs.core.Response getPropertiesKeys(@QueryParam("userKey") String userKey, @QueryParam("username") String username)
      Returns the keys of all properties for the user identified by the key or by the id.
      Parameters:
      userKey - key of the user whose properties are to be returned
      username - username of the user whose properties are to be returned
      Returns:
      a response containing EntityPropertiesKeysBean.
    • setProperty

      @PUT @Path("/{propertyKey}") public jakarta.ws.rs.core.Response setProperty(@QueryParam("userKey") String userKey, @QueryParam("username") String username, @PathParam("propertyKey") String propertyKey, @Context jakarta.servlet.http.HttpServletRequest request)
      Sets the value of the specified user's property.
      Parameters:
      userKey - key of the user whose property is to be set
      username - username of the user whose property is to be set
      propertyKey - the key of the user's property. The maximum length of the key is 255 bytes.
      request - the request containing value of the user's property. The value has to be a valid, non-empty JSON conforming to http://tools.ietf.org/html/rfc4627. The maximum length of the property value is 32768 bytes.
    • getProperty

      @GET @Path("/{propertyKey}") public jakarta.ws.rs.core.Response getProperty(@QueryParam("userKey") String userKey, @QueryParam("username") String username, @PathParam("propertyKey") String propertyKey)
      Returns the value of the property with a given key from the user identified by the key or by the id. The user who retrieves the property is required to have permissions to read the user.
      Parameters:
      userKey - key of the user whose property is to be returned
      username - username of the user whose property is to be returned
      Returns:
      a response containing EntityPropertyBean.
    • deleteProperty

      @DELETE @Path("/{propertyKey}") public jakarta.ws.rs.core.Response deleteProperty(@QueryParam("userKey") String userKey, @QueryParam("username") String username, @PathParam("propertyKey") String propertyKey)
      Removes the property from the user identified by the key or by the id. Ths user removing the property is required to have permissions to administer the user.
      Parameters:
      userKey - key of the user whose property is to be removed
      username - username of the user whose property is to be removed
      Returns:
      a 204 HTTP status if everything goes well.