Update a filter

Add MCP server to your AI tool

Allow AI tools and LLMs to interact with the API documentation portal through MCP.

MCP server URL

https://api-docs.kitsu.cloud/mcp

Standard setup for AI tools providing an mcp.json file

mcp.json
{
  "Kitsu API MCP server": {
    "url": "https://api-docs.kitsu.cloud/mcp"
  }
}

Close
PUT /data/user/filters/{filter_id}

Update a filter. The filter must be yours. An administrator can update the filters of all the users. The filter stays in its project. A project_id in the body is ignored. A null department_id removes the department. A new name must be free among the filters of the owner with the same list_type, entity_type, project_id, and search_filter_group_id. To set is_shared to true, the filter must have a project, and you must be a manager of this project or an administrator. Otherwise is_shared is set to false. A change of department on a filter that stays shared needs the same role. Otherwise it is ignored. If the filter is in a group, is_shared must keep the value of the group. A new group must be in the project of the filter. The filter takes the department of its new group, unless the group has none or the body changes department_id. A null search_filter_group_id takes the filter out of its group.

Path parameters

  • filter_id string(uuid) Required

    Unique identifier of the filter

application/json

Body Required

  • name string

    Filter name

    Minimum length is 1, maximum length is 200.

  • search_query string

    Updated filter query

    Minimum length is 1, maximum length is 500.

  • search_filter_group_id string(uuid) | null

    Filter group identifier

  • is_shared boolean

    Whether to share this filter

  • department_id string(uuid) | null

    Department identifier

Responses

  • 200 application/json

    The updated filter

    Hide response attributes Show response attributes object
    • id string(uuid)

      Filter unique identifier

    • name string

      Filter name

    • query string

      Filter query JSON

    • list_type string

      List type

    • entity_type string

      Entity type

    • project_id string(uuid)

      Project identifier

    • is_shared boolean

      Whether filter is shared

    • created_at string(date-time)

      Creation timestamp

    • updated_at string(date-time)

      Last update timestamp

  • 400

    The body is not valid, the name is already used in this list, the new filter group is in another project, or is_shared differs from the value of the filter group

  • 403

    You use a bot token

  • 404

    You have no filter with this identifier, or the filter group or the department does not exist

PUT /data/user/filters/{filter_id}
curl -X PUT "http://api.example.com/data/user/filters/a24a6ea4-ce75-4665-a070-57453082c25" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Accept: application/json" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Updated Filter Name",
  "search_query": "{\"status\": \"active\"}",
  "search_filter_group_id": "b35b7fb5-df86-5776-b181-68564193d36",
  "is_shared": true,
  "department_id": "d57d9hd7-fh08-7998-d403-80786315f58"
}'
import requests

url = "http://api.example.com/data/user/filters/a24a6ea4-ce75-4665-a070-57453082c25"
headers = {
    "Authorization": "Bearer YOUR_API_TOKEN",
    "Accept": "application/json",
    "Content-Type": "application/json"
}
params = {}
payload = {
    "name": "Updated Filter Name",
    "search_query": "{\"status\": \"active\"}",
    "search_filter_group_id": "b35b7fb5-df86-5776-b181-68564193d36",
    "is_shared": true,
    "department_id": "d57d9hd7-fh08-7998-d403-80786315f58"
}

response = requests.put(
    url,
    headers=headers,
    params=params,
    json=payload
)

response.raise_for_status()

if response.content:
    print(response.json())
Request examples
{
  "name": "Updated Filter Name",
  "search_query": "{\"status\": \"active\"}",
  "search_filter_group_id": "b35b7fb5-df86-5776-b181-68564193d360",
  "is_shared": true,
  "department_id": "d57d91d7-f108-7998-d403-80786315f580"
}
Response examples (200)
{
  "id": "e68e02e8-0219-8009-e514-918974260690",
  "name": "Updated Filter Name",
  "query": "{\"status\": \"active\"}",
  "list_type": "todo",
  "entity_type": "Asset",
  "project_id": "f79f13f9-1320-9010-f625-a09008537180",
  "is_shared": true,
  "created_at": "2023-01-01T12:00:00Z",
  "updated_at": "2023-01-01T12:30:00Z"
}