---
title: "Proposals"
description: "The proposals endpoints of the HTTP API."
---

> Documentation Index
> Fetch the complete documentation index at: https://slashobserve.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Proposals

## GET /dashboards/{id}/proposals

List the proposals on a dashboard, newest first.

Needs View on the dashboard. A proposal is a change to a dashboard saved by someone who may comment but not edit, or by a connection in propose mode, for a person who can edit to merge or discard. The list holds the open proposals unless `state` says otherwise.

### Parameters

| Name | In | Type | Description |
| --- | --- | --- | --- |
| `id` (required) | path | `string` (uuid) |   |
| `state` | query | `"open"`, `"merged"`, `"discarded"`, `"all"` | Default `"open"`. |
| `run_id` | query | `string` (uuid) | Only the proposal that the agent request with this id opened, which is how a run finds its proposal however many others the dashboard has; a value that is not a UUID is 400. |
| `limit` | query | `integer` | Between 1 and 100. Default `50`. |
| `cursor` | query | `string` |   |

### Responses

| Status | Description | Body |
| --- | --- | --- |
| `200` | One page of proposals without their documents. | [`ProposalList`](/docs/reference/api/schemas/#proposallist) |
| `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) |
| `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) |
| `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) |
| `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) |
| `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) |

## GET /proposals/{id}

Get one proposal with its head revision's document, what it changes and what stops a merge.

Needs View on the dashboard; a proposal on a dashboard the caller cannot see answers 404. `changes` compares the head revision with `base_version`. `conflicts` lists, while the proposal is open and behind, the units that the proposal and the newer versions both changed.

### Parameters

| Name | In | Type | Description |
| --- | --- | --- | --- |
| `id` (required) | path | `string` (uuid) |   |

### Responses

| Status | Description | Body |
| --- | --- | --- |
| `200` | The proposal. | [`Proposal`](/docs/reference/api/schemas/#proposal) |
| `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) |
| `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) |
| `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) |
| `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) |

## POST /proposals/{id}/merge

Save a proposal's head revision as the next version of its dashboard and close it as merged.

Needs Edit on the dashboard and a connection that is not in propose mode. The save runs the same checks as any other save, on top of the dashboard's latest version: a document that does not parse or whose queries fail answers 422. When the dashboard has changed the same panels, variables or settings since the proposal's base, the answer is 409 `version_conflict` with `conflicts`, and the same request with a `choices` entry for each of them succeeds. A merge whose result equals the latest version saves nothing and closes the proposal with `merged_version` null.

### Parameters

| Name | In | Type | Description |
| --- | --- | --- | --- |
| `id` (required) | path | `string` (uuid) |   |

### Request body

`application/json`, required.

A [`MergeProposalRequest`](/docs/reference/api/schemas/#mergeproposalrequest) object.

### Responses

| Status | Description | Body |
| --- | --- | --- |
| `200` | The merged proposal. | [`ProposalSummary`](/docs/reference/api/schemas/#proposalsummary) |
| `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) |
| `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) |
| `403` | The caller may not merge: `forbidden_role` for a role or folder level that is too low, or `propose_mode` for a connected agent in propose mode that tried to merge. | [`Error`](/docs/reference/api/schemas/#error) |
| `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) |
| `409` | The dashboard has newer versions that changed the same panels, variables or settings (`version_conflict`, with `conflicts`), the proposal has a newer revision than the one named (`proposal_changed`), or the proposal is no longer open (`invalid_transition`). Or the content reads a datasource only Admins can query and the folder is not one only Admins can read (`restricted_content`, naming the `datasource`). Or the dashboard is a starter the server keeps current with each release (`provisioned`), which a proposal cannot change. | [`VersionConflict`](/docs/reference/api/schemas/#versionconflict) or [`ProposalChanged`](/docs/reference/api/schemas/#proposalchanged) or [`InvalidTransition`](/docs/reference/api/schemas/#invalidtransition) or [`RestrictedContentError`](/docs/reference/api/schemas/#restrictedcontenterror) |
| `413` | The request body exceeds the size limit. | [`Error`](/docs/reference/api/schemas/#error) |
| `422` | The Spec fails validation or one of its queries fails; every problem is listed in `issues`. | [`ValidationError`](/docs/reference/api/schemas/#validationerror) |
| `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) |

## POST /proposals/{id}/discard

Close a proposal without saving it.

The author of the proposal, or anyone who may merge it, may discard it. The body is empty or an object with an optional `reason`, trimmed and at most 500 characters (400 `invalid_request` beyond that), which the proposal then shows as `close_reason`; the activity event does not carry it.

### Parameters

| Name | In | Type | Description |
| --- | --- | --- | --- |
| `id` (required) | path | `string` (uuid) |   |

### Request body

`application/json`.

| Field | Type | Description |
| --- | --- | --- |
| `reason` | `string` | Why the proposal is discarded. |

### Responses

| Status | Description | Body |
| --- | --- | --- |
| `200` | The discarded proposal. | [`ProposalSummary`](/docs/reference/api/schemas/#proposalsummary) |
| `400` | The request is malformed or fails validation. | [`Error`](/docs/reference/api/schemas/#error) |
| `401` | Authentication is missing or invalid. | [`Error`](/docs/reference/api/schemas/#error) |
| `403` | The caller is not allowed to perform the request; a role that is too low is code `forbidden_role`. | [`Error`](/docs/reference/api/schemas/#error) |
| `404` | The resource does not exist, or the caller cannot see it; the two are never told apart. | [`Error`](/docs/reference/api/schemas/#error) |
| `409` | The proposal is no longer open (`invalid_transition`, with its `state` and `allowed_actions`), or the dashboard changed under a discard (`proposal_changed`). | [`ProposalChanged`](/docs/reference/api/schemas/#proposalchanged) or [`InvalidTransition`](/docs/reference/api/schemas/#invalidtransition) |
| `500` | The server failed to handle the request. | [`Error`](/docs/reference/api/schemas/#error) |

Generated from [`api/openapi.yaml`](https://github.com/slashobserve/slashobserve/blob/c770e5e0/api/openapi.yaml) at `c770e5e0`. [Report a problem](https://github.com/slashobserve/slashobserve/issues/new).
