# REST operations

<!-- Generated by `pnpm docs:reference`. Do not edit this file; change the code it is read from. -->

SleekView serves these operations under `/wp-json`. Each is declared, with its description, in the TypeSpec source of `contracts/api/sleek-view/openapi.json`.

## AdminPage

### `AdminPage_create`

`POST /sleek-view/v1/admin-page`, requires `manage_options`.

Creates an Admin Page from the posted settings and answers it.

### `AdminPage_list`

`GET /sleek-view/v1/admin-page`, requires `manage_options`.

Lists every Admin Page, newest first, with the Views it references filled in.

### `AdminPage_read`

`GET /sleek-view/v1/admin-page/{id}`, requires `manage_options`.

One Admin Page with the Views it references filled in.

### `AdminPage_remove`

`DELETE /sleek-view/v1/admin-page/{id}`, requires `manage_options`.

Deletes an Admin Page permanently. The Views it references are kept.

### `AdminPage_update`

`PATCH /sleek-view/v1/admin-page/{id}`, requires `manage_options`.

Replaces an Admin Page's settings with the posted ones and answers the saved Admin Page.

## Data

### `Data_posts`

`GET /sleek-view/v1/data/posts`, requires `manage_options`.

Finds posts for a post picker: up to ten title matches among the given post types (separated by semicolons, any by default), with the post of the given ID first.

### `Data_query`

`POST /sleek-view/v1/data/query`, requires `edit_posts`.

Answers one page of a View layout's rows, at most 500 of them. Search,
filters, sorting and paging run on the server for every data source. A
caller without `manage_options` is held to the saved View named by
`viewId`, in the layout named by `layoutIndex` that the View's
conditions show them and with that layout's own filters, and a caller
who cannot edit posts to the published posts of a public View.

### `Data_update`

`POST /sleek-view/v1/data/update`, requires `edit_posts`.

Saves an inline edit of one field of a post, such as a post field, post meta, taxonomy terms or an ACF, Meta Box or JetEngine field.

## Feedback

### `Feedback_item`

`POST /sleek-view/v1/feedback/item`, requires `edit_posts`.

Submits a feedback item, published when the caller may publish posts of
its post type and pending review otherwise, with the submitter's upvote
counted; with `action` set to `delete` it deletes the item instead.

### `Feedback_itemUpvote`

`POST /sleek-view/v1/feedback/item/upvote`, requires `edit_posts`.

Adds the caller's upvote to a feedback item, or removes it when `action` is `remove`, and answers the new count.

### `Feedback_updateItem`

`PATCH /sleek-view/v1/feedback/item`, requires `edit_posts`.

Edits a feedback item's title, content and category.

## Kanban

### `Kanban_order`

`POST /sleek-view/v1/kanban/order`, requires `edit_posts`.

Moves a card: gives the post the target column's term in the board's
taxonomy (or no term for the uncategorized column) and saves the column's
card order, which is kept on the term.

### `Kanban_task`

`POST /sleek-view/v1/kanban/task`, requires `edit_posts`.

Creates a post as a card at the end of a column, published when the caller may publish posts of its post type and pending review otherwise; with `action` set to `delete` it deletes the card instead.

### `Kanban_updateTask`

`PATCH /sleek-view/v1/kanban/task`, requires `edit_posts`.

Edits a card's title, content and card category.

## Settings

### `Settings_read`

`GET /sleek-view/v1/settings`, requires `manage_options`.

The settings document, with the license status while the license is valid.

### `Settings_save`

`PATCH /sleek-view/v1/settings`, requires `manage_options`.

Replaces the settings document with the posted values.

## View

### `View_create`

`POST /sleek-view/v1/view`, requires `manage_options`.

Creates a View from the posted settings and answers it.

### `View_list`

`GET /sleek-view/v1/view`, requires `manage_options`.

Lists every View, newest first, with its data source, layouts and conditions.

### `View_read`

`GET /sleek-view/v1/view/{id}`, requires `manage_options`.

One View with its data source, layouts and conditions.

### `View_remove`

`DELETE /sleek-view/v1/view/{id}`, requires `manage_options`.

Deletes a View permanently.

### `View_update`

`PATCH /sleek-view/v1/view/{id}`, requires `manage_options`.

Replaces a View's settings and layouts with the posted ones and answers the saved View.

## Widget

### `Widget_read`

`GET /sleek-view/v1/widget/{id}`, requires `edit_posts`.

What a rendered View widget shows: the View, or with `mode` set to
`admin` the Admin Page, with its own, its layouts' and its switches'
conditions decided for the caller against the page facts in `context`.
