cURL
curl --request POST \
--url http://studio.premai.io/api/v1/public/snapshots/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"dataset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "http://studio.premai.io/api/v1/public/snapshots/create"
payload = { "dataset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }
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({dataset_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('http://studio.premai.io/api/v1/public/snapshots/create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"snapshot_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Snapshots API
Create Snapshot
Split a dataset into training and validation and build a snapshot.
POST
/
api
/
v1
/
public
/
snapshots
/
create
cURL
curl --request POST \
--url http://studio.premai.io/api/v1/public/snapshots/create \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"dataset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
'import requests
url = "http://studio.premai.io/api/v1/public/snapshots/create"
payload = { "dataset_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a" }
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({dataset_id: '3c90c3cc-0d44-4b50-8888-8dd25736052a'})
};
fetch('http://studio.premai.io/api/v1/public/snapshots/create', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"snapshot_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Response
Snapshot created successfully
Was this page helpful?