---
ai:
  exclude: true
search:
  tags:
    - filter
    - PUT
seo:
  description: >-
    Updates an existing filter, and returns its new value.… Reference for the
    PUT /api/2/filter/{id} endpoint in the Jira Software Data Center REST API
    Reference.
sidebar:
  label: Update an existing filter
  badge: PUT
title: Update an existing filter
type: openapi-operation
---
Updates an existing filter, and returns its new value. The following properties of a filter can be updated: 'jql', 'name', 'description'. Additionally, administrators can also update the 'owner' field. To get, set or unset 'favourite', use rest/api/1.0/filters/&#123;id&#125;/favourite with GET, PUT and DELETE methods instead.

`PUT /api/2/filter/{id}`

**Request body** (`application/json`)

- `description` (string)
- `editable` (boolean)
- `favourite` (boolean)
- `id` (string)
- `jql` (string)
- `name` (string)
- `owner` (UserBean)
- `searchUrl` (string<uri>)
- `self` (string<uri>)
- `sharePermissions` (FilterPermissionBean[])
- `sharedUsers` (UserBeanListWrapper)
- `viewUrl` (string<uri>)

Request body example:

```json
{
  "description": "Lists all open bugs",
  "editable": false,
  "favourite": true,
  "id": "10000",
  "jql": "type = Bug and resolution is empty",
  "name": "All Open Bugs",
  "owner": {
    "active": true,
    "applicationRoles": [
      "jira-core",
      "jira-admin",
      "important"
    ],
    "avatarUrls": {
      "48x48": "http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred",
      "24x24": "http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred",
      "16x16": "http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred",
      "32x32": "http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"
    },
    "deleted": false,
    "displayName": "Fred F. User",
    "emailAddress": "fred@example.com",
    "expand": "string",
    "groups": {
      "callback": {},
      "maxResults": 0,
      "pagingCallback": {},
      "size": 0
    },
    "key": "JIRAUSER10100",
    "lastLoginTime": "2023-08-30T16:37:01+1000",
    "locale": "en_AU",
    "name": "fred",
    "self": "http://www.example.com/jira/rest/api/2.0/user?username=fred",
    "timeZone": "Australia/Sydney"
  },
  "searchUrl": "http://www.example.com/jira/rest/api/2/search?jql=type%20%3D%20Bug%20and%20resolutino%20is%20empty",
  "self": "http://www.example.com/jira/rest/api/2/filter/10000",
  "sharePermissions": [],
  "sharedUsers": {
    "backingListSize": 0,
    "callback": {},
    "items": [],
    "maxResults": 50,
    "pagingCallback": {},
    "size": 50
  },
  "viewUrl": "http://www.example.com/jira/issues/?filter=10000"
}
```

**Responses**

- `200` — Returns the updated filter
- `400` — Returned if the input is invalid (e.g. filter name was not provided).

Response example, 200:

```json
{
  "description": "Lists all open bugs",
  "editable": false,
  "favourite": true,
  "id": "10000",
  "jql": "type = Bug and resolution is empty",
  "name": "All Open Bugs",
  "owner": {
    "active": true,
    "applicationRoles": [
      "jira-core",
      "jira-admin",
      "important"
    ],
    "avatarUrls": {
      "48x48": "http://www.example.com/jira/secure/useravatar?size=large&ownerId=fred",
      "24x24": "http://www.example.com/jira/secure/useravatar?size=small&ownerId=fred",
      "16x16": "http://www.example.com/jira/secure/useravatar?size=xsmall&ownerId=fred",
      "32x32": "http://www.example.com/jira/secure/useravatar?size=medium&ownerId=fred"
    },
    "deleted": false,
    "displayName": "Fred F. User",
    "emailAddress": "fred@example.com",
    "expand": "string",
    "groups": {
      "callback": {},
      "maxResults": 0,
      "pagingCallback": {},
      "size": 0
    },
    "key": "JIRAUSER10100",
    "lastLoginTime": "2023-08-30T16:37:01+1000",
    "locale": "en_AU",
    "name": "fred",
    "self": "http://www.example.com/jira/rest/api/2.0/user?username=fred",
    "timeZone": "Australia/Sydney"
  },
  "searchUrl": "http://www.example.com/jira/rest/api/2/search?jql=type%20%3D%20Bug%20and%20resolutino%20is%20empty",
  "self": "http://www.example.com/jira/rest/api/2/filter/10000",
  "sharePermissions": [],
  "sharedUsers": {
    "backingListSize": 0,
    "callback": {},
    "items": [],
    "maxResults": 50,
    "pagingCallback": {},
    "size": 50
  },
  "viewUrl": "http://www.example.com/jira/issues/?filter=10000"
}
```
