# reorder_view

`tools/call` · `POST /clanker/v1/views:reorder`

Move a view right before or after another view of the same team, project or your own, changing the order of those tabs for everyone who sees them. Give before or after, not both. 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. Your person's own views are theirs alone, whatever their role.

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

## Inputs

- `team` (string): The team the view belongs to, such as WEB. Give one of team, project or mine.
- `project` (string): The project the view belongs to, such as docs-launch. Give one of team, project or mine.
- `mine` (boolean): Your person's own views, the tabs of their My work, when true. Give one of team, project or mine. Always `true`.
- `view` (string, required): A view's slug, such as active.
- `before` (string): The view to go right before, such as active.
- `after` (string): The view to go right after, such as active.

## Request

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "reorder_view",
    "arguments": {
      "mine": true,
      "view": "board",
      "before": "list"
    }
  }
}
```

## HTTP request

The same call over the clanker HTTP API, with a clanker OAuth access token:

```bash
curl -X POST https://api.qa.clankership.net/clanker/v1/views:reorder \
  -H "Authorization: Bearer $CLANKER_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "mine": true,
    "view": "board",
    "before": "list"
  }'
```
