Skip to content
GuidesPlaygroundDashboard

Create a new dataset (admin only)

datasets().create(DatasetCreateParamsparams, RequestOptionsrequestOptions = RequestOptions.none()) : Dataset
POST/api/v1/datasets

Create a new dataset (admin only)

ParametersExpand Collapse
params: DatasetCreateParams
name: String

Dataset name

slug: String

URL-friendly slug

attribution: Optional<String>

Attribution text

description: Optional<String>

Dataset description

license: Optional<String>

License identifier

sourceUrl: Optional<String>

Source data URL

ReturnsExpand Collapse
class Dataset:
id: String

Dataset ID

formatuuid
insertedAt: LocalDateTime

Creation timestamp

formatdate-time
name: String

Dataset name

slug: String

URL-friendly slug

updatedAt: LocalDateTime

Last update timestamp

formatdate-time
attribution: Optional<String>

Attribution text

description: Optional<String>

Dataset description

license: Optional<String>

License identifier

sourceUrl: Optional<String>

Source data URL

Create a new dataset (admin only)

package com.plazafyi.example

import com.plazafyi.client.PlazaClient
import com.plazafyi.client.okhttp.PlazaOkHttpClient
import com.plazafyi.models.datasets.Dataset
import com.plazafyi.models.datasets.DatasetCreateParams

fun main() {
    val client: PlazaClient = PlazaOkHttpClient.fromEnv()

    val params: DatasetCreateParams = DatasetCreateParams.builder()
        .name("name")
        .slug("slug")
        .build()
    val dataset: Dataset = client.datasets().create(params)
}
{
  "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"
}