back
Dataset Manager
BaseURL
https://ml.api.utagoe.com/data
Upload dataset
Upload the dataset which is smaller than 2GB.
URL
POST /upload
Header
| Key |
Value |
| Content-type |
multipart/form-data |
| Access-Key |
YourAccessKey |
Parameters
| Name |
Type |
Required |
In |
Description |
| data |
File |
Yes |
Body |
.zip file for upload |
| type |
Text |
Yes |
Body |
Specify dataset format |
| dataset |
Text |
Yes |
Body |
Specify dataset ID |
| volatile |
Text |
|
Body |
Set either "true" or "false" |
Code sample
Shell
curl https://ml.api.utagoe.com/data/upload -F access_key=ExampleAccessKey1234 -F data=@example.zip -F type=raw -F dataset=sample_data
Response
Status: 200 OK
{
"dataset": "sample_data"
}
Upload huge dataset
Generate chunk_key for uploading.
URL
POST /chunk
Header
| Key |
Value |
| Content-type |
application/json |
| Access-Key |
YourAccessKey |
Parameters
| Name |
Type |
Required |
In |
Description |
| dataset_id |
Text |
Yes |
Body |
Specify dataset ID |
| type |
Text |
Yes |
Body |
Specify dataset format |
| chunk_count |
Int |
Yes |
Body |
Amount of chunks |
| volatile |
Text |
|
Body |
Set either "true" or "false" |
Code sample
Shell
curl https://ml.api.utagoe.com/data/chunk -H "Access-Key: ExampleAccessKey1234" -H "Content-Type: application/json" --data-binary '{"dataset_id":"sample_data", "type": "raw", "chunk_count": 100}'
Response
Status: 200 OK
{
"chunk_key": "ExampleChunkKey1234",
"expires_in": 3600
}
URL
POST /chunk/{chunk_key}
Header
| Key |
Value |
| Content-type |
multipart/form-data |
| Access-Key |
YourAccessKey |
Parameters
| Name |
Type |
Required |
In |
Description |
| chunk_file |
File |
Yes |
Body |
chunk of .zip file for uploading |
| chunk_no |
Int |
Yes |
Body |
Current Number of chunks |
Code sample
Shell
curl https://ml.api.utagoe.com/data/chunk/ExampleChunkKey1234 -H "Access-Key: ExampleAccessKey1234" -F chunk_file=@example.zip.1 -F chunk_no=0
Response
Status: 200 OK
{
"dataset_id": "sample_data",
"chunk_count": 100,
"num_uploaded": 1
}
Download dataset
URL
GET /download
Header
| Key |
Value |
| Access-Key |
YourAccessKey |
Parameters
| Name |
Type |
Required |
In |
Description |
| dataset |
Text |
Yes |
Query |
Specify dataset ID |
Code sample
Shell
curl "https://ml.api.utagoe.com/data/download?dataset=sample_data" -H "Access-Key: ExampleAccessKey1234" --output sample_data.zip
Response
Status: 200 OK
Get a list of dataset
URL
GET /list
Header
| Key |
Value |
| Access-Key |
YourAccessKey |
Parameters
| Name |
Type |
Required |
In |
Description |
| type |
Text |
|
Query |
Dataset format |
| since |
Text |
|
Query |
yyyymmdd |
| until |
Text |
|
Query |
yyyymmdd |
Code sample
Shell
curl "https://ml.api.utagoe.com/data/list?type=raw" -H "Access-Key: ExampleAccessKey1234"
Response
Status: 200 OK
{
"dataset_list": [
"sample_data"
]
}
Delete dataset
URL
POST /delete
Header
| Key |
Value |
| Content-Type |
application/json |
Parameters
| Name |
Type |
Required |
In |
Description |
| access_key |
Text |
Yes |
Body |
|
| dataset |
Text |
Yes |
Body |
Dataset ID |
Code sample
Shell
curl https://ml.api.utagoe.com/data/delete -H "Content-Type: application/json" --data-binary '{"access_key":"ExampleAccessKey1234", "dataset": "sample_data"}'
Response
Status: 200 OK
{}