Get a field’s options
POST/
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 · stringThe app’s id.
actionIdRequired · stringThe action the field belongs to. Triggers use this path too.
propertyNameRequired · stringThe drop-down field.
Body
Send at least {}: no body at all is a 400, except for the two fields the API answers itself.
valuesOptional · objectThe step’s settings so far. Choices often depend on an earlier field.
connectionIdOptional · UUIDA connection the app may sign in with. Sending one also needs the Write permission for workflows and the Read permission for connections.
searchQueryOptional · stringWords 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.
valuegoes in the step’sconfig;labelis for people. - 400
INVALID_BODYThe body is missing or isn’t JSON.
This app has no drop-downs of this kind.
- 403
FORBIDDENThe 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.permissionnames the one missing. This workspace may not use the app.
- 404
NOT_FOUNDNo 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": {}
}'const GORUNNER = "https://api.gorunner.io";
const TOKEN = process.env.GORUNNER_TOKEN;
const APP_ID = process.env.APP_ID;
const ACTION_ID = process.env.ACTION_ID;
const FIELD = process.env.FIELD;
const res = await fetch(
`${GORUNNER}/api/pieces/${APP_ID}/actions/` +
`${ACTION_ID}/options/${FIELD}`,
{
method: "POST",
headers: {
Authorization: `Bearer ${TOKEN}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
values: {},
}),
},
);
const { data } = await res.json();import os, requests
GORUNNER = "https://api.gorunner.io"
TOKEN = os.environ["GORUNNER_TOKEN"]
APP_ID = os.environ["APP_ID"]
ACTION_ID = os.environ["ACTION_ID"]
FIELD = os.environ["FIELD"]
res = requests.post(
f"{GORUNNER}/api/pieces/{APP_ID}/actions/"
f"{ACTION_ID}/options/{FIELD}",
headers={"Authorization": f"Bearer {TOKEN}"},
json={
"values": {},
},
)
data = res.json()["data"]Response · 200 OK
{
"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 · objectThe step’s configuration so far. Options often depend on an earlier field (see the property’s
refreshers).connectionIdOptional · UUIDConnection whose credentials the app should use when it must call the third party.
searchQueryOptional · stringServer-side filter term, honoured only by apps whose property declares
refreshOnSearch.
Response · 200 OK
dataobjectThe legal values for a dynamic dropdown.
optionsarray of objects or nullThe choices.
nullwhen the app has none to offer yet (no connection, an earlier field unset);placeholderthen says what to do.labelstringDisplay text only — never store this in a step’s config.
valuestringThe value to write into the step’s
configfor this property.disabledbooleanTrue when the app could not offer choices (for example a prerequisite field is unset).
placeholderstringHint text, e.g.
Select a workflow.