GoRunner docs
Search or askSearch⌘K

Move workflows to another connection

POST/api/connections/{id}/replace

Moves every workflow from this connection to another of the same app.

Needs an API token with the Write permission for connections (connection:write).

Parameters

Path

idRequired · UUID

The connection to move workflows away from.

Body

targetIdRequired · UUID

The connection to move them to: another one, of the same app, in this workspace.

workflowIdsOptional · array of UUIDs

Only these workflows, up to 500. Moving the answer’s workflowIds back undoes it exactly.

What moves

Every reference in each workflow’s draft and its stored versions: triggers, steps, branches, loops and error steps. alsoOnTarget names workflows that already used the target too; moving them back moves those steps as well.

Neither connection is deleted. Sending it again finds nothing left and answers 0, so it needs no Idempotency-Key. Then delete the old one if you like.

Responses

  • 200OK

    How many workflows moved, and which. 0 is fine: nothing used it.

  • An ID isn’t a UUID, the body isn’t JSON, the two are the same connection, or they are for different apps.

  • The token lacks the Write permission for connections.

  • The connection or the target isn’t in this workspace.

  • Nothing moved. 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 Write for connections
CONNECTION_ID="your-connection-id"

URL="$GORUNNER/api/connections/$CONNECTION_ID/"
URL="${URL}replace"
curl -X POST "$URL" \
  -H "Authorization: Bearer $GORUNNER_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "targetId": "8c7d6e5f-4a3b-2c1d-0e9f-8a7b6c5d4e3f"
  }'

Response · 200 OK

json
{
  "data": {
    "updated": 3,
    "workflowIds": [
      "3b1e5c2a-7d4f-4e8b-a1c6-5f2d9b0e7a31",
      "6e9a1c3f-8b2d-4a57-9e0c-3f7b5d1a8c42",
      "…"
    ],
    "alsoOnTarget": []
  }
}
Every field

Body

targetIdRequired · UUID

The connection to repoint references to. Must exist in the same workspace, must differ from the path id, and must have the SAME pieceId as the source.

workflowIdsOptional · array of UUIDs

Move only these workflows (their drafts and every version). The answer’s workflowIds moved back the other way is an exact Undo.

Response · 200 OK

dataobject
updatedinteger

How many workflows were moved (drafts and every stored version, counted once per workflow).

workflowIdsarray of UUIDs

The workflows moved.

alsoOnTargetarray of UUIDs

Moved workflows that already named the target before: moving them back moves those steps too.