Server
Jira Data Center / Reference / REST API
GET

Get user preference by 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.

Request

Query parameters

key

string

Responses

Returns the value of one preference of currently logged in user.

application/json

string

GET/api/2/mypreferences
1 2 3 4 curl --request GET \ --url 'http://{baseurl}/rest/api/2/mypreferences' \ --user 'email@example.com:<api_token>' \ --header 'Accept: application/json'
200Response
1 "<string>"
PUT

Update user preference

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.

Request

Query parameters

key

string

Request bodyapplication/json

string

Responses

Confirmation that the preference was set.

PUT/api/2/mypreferences
1 2 3 4 curl --request PUT \ --url 'http://{baseurl}/rest/api/2/mypreferences' \ --user 'email@example.com:<api_token>' \ --header 'Content-Type: application/json'
DEL

Delete user preference

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.

Request

Query parameters

key

string

Responses

Confirmation that the preference was removed.

DEL/api/2/mypreferences
1 2 3 curl --request DELETE \ --url 'http://{baseurl}/rest/api/2/mypreferences' \ --user 'email@example.com:<api_token>'

Rate this page: