Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/rust-integration-tests.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,17 @@
name: Rust integration tests

# Language-specific workflow: only runs for the Rust client. Triggers on PRs to master
# that touch Rust client or test code, and can be dispatched manually from any branch.
# that touch Rust client, test, docs or build code, and can be dispatched manually from any branch.
on:
pull_request:
branches: [master]
paths:
- 'src/**'
- 'tests/**'
- 'examples/**'
- 'docs/**'
- 'README.md'
- 'build.rs'
- 'Cargo.toml'
- 'Cargo.lock'
- '.github/workflows/rust-integration-tests.yml'
Expand Down
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@ All notable changes to the Rust Apify API client are documented here. The format
based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and the project adheres
to [Semantic Versioning](https://semver.org/).

## [0.14.1] - 2026-10-26

### Changed
- Synced with Apify OpenAPI spec `v2-2026-10-26T112451Z` (`API_SPEC_VERSION`).

### Fixed
- Documented `RunClient::resurrect`: the terminal statuses it accepts and how
`max_total_charge_usd` applies to a run that reached its cost limit.
- Corrected the `max_total_charge_usd` field docs: it caps the total cost of the run for all
pricing models, not only pay-per-event Actors.

## [0.14.0] - 2026-10-21

### Added
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "apify-client"
version = "0.14.0"
version = "0.14.1"
authors = ["Apify Technologies <support@apify.com>"]
description = "An official, but experimental, AI-generated and AI-maintained Rust client for the Apify API (https://apify.com)."
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion docs/actors.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ All fields are optional. Used by both `start` and `call` here, and by the identi
| `timeout_secs` | `Option<i64>` | Timeout for the run in seconds (`0` means no timeout). |
| `wait_for_finish` | `Option<i64>` | Maximum seconds to wait server-side for the run to finish (max 60). |
| `max_items` | `Option<i64>` | Maximum number of dataset items to charge (pay-per-result Actors). |
| `max_total_charge_usd` | `Option<f64>` | Maximum total charge in USD (pay-per-event Actors). |
| `max_total_charge_usd` | `Option<f64>` | Maximum total cost of the run in USD, across all pricing models. |
| `content_type` | `Option<String>` | Content type of the input body. Defaults to `application/json` for `start`/`call`, or `application/octet-stream` for `start_raw`/`call_raw`, when unset. |
| `restart_on_error` | `Option<bool>` | Whether to restart the run if it fails. |
| `force_permission_level` | `Option<String>` | Override the Actor's permission level for this run. |
Expand Down
2 changes: 1 addition & 1 deletion docs/runs.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ collections are available via `actor.runs()` and `task.runs()`.
| `metamorph(target, input, options)` | `&str`, `Option<&impl Serialize>`, `RunMetamorphOptions` | `ActorRun` | Transforms the run into another Actor. |
| `metamorph_raw(target, input, options)` | `&str`, `&[u8]`, `RunMetamorphOptions` | `ActorRun` | Like `metamorph`, but sends `input` as a raw request body (no JSON serialization), paired with `options.content_type`. |
| `reboot()` | — | `ActorRun` | Reboots the run's container. |
| `resurrect(options)` | `RunResurrectOptions` | `ActorRun` | Resurrects a finished run. |
| `resurrect(options)` | `RunResurrectOptions` | `ActorRun` | Resurrects a run in a terminal state (`SUCCEEDED`, `FAILED`, `ABORTED`, `TIMED-OUT`). To continue a run that reached its cost limit, pass a higher `max_total_charge_usd`; the limit covers the whole run, including the cost before the resurrection. |
| `charge(options)` | `RunChargeOptions` | `()` | Charges a pay-per-event run (always sends an idempotency key). |
| `wait_for_finish(wait_secs)` | `Option<i64>` | `ActorRun` | Polls until the run is terminal. `None` waits indefinitely; `Some(n)` bounds the wait and may return a still-running (non-terminal) run if `n` elapses first. A run ID that keeps 404ing past a 3-second grace period (reset by any successful fetch) returns the `404` as an error instead of polling forever. |
| `dataset()` / `key_value_store()` / `request_queue()` / `log()` | — | resource client | Access the run's default storages and log. |
Expand Down
2 changes: 1 addition & 1 deletion src/clients/actor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ pub struct ActorStartOptions {
pub wait_for_finish: Option<i64>,
/// Maximum number of dataset items to charge (pay-per-result Actors).
pub max_items: Option<i64>,
/// Maximum total charge in USD (pay-per-event Actors).
/// Maximum total cost of the run in USD, across all pricing models.
pub max_total_charge_usd: Option<f64>,
/// Content type of the input body. Defaults to `application/json`.
pub content_type: Option<String>,
Expand Down
8 changes: 7 additions & 1 deletion src/clients/run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ pub struct RunResurrectOptions {
pub timeout_secs: Option<i64>,
/// Maximum number of dataset items to charge (pay-per-result Actors).
pub max_items: Option<i64>,
/// Maximum total charge in USD (pay-per-event Actors).
/// Maximum total cost of the run in USD, across all pricing models.
pub max_total_charge_usd: Option<f64>,
/// If `true`, restart the run automatically when it fails.
pub restart_on_error: Option<bool>,
Expand Down Expand Up @@ -208,6 +208,12 @@ impl RunClient {
}

/// Resurrects a finished run, starting it again with (optionally overridden) settings.
///
/// Only runs in a terminal state (`SUCCEEDED`, `FAILED`, `ABORTED` or `TIMED-OUT`) can be
/// resurrected. The run continues with the same storages, and its timeout counts from the
/// resurrection. `max_total_charge_usd` applies to the whole run including the cost before the
/// resurrection, so raise it to continue a run that stopped at its cost limit; otherwise the
/// resurrected run keeps the original limit and stops right after it starts.
pub async fn resurrect(&self, options: RunResurrectOptions) -> ApifyClientResult<ActorRun> {
let mut params = QueryParams::new();
params
Expand Down
2 changes: 1 addition & 1 deletion src/version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ pub const CLIENT_VERSION: &str = env!("CARGO_PKG_VERSION");
/// and verified against.
///
/// This corresponds to the `info.version` field of the Apify OpenAPI document.
pub const API_SPEC_VERSION: &str = "v2-2026-10-20T121847Z";
pub const API_SPEC_VERSION: &str = "v2-2026-10-26T112451Z";
Loading