Skip to content
GuidesPlaygroundDashboard

Create a new dataset (admin only)

datasets.create(**kwargs) -> Dataset { id, inserted_at, name, 6 more }
POST/api/v1/datasets

Create a new dataset (admin only)

ParametersExpand Collapse
name: String

Dataset name

slug: String

URL-friendly slug

attribution: String

Attribution text

description: String

Dataset description

license: String

License identifier

source_url: String

Source data URL

ReturnsExpand Collapse
class Dataset { id, inserted_at, name, 6 more }
id: String

Dataset ID

formatuuid
inserted_at: Time

Creation timestamp

formatdate-time
name: String

Dataset name

slug: String

URL-friendly slug

updated_at: Time

Last update timestamp

formatdate-time
attribution: String

Attribution text

description: String

Dataset description

license: String

License identifier

source_url: String

Source data URL

Create a new dataset (admin only)

require "plaza"

plaza = Plaza::Client.new(
  api_key: "My API Key",
  environment: "local" # defaults to "production"
)

dataset = plaza.datasets.create(name: "name", slug: "slug")

puts(dataset)
{
  "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
{
  "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"
}