## Get a dataset

`client.Datasets.Get(ctx, datasetID, query) (*Dataset, error)`

**get** `/v5/datasets/{dataset_id}`

Retrieve a single dataset by its id.

By default an archived dataset is not returned; set `include_archived` to true to fetch a
dataset regardless of whether it has been archived.

### Parameters

- `datasetID string`

- `query DatasetGetParams`

  - `IncludeArchived param.Field[bool]`

### Returns

- `type Dataset struct{…}`

  - `ID string`

    The unique identifier of the entity.

  - `CreatedAt Time`

    The date and time when the entity was created in ISO format.

  - `CreatedBy Identity`

    The identity that created the entity.

    - `ID string`

    - `Type IdentityType`

      - `const IdentityTypeUser IdentityType = "user"`

      - `const IdentityTypeServiceAccount IdentityType = "service_account"`

    - `Object IdentityObject`

      - `const IdentityObjectIdentity IdentityObject = "identity"`

  - `CurrentVersionNum int64`

  - `Name string`

  - `Tags []string`

    The tags associated with the entity

  - `ArchivedAt Time`

    The date and time when the entity was archived in ISO format.

  - `Description string`

  - `Object DatasetObject`

    - `const DatasetObjectDataset DatasetObject = "dataset"`

### Example

```go
package main

import (
  "context"
  "fmt"

  "github.com/scaleapi/sgp-dev-go"
  "github.com/scaleapi/sgp-dev-go/option"
)

func main() {
  client := sgpdev.NewClient(
    option.WithAPIKey("My API Key"),
    option.WithAccountID("My Account ID"),
  )
  dataset, err := client.Datasets.Get(
    context.TODO(),
    "dataset_id",
    sgpdev.DatasetGetParams{

    },
  )
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", dataset.ID)
}
```

#### Response

```json
{
  "id": "id",
  "created_at": "2019-12-27T18:11:19.117Z",
  "created_by": {
    "id": "id",
    "type": "user",
    "object": "identity"
  },
  "current_version_num": 0,
  "name": "name",
  "tags": [
    "string"
  ],
  "archived_at": "2019-12-27T18:11:19.117Z",
  "description": "description",
  "object": "dataset"
}
```
