Datasets
Set retention flag
Mark a dataset for long-term retention, or clear the flag.
PUT
Set retention flag
PUT https://api-datahub.octoparse.com/v1/datasets/{dataset_id}/retention
Authentication: API key required (Authorization: Bearer <API Key>).
Run results are kept for 90 days from creation by default. Datasets with the retention flag set are excluded from expiry cleanup. The flag is an explicit user declaration: reading does not renew retention, and set/clear are idempotent.
You can only mark your own datasets. Someone else’s dataset, a public seed dataset, or a missing id all return 404. The mark gate is narrower than the visibility gate because seed datasets are not your output and are not cleaned up, so marking them is meaningless.
Request
Path parameters
string
required
Dataset id.
Request body
boolean
required
true to retain, false to clear the flag.Example request
Response
200 success
Errors
Error responses use
{"error": {code, category, message, retryable}}. See Errors.