Start typing to search.

API Reference

Resolve input-widget options on a shared dashboard

View Markdown

Mirror of POST /api/dashboards/{id}/widgets/{widgetId}/options. Gated by the kill switch (503) and allow public input (403).

POST /api/public/dashboards/{token}/widgets/{widgetId}/options

Mirror of POST /api/dashboards/{id}/widgets/{widgetId}/options. Gated by the kill switch (503) and allow_public_input (403).

Operation ID: resolvePublicDashboardWidgetOptions

Authentication

No authentication is required.

Path parameters

  • tokenstring, required
  • widgetIdstring, required

Request body

application/json

  • Reference: WidgetOptionsRequest
    • Type: object
    • Description: side selects the option source: 'source' | 'target' for a field_mapping widget, or a field key for a form widget. q is server-side search, cursor is the pagination cursor (omit for the first page). value is the current draft widget value, used by dependent form option sources.
    • Properties:
      • side (string)
      • q (string)
      • cursor (string)
      • value (unknown) — Current draft value for this input widget.

Success responses

200

One page of options

Content type: application/json

  • Reference: WidgetOptionsResponse
    • Type: object
    • Properties:
      • options (array<WidgetOption>, required)
        • Items:
          • Reference: WidgetOption
            • Type: object
            • Properties:
              • label (string, required)
              • value (string, required)
              • subText (string)
      • next_cursor (string | null, required)
        • Nullable: yes

Error responses

400

Validation error

Content type: application/json

  • Reference: Error
    • Type: object
    • Properties:
      • error (string)
        • Example: NOT_FOUND
      • message (string)
        • Example: Resource not found

Example:

{
  "error": "VALIDATION_ERROR",
  "message": "Invalid input"
}

403

Public input not enabled for this dashboard

404

Resource not found

Content type: application/json

  • Reference: Error
    • Type: object
    • Properties:
      • error (string)
        • Example: NOT_FOUND
      • message (string)
        • Example: Resource not found

Example:

{
  "error": "NOT_FOUND",
  "message": "Resource not found"
}

503

Public dashboard input disabled on this server

Examples

cURL

curl --request POST \
  --url 'https://your-envoy.example.com/api/public/dashboards/YOUR_TOKEN/widgets/YOUR_WIDGET_ID/options' \
  --header 'Content-Type: application/json' \
  --data '{
  "side": "string",
  "q": "string",
  "cursor": "string",
  "value": "string"
}'

JavaScript (fetch)

const response = await fetch('https://your-envoy.example.com/api/public/dashboards/YOUR_TOKEN/widgets/YOUR_WIDGET_ID/options', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "side": "string",
    "q": "string",
    "cursor": "string",
    "value": "string"
  }),
});
 
if (!response.ok) throw new Error(`Request failed: ${response.status}`);
const data = response.status === 204 ? null : await response.json();
console.log(data);