Skip to content

feat: Rename legacy act-* API operationIds to actor-* for consistency#2646

Open
jancurn wants to merge 2 commits into
masterfrom
claude/vigilant-wozniak-vsr50p
Open

feat: Rename legacy act-* API operationIds to actor-* for consistency#2646
jancurn wants to merge 2 commits into
masterfrom
claude/vigilant-wozniak-vsr50p

Conversation

@jancurn

@jancurn jancurn commented Jun 16, 2026

Copy link
Copy Markdown
Member

Standardizes API operation IDs across the OpenAPI specification by renaming all act_* and acts_* operationIds to actor_* and actors_* respectively, aligning with the canonical /v2/actors/ endpoint naming convention.

The main effect is that we fix the URLs in API docs from e.g. https://docs.apify.com/api/v2/acts-post to https://docs.apify.com/api/v2/actors-post

Key changes:

  • Updated 50+ operationIds in OpenAPI YAML files to use actor_ prefix instead of act_ (e.g., act_getactor_get, acts_getactors_get)
  • Added nginx rewrite rules to redirect legacy act-* and acts-* URL slugs to their actor-* and actors-* equivalents with 301 permanent redirects
  • Updated LLMS index exclusion patterns to reference new slug names and clarify that deprecated actor-scoped duplicates redirect to canonical pages
  • Updated all documentation links and API references throughout platform docs, academy tutorials, and integration guides to use new endpoint slugs
  • Renamed code sample files to match new operationIds (e.g., act_get.shactor_get.sh)

The changes maintain backward compatibility through nginx redirects while establishing consistent naming across the API reference documentation.

https://claude.ai/code/session_01Q4HrVBuRKYG46ztwLXQkHz

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
@apify-service-account

apify-service-account commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

✅ Preview for this PR (commit 99ae0b9b) is ready at https://pr-2646.preview.docs.apify.com (see action run).

@jancurn jancurn changed the title Rename legacy act-* API operationIds to actor-* for consistency feat: Rename legacy act-* API operationIds to actor-* for consistency Jun 16, 2026
@jancurn jancurn requested a review from TC-MO June 16, 2026 14:16
@jancurn

jancurn commented Jun 16, 2026

Copy link
Copy Markdown
Member Author

Sorry guys for this "drop". It's a lot of changes but should be fairly safe I think.

@jancurn jancurn removed the request for review from honzajavorek June 16, 2026 16:38
Comment thread nginx.conf
Comment on lines +793 to +801
# 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;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants