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

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

# `delete`

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

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

Deletes 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](https://docs.apify.com/api/v2/key-value-store-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_task_id :: String.t(), opts :: keyword()) ::
  {:ok, ApifyClient.Schemas.KeyValueStoreResource.t()}
  | {:error, ApifyClient.Error.t()}
```

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

Gets an object that contains all the details about 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](https://docs.apify.com/api/v2/key-value-store-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.

# `update`

```elixir
@spec update(
  actor_task_id :: String.t(),
  body :: map() | ApifyClient.Schemas.UpdateKeyValueStoreRequest.t(),
  opts :: keyword()
) ::
  {:ok, ApifyClient.Schemas.KeyValueStoreResource.t()}
  | {:error, ApifyClient.Error.t()}
```

Update the default key-value store of an Actor task's last run

Updates the default key-value store associated with the last Actor task run.

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