# `ApifyClient.API.Actors.Runs.Last.KeyValueStore.Records`
[🔗](https://github.com/social-growth-studio/apify-client-ex/blob/v1.0.0/lib/apify_client/api/actors/runs/last/key_value_store/records.ex#L1)

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

# `delete`

```elixir
@spec delete(actor_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's last run

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

This endpoint is a shortcut for getting the last run's `defaultKeyValueStoreId` and then using the
[Delete key-value store record](https://docs.apify.com/api/v2/key-value-store-record-delete) 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`

```elixir
@spec get(actor_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's last run

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

This endpoint is a shortcut for getting the last run's `defaultKeyValueStoreId` and then using the
[Get key-value store record](https://docs.apify.com/api/v2/key-value-store-record-get) 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`

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

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

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

This endpoint is a shortcut for getting the last run's `defaultKeyValueStoreId` and then using the
[Download key-value store records](https://docs.apify.com/api/v2/key-value-store-records-get) 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`

```elixir
@spec update(
  actor_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's last run

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

This endpoint is a shortcut for getting the last run's `defaultKeyValueStoreId` and then using the
[Set key-value store record](https://docs.apify.com/api/v2/key-value-store-record-put) 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`

---

*Consult [api-reference.md](api-reference.md) for complete listing*
