See which workflows use each connection
GET/
Lists, for each connection, the workflows that use it.
Needs an API token with the Read permission for connections (connection:read).
Request
It takes no parameters.
Before you delete or replace
Each workflow is listed once, however many steps use the connection. inLive: the published version uses it, so production does. inDraft: the draft does. Triggers, branches, loops and error steps all count.
Then move those workflows before you delete it.
Responses
- 200OK
Workflows by connection ID. A connection no workflow uses is left out, not listed empty. A key can name a connection that is gone, while a workflow still names it.
- 403
FORBIDDENThe token lacks the Read permission for connections.
The use couldn’t be worked out. 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 Read for connections
curl "$GORUNNER/api/connections/usage" \
-H "Authorization: Bearer $GORUNNER_TOKEN"const GORUNNER = "https://api.gorunner.io";
const TOKEN = process.env.GORUNNER_TOKEN;
const res = await fetch(
`${GORUNNER}/api/connections/usage`,
{
headers: { Authorization: `Bearer ${TOKEN}` },
},
);
const { data } = await res.json();import os, requests
GORUNNER = "https://api.gorunner.io"
TOKEN = os.environ["GORUNNER_TOKEN"]
res = requests.get(
f"{GORUNNER}/api/connections/usage",
headers={"Authorization": f"Bearer {TOKEN}"},
)
data = res.json()["data"]Response · 200 OK
{
"data": {
"0f8b2c7e-4a51-4d3e-9b2a-6c1d2e3f4a5b": [
{
"id": "3b1e5c2a-7d4f-4e8b-a1c6-5f2d9b0e7a31",
"name": "Order intake",
"status": "active",
"inLive": true,
"inDraft": true
}
]
}
}Every field
It takes no body.
Response · 200 OK
dataobjectReverse index: connection id → the workflows referencing it. A connection with no usage is ABSENT from the map rather than mapped to an empty array; treat a missing key as zero usage.
{key}array of objectsEach key’s value.
idUUIDThe referencing workflow’s id.
namestringThe referencing workflow’s name.
statusstringThe referencing workflow’s state.
activeis live, but onlyinLivesays its production runs use the connection: a live workflow whose draft alone names it does not use it yet.One of
draft,active,paused.inLivebooleanThe workflow’s published version (what production runs) names the connection. False for a workflow never published.
inDraftbooleanThe workflow’s draft names the connection.