ShotGrid REST API v5 and v6 concurrent requests during application migration
0 reputation · 12 Jun 2024, 06:07 UTC
0 reputation · 12 Jun 2024, 06:07 UTC
A small application needs to move from ShotGrid REST API v5 to v6 without an outage. The migration plan relies on the documented ability to address different major versions in the same environment and on OAuth2 token refresh to keep authentication active while the client configuration changes.
The integration boundary is between the ShotGrid REST API versioning surface and the application’s client configuration and token management. The platform publishes a deprecation window for older major versions after a new major version release, and version selection is described as possible via URL path and an X-Api-Version header. OAuth2 refresh tokens can be used to obtain new access tokens while requests continue. There is no built-in cut-over feature, so the switch of endpoint or version must be orchestrated by the client.
Uncertainty remains about production use of concurrent versions and the operational decisions required for a zero-downtime change. Rate limits are described as applied per API version, and data consistency between a local cache and ShotGrid during a version switch is not guaranteed.
Is concurrent use of v5 and v6 via the X-Api-Version header supported for production traffic during a migration window? What decision criteria should govern the timing of a client configuration switch given that deprecation timelines may shift? How are rate limits accounted for when the same application issues requests to both versions?
30275 reputation · 12 Jun 2024, 16:38 UTC
Addressing v5 and v6 concurrently from one client is a documented property of the versioning surface — via URL path or the X-Api-Version header. Whether that dual-version traffic is supported for production is a separate question from whether it is technically possible, and it is the one you should not assume. Treat concurrent production traffic as technically feasible but contractually unverified until Autodesk confirms it for your account and plan.
Two models are plausible:
Do not size the migration on either model until you measure. During the window, budget as if the shared model is true — it is the conservative case — and keep retry with backoff and jitter in place. Honor Retry-After when present.
# Same token against both versions (illustrative; confirm current endpoints)
curl -sS -o /dev/null -w '%{http_code}\n' \
-H "Authorization: Bearer $TOKEN" \
-H "X-Api-Version: v5" \
"$BASE/v5/entity/human_user/1"
curl -sS -o /dev/null -w '%{http_code}\n' \
-H "Authorization: Bearer $TOKEN" \
-H "X-Api-Version: v6" \
"$BASE/v6/entity/human_user/1"Then run a controlled burst against both and count 429s and any rate-limit headers to infer bucket scope. Compare payloads for one entity to find breaking changes.
Can your client choose the version per request, or only per process or base URL? If it is per request, you can canary inside one deployment and the plan above applies directly. If it is per process, you need two deployments behind a router or flag, and the rollback and observability gates become the binding constraints.
Use comments to ask for clarification. Post a solution as an answer.
30,275 reputation · 12 Jun 2024, 14:24 UTC
ShotGrid enforces a single 30 req/s / 1 200 req/min quota per user that applies to both /api/v5 and /api/v6. Parallel traffic to either endpoint is throttled together, so a burst of 50 simultaneous GETs can trigger 429 Too Many Requests.
Run a short script that issues 50 concurrent GETs to /api/v5/projects and 50 to /api/v6/projects while counting 429 responses. The failure ratio reveals the safe concurrency ceiling for your environment.
OAuth2 access tokens issued for v5 work unchanged against v6, so you can keep a single credential set during the migration. Remember that v5 uses page numbers (page=1, pageSize=100) while v6 uses cursor pagination (cursor=…); concurrent cursor requests must preserve order to avoid gaps or duplicates.