Upstash
Connect
Connect Upstash from the terminal. Pass --help for the flags Upstash accepts, plus --no-browser for headless environments.
polylane cloud connect --provider upstashThe email of your Upstash account and a Developer API key from the Upstash Console.
Upstash connects with your account email and a Developer API key:
- Open the Upstash Console, go to Account → Management API, and choose Create API Key.
- Copy the key.
- In Polylane, enter the email you sign in to Upstash with and paste the key.
- Polylane checks the key and starts syncing.
Each connection covers one Upstash account. Polylane maps its Redis databases, Vector indexes, Search indexes, and QStash regions with their schedules, queues, and URL groups. Services elsewhere in your stack that connect to an Upstash endpoint, for example through UPSTASH_REDIS_REST_URL, are linked to that database or index on the topology. QStash schedules are linked to the services they call. Polylane only reads from Upstash.
Polylane charts the latency, throughput, connections, and keys of each Redis database, and the query and update traffic of each index. Monitoring watches Redis latency and traffic, Redis storage against the plan limit, and growth of the QStash dead-letter queue.
A key reads the resources of the account that owns it. To connect the resources of an Upstash team, create a key while that team is selected and connect it as a separate account.
Polylane only reads from Upstash. The API key reaches the Upstash Developer API; Polylane gets the read-only tokens of each database, index, and QStash region from it when a read needs them, and does not store them.
| Reader | What it reads |
|---|---|
| Sync | Redis databases, Vector and Search indexes, QStash regions, schedules, queues, and URL groups, and their usage stats. Credentials in these responses are removed before anything is stored. |
upstashApi | GET requests to the Upstash Developer API, such as database stats and audit logs. Credentials in the response are removed. |
upstashRedisCommand | One read command on a Redis database with its read-only token, such as DBSIZE, SCAN, TTL, or MEMORY USAGE. Upstash refuses every write to this token. |
upstashQStashApi | GET requests to QStash with the region's read-only token: schedules, queues, URL groups, the dead-letter queue, logs, and flow control. Signing keys are refused. |
upstashVectorIndex | Info, namespaces, stored vector ids and metadata, and nearest-neighbor queries on a Vector index, with its read-only token. |
upstashSearchIndex | Info, index names, stored document ids, and search queries on a Search database, with its read-only token. A search counts against your query quota. |
upstashQStashLogs | QStash delivery logs: each state change of each message, with the destination's response status and error. Message headers and bodies are left out. |
upstashQStashDeadLetters | Messages in the QStash dead-letter queue. Credential headers are removed. |
upstashQStashResources | QStash schedules, queues, URL groups, and flow-control keys. Forwarded headers and bodies are left out. |
upstashWorkflowRuns | Upstash Workflow runs, their steps, and failed runs. Credential headers are removed. |
Disconnecting leaves the API key in Upstash. Delete it under Account → Management API in the Upstash Console.
Troubleshooting
"Upstash does not recognize this email and API key" error
- Use the email you sign in to Upstash with.
- Check that the key was copied in full and was not deleted under Account → Management API.
Missing resources
- Upstash can take a few minutes to sync everything.
- Trigger a manual Sync from the account header to refresh.
Disconnecting
Disconnect the account in Polylane, then delete the API key under Account → Management API in the Upstash Console.
Connect Upstash from a CI job or any other environment without a browser.
Connecting Upstash needs no browser: the same endpoint the console calls fits in a CI job. One authenticated POST creates the connection and starts the first sync.
Prerequisites
- A Polylane API key with the
cloud_accounts:writeandcloud_accounts:readscopes. See API keys and OAuth. - Your workspace ID, which starts with
ws_. Read it fromGET /v1/workspaceswith the same key. - The email of your Upstash account and a Developer API key, created under Account → Management API in the Upstash Console.
Create the connection
curl -X POST https://api.polylane.com/v1/cloud_accounts \
-H "x-api-key: $POLYLANE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"provider": "upstash",
"workspaceId": "ws_0abc123",
"email": "you@example.com",
"token": "<upstash-api-key>"
}'
One call connects one Upstash account.
The response lists what was connected, with the first sync already running. Trimmed to the two fields the rest of the flow reads:
{
"success": true,
"result": {
"provider": "upstash",
"accounts": [{ "id": "acc_34gky74ibc92h8t2efn8csrh", "status": "syncing" }],
"failures": []
}
}
An account that is already connected lands in failures instead of accounts, so repeating the call never duplicates a connection.
Wait for the first sync
Poll each returned account by its id until status reaches ready (new on registration, syncing while resources stream in):
until [ "$(curl -s "https://api.polylane.com/v1/cloud_accounts/$WORKSPACE_ID/$ACCOUNT_ID" \
-H "x-api-key: $POLYLANE_API_KEY" | jq -r '.result.status')" = "ready" ]; do
sleep 15
done
Give the loop a deadline so a failed connect fails the job instead of hanging it. Once the account is ready, its resources are in the topology and Polylane has started its first check.
Disconnect from the API
Deleting the connection stops every sync and check and deletes the credentials Polylane held. The call needs the cloud_accounts:delete scope:
curl -X DELETE "https://api.polylane.com/v1/cloud_accounts/$WORKSPACE_ID/$ACCOUNT_ID" \
-H "x-api-key: $POLYLANE_API_KEY"
Then delete the Upstash API key on the provider side, as described under Disconnect below.
Disconnect
Disconnecting stops every sync and check and deletes the credentials Polylane held. Polylane removes what Upstash's API lets it remove. The following stays until you remove it yourself:
- Upstash Developer API key
polylane cloud disconnect <id>Tools
9Operations agents can perform in threads.
Supported resources
7Resource types that show up in your infrastructure graph.