Get a trigger’s fields
GET/
Returns one trigger’s fields, narrowed to the ones that apply for the values you pass.
Needs any API token. No permission is checked.
Parameters
Path
idRequired · stringThe app’s id, as the trigger’s
pieceIdholds it.triggerIdRequired · stringThe trigger’s id: in a definition, the trigger’s
actionId. A wrong one answers 404 naming the app’s triggers.
Query
viewOptional · stringReserved. It narrows nothing.
versionOptional · stringReserved. It does nothing here: a trigger is answered at the default version.
gateValuesOptional · objectNot sent as such: send any field of the trigger by its own name, such as
frequency=every_day.
Like an action, with two differences
It narrows as Get an action’s fields does. sideEffects is always empty, and the trigger’s type is on the app, not here.
sampleData is the trigger’s stated example. For a form, a schedule or a callable trigger the real data depends on its settings: get the sample for those.
Responses
- 200OK
The trigger, narrowed.
- 403
FORBIDDENThe token may not do this.
- 404
NOT_FOUNDNo such app, or the app has no such trigger: the message names the ones it has. An app this workspace may not use answers 404 too.
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 · 429 RATE_LIMITED · 503 BUSY · 503 PAUSED · 503 SERVICE_UNAVAILABLE. See Errors.
Request
GORUNNER="https://api.gorunner.io"
GORUNNER_TOKEN="grt_…" # needs any API token
APP_ID="schedule"
TRIGGER_ID="schedule"
URL="$GORUNNER/api/pieces/$APP_ID/triggers/"
URL="${URL}$TRIGGER_ID?frequency=every_day"
curl "$URL" \
-H "Authorization: Bearer $GORUNNER_TOKEN"const GORUNNER = "https://api.gorunner.io";
const TOKEN = process.env.GORUNNER_TOKEN;
const APP_ID = process.env.APP_ID;
const TRIGGER_ID = process.env.TRIGGER_ID;
const res = await fetch(
`${GORUNNER}/api/pieces/${APP_ID}/triggers/` +
`${TRIGGER_ID}?frequency=every_day`,
{
headers: { Authorization: `Bearer ${TOKEN}` },
},
);
const { data } = await res.json();import os, requests
GORUNNER = "https://api.gorunner.io"
TOKEN = os.environ["GORUNNER_TOKEN"]
APP_ID = os.environ["APP_ID"]
TRIGGER_ID = os.environ["TRIGGER_ID"]
res = requests.get(
f"{GORUNNER}/api/pieces/{APP_ID}/triggers/"
f"{TRIGGER_ID}",
params={"frequency": "every_day"},
headers={"Authorization": f"Bearer {TOKEN}"},
)
data = res.json()["data"]Response · 200 OK, shortened
{
"data": {
"pieceId": "schedule",
"pieceVersion": "1.0.0",
"id": "schedule",
"name": "Schedule",
"inputSchema": {
"type": "object",
"properties": {
"frequency": {
"type": "string"
},
"hour_of_the_day": {
"type": "string"
},
"run_on_weekends": {
"type": "boolean"
},
"timezone": {
"type": "string"
}
}
},
"sampleData": {},
"filteredBy": {
"frequency": "every_day"
}
}
}Every field
It takes no body.
Response · 200 OK
dataobjectOne action or trigger with its schema, narrowed to the fields that apply given the gate values supplied in the query string.
pieceIdstringpieceVersionstringThe app’s default version — what a new step referencing this operation will be pinned to.
idstringThe operation id: a step’s
actionId, or a trigger’sactionId.namestringdescriptionstringsideEffectsstringActions only; always empty on the trigger endpoint.
One of
pure,reads_external,writes_external.inputSchemaobjectA schema as the projections serve it: presentation fields removed, properties possibly narrowed.
typestringpropertiesobject{key}objectOne property as the projections serve it: everything that constrains a legal value, nothing about screen layout (
title,order,placeholderandgroupare dropped — 11.8% of the payload). Recursive throughpropertiesanditems.Each key’s value.
typestringdescriptionstringThe field’s whole help for whoever writes it: the step panel’s text, then the notes for an agent (
agentNotesin the full schema).defaultDefault value, of any JSON type.
enumarray of stringsClosed set of legal values.
enumLabelsobjectDisplay labels; omitted entirely when they are identical to the enum values.
{key}stringEach key’s value.
formatstringpropertiesobject{key}objectOne property as the projections serve it: everything that constrains a legal value, nothing about screen layout (
title,order,placeholderandgroupare dropped — 11.8% of the payload). Recursive throughpropertiesanditems.The same fields as
data.inputSchema.properties.{key}above.itemsobjectOne property as the projections serve it: everything that constrains a legal value, nothing about screen layout (
title,order,placeholderandgroupare dropped — 11.8% of the payload). Recursive throughpropertiesanditems.The same fields as
data.inputSchema.properties.{key}above.propertyTypestringHow the value is chosen. DROPDOWN / MULTI_SELECT / DYNAMIC mean the options come from the app at run time — see
dynamicFields.requiredbooleanThe per-property requiredness flag. The schema-level
requiredarray is authoritative for the narrowed view.minLengthintegermaxLengthintegerminnumbermaxnumberpatternstringrefreshersarray of stringslanguagestringdisplayConditionsarray of objectsKept deliberately: a field marked conditional must show WHAT would decide it.
fieldstringThe sibling property whose value decides this one. Every gate field is itself a property of the same schema, so its declared type and enum are the legal values.
operatorstringAn unrecognized operator is treated permissively (the property is kept).
One of
eq,neq,in,notIn,contains_any,exists,notExists.valueComparison value for eq/neq, of any scalar JSON type.
valuesarrayCandidate list for in / notIn / contains_any.
boundbooleanThe value, though typed as text, points into the connected account (a spreadsheet, a calendar, a folder, a label): it means nothing to another account, so a template used outside the workspace it was saved in arrives with it blank. Absent when false.
noExpressionsbooleanTrue when
{{ }}is NOT replaced in this field: the value is used exactly as written (Code 2.0.0’scode, where values come frominputs,stepsandtriggerinstead). Never write an expression into such a field.requiredarray of stringsAlways present (possibly empty). Excludes every field listed in
conditionalFields.outputSchemaobjectA schema as the projections serve it: presentation fields removed, properties possibly narrowed.
The same fields as
data.inputSchemaabove.sampleDataobjectDeclared example output (for a trigger, the declared
{{trigger.*}}shape).filteredByobjectThe gate values that were ACTUALLY applied — the raw query intersected with the fields this operation is really gated on. If a parameter you sent is missing here, it narrowed nothing. Absent when nothing narrowed.
{key}stringEach key’s value.
ignoredarray of stringsQuery keys that gate nothing on this operation — a misspelling (
bodyTypeforbody_type), or a gate belonging to a different operation. Fix these rather than believing the filter worked. Absent when empty.unresolvedarray of stringsGate fields the SURVIVING properties still depend on and which you did not supply. Adding these as query parameters narrows the schema further.
conditionalFieldsarray of stringsFields kept ONLY because their gate was left undecided. They are deliberately excluded from
requiredeven when the app declares them required — supply their gate to find out whether they really apply.dynamicFieldsarray of stringsProperties whose legal values are not in this schema. Fetch them from POST /api/pieces/{id}/actions/{actionId}/options/{propertyName}.