Class CurrentUserPreferencesResource

java.lang.Object
com.atlassian.jira.rest.v2.preference.CurrentUserPreferencesResource

@Path("mypreferences") @Consumes("application/json") @Produces("application/json") public class CurrentUserPreferencesResource extends Object
Provide preferences of the currently logged in user.
Since:
v6.0
  • Constructor Details

  • Method Details

    • getPreference

      @GET public javax.ws.rs.core.Response getPreference(@QueryParam("key") String key)
      Returns preference of the currently logged in user. Preference key must be provided as input parameter (key). The value is returned exactly as it is. If key parameter is not provided or wrong - status code 404. If value is found - status code 200.
      Parameters:
      key - - key of the preference to be returned.
      Returns:
      response with value of one preference of currently logged in user.
      Since:
      v6.0
    • setPreference

      @PUT public javax.ws.rs.core.Response setPreference(@QueryParam("key") String key, String value) throws com.atlassian.core.AtlassianCoreException
      Sets preference of the currently logged in user. Preference key must be provided as input parameters (key). Value must be provided as post body. If key or value parameter is not provided - status code 404. If preference is set - status code 204.
      Parameters:
      key - - key of the preference to be set.
      value - - value of the preference to be set.
      Returns:
      empty response
      Throws:
      com.atlassian.core.AtlassianCoreException
      Since:
      v6.0
    • removePreference

      @DELETE public javax.ws.rs.core.Response removePreference(@QueryParam("key") String key) throws com.atlassian.core.AtlassianCoreException
      Removes preference of the currently logged in user. Preference key must be provided as input parameters (key). If key parameter is not provided or wrong - status code 404. If preference is unset - status code 204.
      Parameters:
      key - - key of the preference to be removed.
      Returns:
      empty response
      Throws:
      com.atlassian.core.AtlassianCoreException
      Since:
      v6.0