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

Provides API endpoints related to api/runs/dataset

# `delete`

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

Delete the default dataset of an Actor run

Deletes default dataset associated with an Actor run.

This endpoint is a shortcut for getting the last run's `defaultDatasetId` and then using the
[Delete dataset](https://docs.apify.com/api/v2/dataset-delete) endpoint.

# `get`

```elixir
@spec get(run_id :: String.t(), opts :: keyword()) ::
  {:ok, ApifyClient.Schemas.DatasetResource.t()}
  | {:error, ApifyClient.Error.t()}
```

Get the default dataset of an Actor run

Returns the default dataset associated with an Actor run.

This endpoint is a shortcut for getting the run's `defaultDatasetId` and then using the
[Get dataset](https://docs.apify.com/api/v2/dataset-get) endpoint.

# `statistics`

```elixir
@spec statistics(run_id :: String.t(), opts :: keyword()) ::
  {:ok, ApifyClient.Schemas.DatasetStatistics.t()}
  | {:error, ApifyClient.Error.t()}
```

Get the default dataset statistics for an Actor run

Returns statistics for the Actor run's default dataset.

This endpoint is a shortcut that resolves the run's `defaultDatasetId` and proxies to the
[Get dataset statistics](https://docs.apify.com/api/v2/dataset-statistics-get) endpoint.

# `update`

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

Update the default dataset of an Actor run

Updates the default dataset associated with an Actor run.

This endpoint is a shortcut for getting the run's `defaultDatasetId` and then using the
[Update dataset](https://docs.apify.com/api/v2/dataset-put) endpoint.

## Request Body

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

---

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