GoRunner docs
Search or askSearch⌘K

Turn switches off for a session

POST/api/embed/v1/sessions/current/turn-off

Turns more switches off for the frame’s session. Nothing turns one back on.

Needs the frame’s session: Authorization: Bearer gri_…. The SDK calls it; you rarely do.

Embed · Self-hosted with an Embed license

Parameters

Body

turnOffOptional · array of strings

Switch IDs to turn off. Unknown ones are listed in ignored.

Responses

  • 200OK

    The session’s switches now.

  • The body isn’t JSON.

  • No session token.

  • The session ended. details.reason says why, such as access_removed, role_changed or workspace_deleted.

  • Embed isn’t licensed here, or sign-in is off (details.reason: not_licensed or sign_in_off).

  • Something failed on the installation’s side. Try again.

Any call can also answer: 413 PAYLOAD_TOO_LARGE · 415 INVALID_CONTENT_TYPE · 429 RATE_LIMITED · 503 BUSY. See Errors.

Request

GORUNNER="https://automations.example.com"
GORUNNER_SESSION="gri_…"  # the frame’s session

URL="$GORUNNER/api/embed/v1/sessions/current/"
URL="${URL}turn-off"
curl -X POST "$URL" \
  -H "Authorization: Bearer $GORUNNER_SESSION" \
  -H "Content-Type: application/json" \
  -d '{
    "turnOff": [
      "deleteRuns",
      "importExport"
    ]
  }'

Response · 200 OK, shortened

json
{
  "data": {
    "switches": {
      "deleteRuns": false,
      "importExport": false,
      "…": true
    },
    "ignored": []
  }
}
Every field

Body

turnOffOptional · array of strings

Response · 200 OK

dataobject
switchesobject

Every switch id with its effective value; a missing id is off.

{key}boolean

Each key’s value.

ignoredarray of strings