diff --git a/.agents/skills/api-doc/references/openapi-patterns.md b/.agents/skills/api-doc/references/openapi-patterns.md index 30817e9903..83ca28e0e8 100644 --- a/.agents/skills/api-doc/references/openapi-patterns.md +++ b/.agents/skills/api-doc/references/openapi-patterns.md @@ -85,9 +85,13 @@ Rules: | `/request-queues` | GET | `requestQueues_get` | | `/request-queues/{queueId}` | GET | `requestQueue_get` | | `/request-queues/{queueId}` | PUT | `requestQueue_put` | -| `/acts/{actorId}/runs` | POST | `act_runs_post` | -| `/acts/{actorId}/runs` | GET | `act_runs_get` | -| `/acts/{actorId}/runs/{runId}` | GET | `act_run_get` | +| `/actors/{actorId}/runs` | POST | `actors_runs_post` | +| `/actors/{actorId}/builds` | GET | `actors_builds_get` | +| `/actors/{actorId}/runs/last` | GET | `actor_runs_last_get` | + +Uniqueness beats the singular rule, because the operation ID becomes the page slug. GET `/actors/{actorId}/runs` can't be `actor_runs_get` - the account-wide GET `/actor-runs` already owns the `actor-runs-get` slug and the two are different scopes. So Actor-scoped `/runs` and `/builds` use plural `actors_`, while `runs/last` has no clash and stays singular. Matching redirects: `nginx.conf`. + +Never rewrite the `act_*` fragments in `x-legacy-doc-urls` or in-description links pointing at them. They're backward-compatibility anchors, not operation ID references. `docusaurus.config.js` turns every `x-legacy-doc-urls` hash into a `data-altids` sidebar attribute, and `redirectOpenApiDocs()` in `apify-docs-theme/static/js/custom.js` matches an incoming `#tag/` or `#/reference/` hash against those altids - an unmatched hash hard-bounces to `/search?...¬-found=1`. Rewrite `act_version_put` to `actor_version_put` and the old link breaks, because no page carries the new id. ## Code sample examples diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ccdcb69ac4..f2511f2cfc 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -272,7 +272,7 @@ Examples: - `/requests-queues` GET -> `requestQueues_get` - `/requests-queues/{queueId}` PUT -> `requestQueue_put` -- `/acts/{actorId}/runs` POST -> `act_runs_post` +- `/actors/{actorId}/runs` POST -> `actors_runs_post` #### Code samples diff --git a/sources/academy/tutorials/api/run_actor_and_retrieve_data_via_api.md b/sources/academy/tutorials/api/run_actor_and_retrieve_data_via_api.md index 98520d5e3f..0ad7ea6878 100644 --- a/sources/academy/tutorials/api/run_actor_and_retrieve_data_via_api.md +++ b/sources/academy/tutorials/api/run_actor_and_retrieve_data_via_api.md @@ -27,7 +27,7 @@ If the Actor being run via API takes 5 minutes or less to complete a typical run > If you are unsure about the differences between an Actor and a task, you can read about them in the [tasks](/actors/running/tasks) documentation. In brief, tasks are pre-configured inputs for Actors. -The API endpoints and usage (for both sync and async) for [Actors](/api/v2#tag/ActorsRun-collection/operation/act_runs_post) and [tasks](/api/v2/actor-task-runs-post) are essentially the same. +The API endpoints and usage (for both sync and async) for [Actors](/api/v2/actors-runs-post) and [tasks](/api/v2/actor-task-runs-post) are essentially the same. To run, or **call**, an Actor/task, you will need a few things: @@ -45,7 +45,7 @@ The URL of [POST request](https://developer.mozilla.org/en-US/docs/Web/HTTP/Meth https://api.apify.com/v2/actors/ACTOR_NAME_OR_ID/runs?token=YOUR_TOKEN ``` -For tasks, we can switch the path from **acts** to **actor-tasks** and keep the rest the same: +For tasks, we can switch the path from **actors** to **actor-tasks** and keep the rest the same: ```cURL https://api.apify.com/v2/actor-tasks/TASK_NAME_OR_ID/runs?token=YOUR_TOKEN diff --git a/sources/academy/tutorials/api/using_apify_from_php.md b/sources/academy/tutorials/api/using_apify_from_php.md index bb366e5e0d..4799b4a26c 100644 --- a/sources/academy/tutorials/api/using_apify_from_php.md +++ b/sources/academy/tutorials/api/using_apify_from_php.md @@ -59,7 +59,7 @@ The [API reference](/api/v2/actors-runs-post) states that an Actor's input shoul // To identify the Actor, you can use its ID, but you can also pass // the full Actor name [username]~[actorName] or just ~[actorName] for // your own Actors -$response = $client->post('acts/vdrmota~contact-info-scraper/runs', [ +$response = $client->post('actors/vdrmota~contact-info-scraper/runs', [ // Actors usually accept JSON as input. When using the `json` key in // a POST request's options, guzzle sets proper request headers // and serializes the array we pass in @@ -128,7 +128,7 @@ All the available parameters are described in [our API reference](/api/v2/datase Datasets are great for structured data, but are not suited for binary files like images or PDFs. In these cases, Actors store their output in [key-value stores](/storage/key-value-store). One such Actor is the **HTML String To PDF** ([mhamas/html-string-to-pdf](https://apify.com/mhamas/html-string-to-pdf)) converter. Let's run it. ```php -$response = $client->post('acts/mhamas~html-string-to-pdf/runs', [ +$response = $client->post('actors/mhamas~html-string-to-pdf/runs', [ 'json' => [ 'htmlString' => '