feat: Rename legacy act-* API operationIds to actor-* for consistency#2646
feat: Rename legacy act-* API operationIds to actor-* for consistency#2646jancurn wants to merge 5 commits into
Conversation
Rename the legacy `act_*`/`acts_*` operationIds in the OpenAPI source to `actor_*`/`actors_*` so the generated doc page slugs become `/api/v2/actor-*`, matching the canonical `/v2/actors/` naming. operationId only drives doc-slug generation and client method hints; the live API at api.apify.com/v2 is unchanged (paths, methods, parameters, and request/response schemas untouched). - 63 operations renamed; matching `code_samples/*` files renamed to keep their samples attached. - 7 deprecated actor-scoped build/run duplicates (act-build-get, act-builds-get, act-build-abort-post, act-run-get, act-runs-get, act-run-abort-post, act-run-metamorph-post) keep their operationIds; their legacy URLs 301-redirect to the canonical standalone actor-build*/actor-run* pages. - nginx: add 301 redirects `/api/v2/act-*` -> `/api/v2/actor-*` and `/api/v2/acts-*` -> `/api/v2/actors-*` covering every old slug. - Update internal doc links and the llms.txt index exclusion patterns. https://claude.ai/code/session_01Q4HrVBuRKYG46ztwLXQkHz
|
✅ Preview for this PR (commit |
|
Sorry guys for this "drop". It's a lot of changes but should be fairly safe I think. |
| # Actor API reference operation pages: legacy `act-*`/`acts-*` slugs -> `actor-*`/`actors-*`. | ||
| # Each page slug is kebab-case(operationId); the `act_*`/`acts_*` operationIds were renamed to | ||
| # `actor_*`/`actors_*` to match the canonical `/v2/actors/` naming. The deprecated actor-scoped | ||
| # build/run duplicates (act-build-get, act-builds-get, act-build-abort-post, act-run-get, | ||
| # act-runs-get, act-run-abort-post, act-run-metamorph-post) resolve to their canonical | ||
| # standalone actor-build*/actor-run* pages via the same act- -> actor- rewrite. | ||
| rewrite ^/api/v2/acts-(.*)$ /api/v2/actors-$1 permanent; | ||
| rewrite ^/api/v2/act-(.*)$ /api/v2/actor-$1 permanent; | ||
|
|
There was a problem hiding this comment.
Just off the top of my head I think this is problematic, weird UX, and partly a bug.
The genuinely deprecated endpoints (act-build-get, act-run-get, abort, metamorph) are already marked deprecated: true in the spec, with an admonition that tells you they're deprecated and links to the canonical one. A silent 301 strips that context. You click the endpoint and inexplicably land on a different page with no explanation.
But act-builds-get and act-runs-get aren't deprecated at all. They're the Actor-scoped list endpoints (GET /v2/acts/{actorId}/builds, GET /v2/acts/{actorId}/runs). The broad rule at line 800 catches them and redirects to actor-builds-get / actor-runs-get, which are the account-wide "Get user builds/runs list" endpoints.
Different scope, no equivalent in the new namespace. So that's a straight regression: those pages serve correct content on prod today and would 301 away after this.
…irect The act-(.*) catch-all also matched 7 Actor-scoped build/run pages that were intentionally not renamed and still exist: it stripped the deprecation notice from the 5 deprecated pages (silent 301) and, worse, 301'd the two non-deprecated Actor-scoped list pages (act-builds-get, act-runs-get) to the account-wide actor-builds-get/actor-runs-get, which have a different scope and no equivalent. Add an exact-match guard that serves those 7 via `break`; every other moved act-* slug (incl. prefix-sharing ones like act-build-default-get) still 301s. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Q4HrVBuRKYG46ztwLXQkHz
| - [List Actor Runs](https://docs.apify.com/api/v2/actor-runs-get) | ||
| - [List Specific Actor Runs](https://docs.apify.com/api/v2/actor-runs-get) |
There was a problem hiding this comment.
These links now point to a different page, not sure if that would be a problem, don't know enough about this integration.
https://docs.apify.com/api/v2/act-runs-get (runs of a specific actor)
vs.
https://docs.apify.com/api/v2/actor-runs-get (all runs by a user)
|
Wasn't the |
That sounds plausible. Maybe because |
|
Thanks for the reviews, but pls let's not merge this yet, i still need to resolve the conflict between |
…niak-vsr50p
# Conflicts:
# apify-api/openapi/paths/actors/acts.yaml
# apify-api/openapi/paths/actors/acts@{actorId}.yaml
# sources/academy/tutorials/api/run_actor_and_retrieve_data_via_api.md
# sources/platform/actors/development/builds_and_runs/runs.md
# sources/platform/actors/running/index.md
…or scoped runs/builds
The rename of act_* operationIds to actor_* collided on 7 slugs where the
account-wide /v2/actor-runs and /v2/actor-builds families already own the
actor-runs-*/actor-builds-* names (e.g. act-runs-get = runs of one Actor vs
actor-runs-get = all runs of a user). The previous fix kept those 7 pages on
their legacy act-* slugs behind an nginx serve-guard, which left the naming
conflict unresolved.
Rename the 9 direct operations on an Actor's own /runs and /builds
collections (list/create plus the 5 deprecated per-item aliases) to the
actors_* prefix, mirroring their literal path /v2/actors/{actorId}/... :
act_runs_get -> actors_runs_get
act_builds_get -> actors_builds_get
act_run_get -> actors_run_get (deprecated)
act_build_get -> actors_build_get (deprecated)
act_run_abort_post -> actors_run_abort_post (deprecated)
act_build_abort_post -> actors_build_abort_post (deprecated)
act_run_metamorph_post -> actors_run_metamorph_post (deprecated)
actor_runs_post -> actors_runs_post
actor_builds_post -> actors_builds_post
Deeper scoped sub-resources (runs/last, run-sync, builds/default, versions,
webhooks) keep the actor- member prefix; account-wide families keep
actor-runs-*/actor-builds-*. No act-*/acts-* slugs remain, so nginx needs no
serve-exceptions: one explicit alternation rewrites the 9 legacy slugs to
actors-*, and the two catch-alls 301 everything else. Verified: all 70
legacy slugs redirect to existing pages.
Also relink bubble.md's Actor-scoped run-list references to actors-runs-get
(they were pointing at the account-wide list), update actors-runs-post links
across docs, rename the matching code sample files, and refresh the LLMs
index exclusions.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q4HrVBuRKYG46ztwLXQkHz
|
Important Action required — @jancurn please coordinate this docs PR with the Python API client PR linked below. Because this PR modifies the OpenAPI specification, the generated models in A companion PR has been opened in
|
|
I've redone this with Fable, fixed the duplicates, and this should be good to go. Would be great if somebody else could check this, but in worst case, it only affects docs :) |

Renames all legacy
act_*/acts_*operationIds so API reference URLs match the canonical/v2/actors/naming - e.g.https://docs.apify.com/api/v2/acts-postbecomes/api/v2/actors-post,/api/v2/act-getbecomes/api/v2/actor-get.Because the account-wide
/v2/actor-runsand/v2/actor-buildsendpoints already own theactor-runs-*/actor-builds-*slugs, operations on an Actor's own/runsand/buildscollections (including their deprecated per-item aliases) use theactors-*prefix instead, mirroring/v2/actors/{actorId}/...- e.g./api/v2/act-runs-postbecomes/api/v2/actors-runs-post. Deeper scoped sub-resources (runs/last,run-sync, versions, webhooks) keep theactor-*member prefix.No
act-*pages remain: every legacy slug 301-redirects via nginx (one explicit rule for the nine runs/builds slugs plus two catch-alls). Documentation links, code sample filenames, and the LLMs index exclusions are updated to match.https://claude.ai/code/session_01Q4HrVBuRKYG46ztwLXQkHz