GoRunner docs
Search or askSearch⌘K

Get a field’s options

POST/api/pieces/{id}/actions/{actionId}/options/{propertyName}

Returns the choices of a drop-down field whose values aren’t in the app’s schema.

Needs an API token with the Read permission for workflows (workflow:read).

Parameters

Path

idRequired · string

The app’s id.

actionIdRequired · string

The action the field belongs to. Triggers use this path too.

propertyNameRequired · string

The drop-down field.

Body

Send at least {}: no body at all is a 400, except for the two fields the API answers itself.

valuesOptional · object

The step’s settings so far. Choices often depend on an earlier field.

connectionIdOptional · UUID

A connection the app may sign in with. Sending one also needs the Write permission for workflows and the Read permission for connections.

searchQueryOptional · string

Words to filter by, for fields that search on the service.

Which fields

The ones Get an action’s fields lists in dynamicFields. A trigger’s drop-down is fetched through this same actions path.

Two are answered by the API itself, whatever actionId says: the Sub-flow step’s workflow_id (the workspace’s workflows, callable ones first) and the error and finished triggers’ watch_workflow (“All workflows”, then each workflow). Others run on a worker.

disabled is true when the app can’t offer choices yet, such as before an earlier field is set. options can be null too, with a placeholder saying what is missing, such as a connection.

Responses

  • 200OK

    The choices. value goes in the step’s config; label is for people.

  • The body is missing or isn’t JSON.

  • This app has no drop-downs of this kind.

  • The token lacks the Read permission for workflows. With connectionId, it also needs the Write permission for workflows and the Read permission for connections, because the call uses that connection’s sign-in. details.permission names the one missing.

  • This workspace may not use the app.

  • No worker has this app.

  • The workspace’s workflows couldn’t be listed.

  • The worker failed or answered something unreadable.

  • No worker is checked in, so the app couldn’t be asked. Workflows are unaffected.

  • GoRunner couldn’t check which apps this workspace may use. Try again.

Any call can also answer: 401 UNAUTHORIZED · 401 TOKEN_ENDED · 403 TOKEN_SURFACE_OFF · 403 FEATURE_OFF · 403 EMBED_NOT_ALLOWED · 403 EMBED_NOT_AVAILABLE · 403 ACCOUNT_SUSPENDED · 413 PAYLOAD_TOO_LARGE · 415 INVALID_CONTENT_TYPE · 429 RATE_LIMITED · 503 BUSY · 503 PAUSED · 503 SERVICE_UNAVAILABLE. See Errors.

Request

GORUNNER="https://api.gorunner.io"
GORUNNER_TOKEN="grt_…"  # needs Read for workflows
APP_ID="subflow"
ACTION_ID="execute"
FIELD="workflow_id"

URL="$GORUNNER/api/pieces/$APP_ID/actions/"
URL="${URL}$ACTION_ID/options/$FIELD"
curl -X POST "$URL" \
  -H "Authorization: Bearer $GORUNNER_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "values": {}
  }'

Response · 200 OK

json
{
  "data": {
    "options": [
      {
        "label": "Order intake — callable",
        "value": "3b1e5c2a-7d4f-4e8b-a1c6-5f2d9b0e7a31"
      },
      {
        "label": "Nightly report (Schedule trigger) — draft, not published",
        "value": "6e9a1c3f-8b2d-4a57-9e0c-3f7b5d1a8c42"
      }
    ],
    "placeholder": "Select a workflow"
  }
}
Every field

The configuration so far, the connection to use, and an optional search term. Send at least {}: no body at all is a 400 INVALID_BODY (the two workspace pickers do not read it).

Body

valuesOptional · object

The step’s configuration so far. Options often depend on an earlier field (see the property’s refreshers).

connectionIdOptional · UUID

Connection whose credentials the app should use when it must call the third party.

searchQueryOptional · string

Server-side filter term, honoured only by apps whose property declares refreshOnSearch.

Response · 200 OK

dataobject

The legal values for a dynamic dropdown.

optionsarray of objects or null

The choices. null when the app has none to offer yet (no connection, an earlier field unset); placeholder then says what to do.

labelstring

Display text only — never store this in a step’s config.

valuestring

The value to write into the step’s config for this property.

disabledboolean

True when the app could not offer choices (for example a prerequisite field is unset).

placeholderstring

Hint text, e.g. Select a workflow.