Skip to content
GuidesPlaygroundDashboard

List all datasets

client.Datasets.List(ctx) (*DatasetList, error)
GET/api/v1/datasets

List all datasets

ReturnsExpand Collapse
type DatasetList struct{…}
Datasets []Dataset
ID string

Dataset ID

formatuuid
InsertedAt Time

Creation timestamp

formatdate-time
Name string

Dataset name

Slug string

URL-friendly slug

UpdatedAt Time

Last update timestamp

formatdate-time
Attribution stringoptional

Attribution text

Description stringoptional

Dataset description

License stringoptional

License identifier

SourceURL stringoptional

Source data URL

List all datasets

package main

import (
  "context"
  "fmt"

  "github.com/plazafyi/plaza-go"
  "github.com/plazafyi/plaza-go/option"
)

func main() {
  client := githubcomplazafyiplazago.NewClient(
    option.WithAPIKey("My API Key"),
  )
  datasetList, err := client.Datasets.List(context.TODO())
  if err != nil {
    panic(err.Error())
  }
  fmt.Printf("%+v\n", datasetList.Datasets)
}
{
  "datasets": [
    {
      "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "inserted_at": "2019-12-27T18:11:19.117Z",
      "name": "name",
      "slug": "slug",
      "updated_at": "2019-12-27T18:11:19.117Z",
      "attribution": "attribution",
      "description": "description",
      "license": "license",
      "source_url": "source_url"
    }
  ]
}
Returns Examples
{
  "datasets": [
    {
      "id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
      "inserted_at": "2019-12-27T18:11:19.117Z",
      "name": "name",
      "slug": "slug",
      "updated_at": "2019-12-27T18:11:19.117Z",
      "attribution": "attribution",
      "description": "description",
      "license": "license",
      "source_url": "source_url"
    }
  ]
}