ApifyClient.API.Tasks.Runs.Last.KeyValueStore.Records (apify_client v1.0.0)

Copy Markdown View Source

Provides API endpoints related to api/tasks/runs/last/key value store/records

Summary

Functions

Delete record from the default key-value store of an Actor task's last run

Get record from the default key-value store of an Actor task's last run

Download records from the default key-value store of an Actor task's last run

Set record in the default key-value store of an Actor task's last run

Functions

delete(actor_task_id, record_key, opts \\ [])

@spec delete(actor_task_id :: String.t(), record_key :: String.t(), opts :: keyword()) ::
  :ok | {:error, ApifyClient.Error.t()}

Delete record from the default key-value store of an Actor task's last run

Removes a record specified by a key from the default key-value store of the last Actor task run.

This endpoint is a shortcut for getting the last task run's defaultKeyValueStoreId and then using the Delete key-value store record endpoint.

Options

  • status: Filter for the run status.
  • origin: Filter for the run origin, i.e. the means by which the run was started.

get(actor_task_id, record_key, opts \\ [])

@spec get(actor_task_id :: String.t(), record_key :: String.t(), opts :: keyword()) ::
  {:ok, any()} | {:error, ApifyClient.Error.t()}

Get record from the default key-value store of an Actor task's last run

Gets a value stored under a specific key in the default key-value store of the last Actor task run.

This endpoint is a shortcut for getting the last task run's defaultKeyValueStoreId and then using the Get key-value store record endpoint.

Options

  • status: Filter for the run status.
  • origin: Filter for the run origin, i.e. the means by which the run was started.
  • signature: Signature used for the access.
  • attachment: If true or 1, the response will be served with Content-Disposition: attachment header, causing web browsers to offer downloading HTML records instead of displaying them.

list(actor_task_id, opts \\ [])

@spec list(actor_task_id :: String.t(), opts :: keyword()) ::
  {:ok, binary()} | {:error, ApifyClient.Error.t()}

Download records from the default key-value store of an Actor task's last run

Downloads all records from the default key-value store of the last Actor task run as a ZIP archive.

This endpoint is a shortcut for getting the last task run's defaultKeyValueStoreId and then using the Download key-value store records endpoint.

Options

  • status: Filter for the run status.

  • origin: Filter for the run origin, i.e. the means by which the run was started.

  • collection: If specified, only records belonging to a specific collection from the key-value store schema. The key-value store need to have a schema defined for this parameter to work.

  • prefix: If specified, only records whose key starts with the given prefix are included in the archive.

  • signature: Signature used for the access.

update(actor_task_id, record_key, body, opts \\ [])

@spec update(
  actor_task_id :: String.t(),
  record_key :: String.t(),
  body :: any(),
  opts :: keyword()
) ::
  {:ok, map() | nil} | {:error, ApifyClient.Error.t()}

Set record in the default key-value store of an Actor task's last run

Stores a value under a specific key in the default key-value store of the last Actor task run.

This endpoint is a shortcut for getting the last task run's defaultKeyValueStoreId and then using the Set key-value store record endpoint.

Options

  • status: Filter for the run status.
  • origin: Filter for the run origin, i.e. the means by which the run was started.

Request Body

Content Types: */*, application/json