Skip to main content

Clone a dataset version

Request

Create a new dataset in the same project with the episodes and episode versions of a committed dataset version. The new dataset is independent: later changes to either dataset do not affect the other.

By default, the new dataset has a single committed version. Set includeHistory to copy every version up to and including the cloned version instead. Either way, the new dataset has an empty draft on top of its latest version.

Security
ApiKey(Required scopes: datasets.create)
Path
idstringrequired

ID of the dataset to clone.

versionNumberstring^[0-9]+$required

Committed dataset version to clone.

Bodyapplication/jsonrequired
namestring, [ 1 .. 100 ] charactersrequired

Display name of the new dataset. Must be unique within the project (case-insensitive) among datasets.

descriptionstring or null, [ 1 .. 500 ] characters

Optional display description of the new dataset.

includeHistoryboolean

Copy the source dataset's versions up to and including the cloned version, with their descriptions and commit details.

Default:false
Payload
{ "name": "string", "description": "string", "includeHistory": false }

Responses

The new dataset

Bodyapplication/json
idstringrequired

ID of the dataset.

projectIdstringrequired

ID of the project the dataset belongs to.

namestringrequired

Display name.

descriptionstring or null

Optional display description.

creatorOrgMemberIdstring or null

ID of the org member who created the dataset. Null when the dataset was created via API-key auth (in which case creatorApiKeyId is set).

creatorApiKeyIdstring or null

ID of the API key that created the dataset. Null when the dataset was created via session auth (in which case creatorOrgMemberId is set).

createdAtstring, (date-time)required

Timestamp when the dataset was created.

updatedAtstring, (date-time)required

Timestamp when the dataset was last updated.

episodeCountinteger, >= 0

Number of episodes in this dataset.

Response
{ "id": "string", "projectId": "string", "name": "string", "description": "string", "creatorOrgMemberId": "string", "creatorApiKeyId": "string", "createdAt": "2019-08-24T14:15:22Z", "updatedAt": "2019-08-24T14:15:22Z", "episodeCount": 0 }