Datasets
Restore dataset
Restore a dataset we archived, so it can be selected for new work. A dataset you deleted is gone.
POST
/
v1
/
datasets
/
{dataset_id}
/
restore
Restore dataset
curl --request POST \
--url https://api.sqwish.ai/v1/datasets/{dataset_id}/restore \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"max_price_usd": "<string>"
}
'import requests
url = "https://api.sqwish.ai/v1/datasets/{dataset_id}/restore"
payload = { "max_price_usd": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({max_price_usd: '<string>'})
};
fetch('https://api.sqwish.ai/v1/datasets/{dataset_id}/restore', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"name": "<string>",
"created_at": 123,
"sha256": "<string>",
"version": 123,
"rows": 123,
"contexts": 123,
"duplicates_removed": 123,
"method": "sft",
"archived_at": 123,
"used_at": 123,
"evaluation_only": true,
"evaluation_fraction": 123,
"split": {},
"prompt_tuning": {
"decisions": [
{
"decision": {
"id": "<string>",
"question": "<string>",
"kind": "single",
"outcomes": "<unknown>",
"rubric": [
"<unknown>"
],
"policy": {
"action_costs": {},
"abstain_below": 0.5
}
},
"outcomes": [
"<string>"
],
"rows": 123,
"labels": {},
"reason": "conflicting_decision"
}
],
"unlisted": 123
},
"input": {
"format": "json",
"sha256": "<string>",
"bytes": 123
},
"labeling": {
"job_id": "<string>",
"source_id": "<string>",
"source_sha256": "<string>",
"source_input_sha256": "<string>",
"spec_sha256": "<string>",
"prompt_version": "<string>",
"teacher_models": [
"<string>"
],
"row_indices": [
123
],
"selection_sha256": "<string>",
"target_method": "mean_one_hot_teacher_votes"
},
"storage_window": {
"started_at": 123,
"ends_at": 123,
"reserved_usd": "<string>"
},
"labels_to_check": 123
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": [
{
"path": [
"<string>"
],
"message": "<string>",
"type": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": [
{
"path": [
"<string>"
],
"message": "<string>",
"type": "<string>"
}
]
}
}Body
application/json
The most you agree to pay for its first day of storage, which a dataset above the free size holds, in USD, such as the price you were shown. It is a decimal string, such as "2.500000000", never a JSON number, so no precision is lost: a number is refused with invalid_request, naming this field. If it costs more when it is admitted, it is refused with price_changed and nothing is held.
Pattern:
^\d{1,9}(\.\d{1,9})?$Response
Successful Response
Restore dataset
curl --request POST \
--url https://api.sqwish.ai/v1/datasets/{dataset_id}/restore \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"max_price_usd": "<string>"
}
'import requests
url = "https://api.sqwish.ai/v1/datasets/{dataset_id}/restore"
payload = { "max_price_usd": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({max_price_usd: '<string>'})
};
fetch('https://api.sqwish.ai/v1/datasets/{dataset_id}/restore', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"name": "<string>",
"created_at": 123,
"sha256": "<string>",
"version": 123,
"rows": 123,
"contexts": 123,
"duplicates_removed": 123,
"method": "sft",
"archived_at": 123,
"used_at": 123,
"evaluation_only": true,
"evaluation_fraction": 123,
"split": {},
"prompt_tuning": {
"decisions": [
{
"decision": {
"id": "<string>",
"question": "<string>",
"kind": "single",
"outcomes": "<unknown>",
"rubric": [
"<unknown>"
],
"policy": {
"action_costs": {},
"abstain_below": 0.5
}
},
"outcomes": [
"<string>"
],
"rows": 123,
"labels": {},
"reason": "conflicting_decision"
}
],
"unlisted": 123
},
"input": {
"format": "json",
"sha256": "<string>",
"bytes": 123
},
"labeling": {
"job_id": "<string>",
"source_id": "<string>",
"source_sha256": "<string>",
"source_input_sha256": "<string>",
"spec_sha256": "<string>",
"prompt_version": "<string>",
"teacher_models": [
"<string>"
],
"row_indices": [
123
],
"selection_sha256": "<string>",
"target_method": "mean_one_hot_teacher_votes"
},
"storage_window": {
"started_at": 123,
"ends_at": 123,
"reserved_usd": "<string>"
},
"labels_to_check": 123
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": [
{
"path": [
"<string>"
],
"message": "<string>",
"type": "<string>"
}
]
}
}{
"error": {
"code": "<string>",
"message": "<string>",
"retryable": true,
"request_id": "<string>",
"details": [
{
"path": [
"<string>"
],
"message": "<string>",
"type": "<string>"
}
]
}
}