Skip to main content

Restore a previous version

Request

Stage changes to make the dataset's draft match a previous dataset version, including the episode versions it uses. This does not commit the draft. Use force=true to replace pending draft changes.

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

Dataset ID

versionNumberstring^[0-9]+$required

Dataset version to restore into the draft.

Query
forceboolean

Replace any pending changes in the dataset's draft.

Default:false
Payload
// No request payload

Responses

Counts of the staged edits applied by the restore

Bodyapplication/json
updatedintegerrequired

Number of episode version changes staged to match the restored dataset version.

discardedUpdatesintegerrequired

Number of previously pending episode version changes discarded during restore.

addedintegerrequired

Number of episodes staged for addition to match the restored version.

removedintegerrequired

Number of episodes staged for removal to match the restored version.

discardedAddsintegerrequired

Number of previously-staged additions discarded before applying the restore.

discardedRemovesintegerrequired

Number of previously-staged removals discarded before applying the restore.

Response
{ "updated": 0, "discardedUpdates": 0, "added": 0, "removed": 0, "discardedAdds": 0, "discardedRemoves": 0 }