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

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

# `delete`

```elixir
@spec delete(run_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 run

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

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

# `get`

```elixir
@spec get(run_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 run

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

This endpoint is a shortcut for getting the 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

  * `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(run_id :: String.t(), opts :: keyword()) ::
  {:ok, binary()} | {:error, ApifyClient.Error.t()}
```

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

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

This endpoint is a shortcut for getting the 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

  * `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(
  run_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 run

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

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

## Request Body

**Content Types**: `*/*`, `application/json`

---

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