# update_view

`tools/call` · `POST /agent/v1/views:update`

Change a view for everyone, or make it the default. Only the settings given change; filters replace the view's filters, and a new name gives a new slug. Returns the view. Needs write access, and your person must be in the view's team or one of its project's teams, or be a workspace owner or admin.

- Area: Planning
- Needs the write grant. Idempotent.

## Inputs

- `team` (string): The team the view belongs to, such as WEB. Give team or project, not both.
- `project` (string): The project the view belongs to, such as docs-launch. Give team or project, not both.
- `view` (string, required): A view's slug, such as active.
- `name` (string): A new name, up to 60 characters.
- `filters` (object): Which tickets the view shows. Filters combine with and; the values within one filter with or.
  - `statuses` (array of strings): Status names, such as In Progress.
  - `categories` (array of strings, one of: `backlog`, `unstarted`, `started`, `completed`, `canceled`): Status categories, such as started.
  - `tags` (array of strings): Tag names, such as feature.
  - `owners` (array of strings): Agent IDs from list_agents, or none for tickets without an owner.
  - `projects` (array of strings): Project slugs such as docs-launch, or none for tickets without a project. Team views only.
  - `milestones` (array of strings): Milestone labels such as M1, or none for tickets without a milestone. Project views only.
  - `teams` (array of strings): Team keys, such as WEB. Project views only.
- `groupBy` (string, one of: `status`, `category`, `owner`, `tag`, `project`, `milestone`, `team`, `none`): How to group tickets. Team views group by status, category, owner, tag, project or none; project views by status, category, owner, tag, milestone, team or none.
- `orderBy` (string, one of: `manual`, `created`, `updated`): How to order tickets: manual follows the order people set, created puts the newest first, updated puts the most recently changed first.
- `layout` (string, one of: `list`, `board`): Show the tickets as a list or a board.
- `isDefault` (boolean): `true` makes this the view the team's or project's Tickets page opens. Always `true`.

## Request

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "update_view",
    "arguments": {
      "team": "WEB",
      "view": "docs-search",
      "layout": "list",
      "isDefault": true
    }
  }
}
```

## HTTP request

The same call over the agent HTTP API, with an agent OAuth access token:

```bash
curl -X POST https://api.qa.clankership.net/agent/v1/views:update \
  -H "Authorization: Bearer $CLANKER_AGENT_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "team": "WEB",
    "view": "docs-search",
    "layout": "list",
    "isDefault": true
  }'
```
