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' => '

Hello World

' ], @@ -183,7 +183,7 @@ It takes some time for an Actor to generate its output. Some even have Actors th For Actors that are expected to be quick, we can use the `waitForFinish` parameter. Then, the running Actor's endpoint does not respond immediately but waits until the run finishes (up to the given limit). Let's try this with the HTML String to PDF Actor. ```php -$response = $client->post('acts/mhamas~html-string-to-pdf/runs', [ +$response = $client->post('actors/mhamas~html-string-to-pdf/runs', [ 'json' => [ 'htmlString' => '

Hi World

' ], @@ -217,7 +217,7 @@ $webhooks = \base64_encode(\json_encode([ 'requestUrl' => '', ], ])); -$response = $client->post('acts/mhamas~html-string-to-pdf/runs', [ +$response = $client->post('actors/mhamas~html-string-to-pdf/runs', [ 'json' => [ 'htmlString' => '

Hello World

' ], diff --git a/sources/platform/get-started/agent-onboarding.md b/sources/platform/get-started/agent-onboarding.md index 7fa94453bf..069f884fdd 100644 --- a/sources/platform/get-started/agent-onboarding.md +++ b/sources/platform/get-started/agent-onboarding.md @@ -255,9 +255,9 @@ For HTTP-native integrations or languages without a dedicated client. Base URL: | Action | Method | Endpoint | | :--- | :--- | :--- | | [Search Actors in Store](/api/v2/store-get) | `GET` | `/v2/store` | -| [Get Actor details](/api/v2/actor-get) | `GET` | `/v2/acts/{actorId}` | -| [Run an Actor](/api/v2/actors-runs-post) | `POST` | `/v2/acts/{actorId}/runs` | -| [Run Actor (sync, get results)](/api/v2/actor-run-sync-get-dataset-items-post) | `POST` | `/v2/acts/{actorId}/run-sync-get-dataset-items` | +| [Get Actor details](/api/v2/actor-get) | `GET` | `/v2/actors/{actorId}` | +| [Run an Actor](/api/v2/actors-runs-post) | `POST` | `/v2/actors/{actorId}/runs` | +| [Run Actor (sync, get results)](/api/v2/actor-run-sync-get-dataset-items-post) | `POST` | `/v2/actors/{actorId}/run-sync-get-dataset-items` | | [Get run status](/api/v2/actor-run-get) | `GET` | `/v2/actor-runs/{runId}` | | [Get dataset items](/api/v2/dataset-items-get) | `GET` | `/v2/datasets/{datasetId}/items` | diff --git a/sources/platform/integrations/programming/github.md b/sources/platform/integrations/programming/github.md index 90b3d62a01..2c3fc41684 100644 --- a/sources/platform/integrations/programming/github.md +++ b/sources/platform/integrations/programming/github.md @@ -55,7 +55,7 @@ After you link an Actor to a GitHub repository, add a webhook in GitHub to trigg 1. In Apify Console, open the Actor's **API** dropdown and select **API endpoints**. Copy the **Build Actor** endpoint URL. It has this format: ```text - https://api.apify.com/v2/acts/YOUR-ACTOR-NAME/builds?token=YOUR-TOKEN&version=0.0&tag=latest&waitForFinish=60 + https://api.apify.com/v2/actors/YOUR-ACTOR-NAME/builds?token=YOUR-TOKEN&version=0.0&tag=latest&waitForFinish=60 ``` :::note API token