Authentication
Login Swan Platform to get the authorization token which is used to acquire an access key pair for login FS3.
Acquire Access Key Pair
GET
https://<access_url>/minio
This endpoint allows you to acquire an access key pair.
{
"data": {
"access_key": "<access_key>",
"access_url": "<access_url>",
"secret_key": "<secret_key>"
},
"status": "success"
}
{
"message": "Please provide a valid auth token.",
"status": "fail"
}
Login FS3
POST
https://<access_url>/minio/webrpc
This endpoint allows you to acquire a token which is designed to do authorization before performing any actions for safety consideration.
Request Body
{"jsonrpc":"2.0","result":{"token":"<bearer_token>","uiVersion":"2019-09-11T18:31:07Z"},"id":1}
Bucket Management
Get Bucket List
POST
https://<access_url>/minio/webrpc
This endpoint allows you to get a list of all buckets.
Request Body
{"jsonrpc":"2.0","result":{"buckets":[{"name":"<example1>","creationDate":"2021-06-07T01:19:38.758964923Z"},{"name":"<example2>","creationDate":"2021-07-08T23:55:02.836502071Z"}],"uiVersion":"2019-09-11T18:31:07Z"},"id":1}
Create Bucket
POST
https://<access_url>/minio/webrpc
This endpoint allows you to create a bucket.
Request Body
{"jsonrpc":"2.0","result":{"uiVersion":"2019-09-11T18:31:07Z"},"id":1}
Delete Bucket
POST
https://<access_url>/minio/webrpc
This endpoint allows you to delete the bucket you selected.
Request Body
{"jsonrpc":"2.0","result":{"uiVersion":"2019-09-11T18:31:07Z"},"id":1}
Get Bucket Policy List
POST
https://<access_url>/minio/webrpc
This endpoint allows you to get a list of policies of the bucket you selected.
Request Body
{"jsonrpc":"2.0","result":{"uiVersion":"2019-09-11T18:31:07Z","policies":[{"bucket":"<bucket_name>","prefix":"<policy_name>","policy":"<policy_type>"}]},"id":1}
Edit Bucket Policy
POST
https://<access_url>/minio/webrpc
This endpoint allows you to add or remove a policy of the bucket you selected.
Request Body
{"jsonrpc":"2.0","result":{"uiVersion":"2019-09-11T18:31:07Z"},"id":1}
Backup Bucket to Filecoin - online deal
POST
https://<access_url>/minio/deals/<bucket>
This endpoint allows you to backup the bucket you selected to Filecoin network as an online deal.
Request Body
{
"data": {
"filename": "~/minio-data/test_deals.zip",
"walletAddress": "h376xbytsd3jie6ermpw",
"verifiedDeal": "false",
"fastRetrieval": "true",
"dataCid": "bafk2bza5dgw6pubjodkscqpg",
"minerId": "t03354",
"price": "0.000005",
"duration": "518800",
"dealCid": "bafyreicvqh7krdhdnpkqwokze",
"timeStamp": "1629835134146540"
},
"status": "success",
"message": "success"
}
Backup Bucket to Filecoin - offline deal
POST
https://<access_url>/minio/offlinedeals/<bucket>
This endpoint allows you to backup the bucket you selected to Filecoin network as an offline deal.
Request Body
{
"data": {
"bucket_name": "test",
"deals": {
"data": {
"taskname": "test-name",
"filename": "be450523-52ed-44f9-9828-8e382c0d15c8.csv",
"uuid": "d2d79d42-6f79-46fe-97bd-cd6f69c25116"
},
"status": "success",
"message": "Task created successfully.A notification email has been sent to the storage provider"
}
},
"status": "success",
"message": "success"
}
Retrieve Bucket from Filecoin - online deal
GET
https://<access_url>/minio/bucket/retrieve/<bucket>
This endpoint allows you to retrieve the bucket you selected from Filecoin network.
{
"data": {
"bucket_name": "20210824",
"deals": [
{
"data": {
"filename": "~/minio-data/test_deals.zip",
"walletAddress": "t3u7pum2vzyasg7cimkpnojqd3jie6erm",
"verifiedDeal": "false",
"fastRetrieval": "true",
"dataCid": "bafykbvgxdpej7neeoqsnvuzppme",
"minerId": "t03354",
"price": "0.000005",
"duration": "518700",
"dealCid": "bafyrekm3lmusljgmvyriqid6kcaoed5kni",
"timeStamp": "1629816006709676"
},
"status": "success",
"message": "success"
},
{
"data": {
"filename": "~/minio-data/test_deals.zip",
"walletAddress": "t3u7khtadjzfydxxdanojqd3jie6ermpw",
"verifiedDeal": "false",
"fastRetrieval": "true",
"dataCid": "bafykbnvz5rgs7obwbfztqrr4ahwjue",
"minerId": "t03354",
"price": "0.000005",
"duration": "518800",
"dealCid": "bafyrgigdm4ppqzwt4vufm4m3pmuvolnfe",
"timeStamp": "1629833844752891"
},
"status": "success",
"message": "success"
}
]
},
"status": "success",
"message": "success"
}
Object Management
Get Objects List
POST
https://<access_url>/minio/webrpc
This endpoint allows you to get a list of all objects of the bucket you selected.
Request Body
{"jsonrpc":"2.0","result":{"objects":[{"name":"example_file","lastModified":"2021-06-07T01:19:38.758964923Z","size":0,"contentType":"application/octet-stream"}],"writable":true,"uiVersion":"2019-09-11T18:31:07Z"},"id":1}
Upload Object
PUT
https://<access_url>/minio/upload/<bucket>/<object>
This endpoint allows you to upload objects to the bucket you selected.
Request Body
Get URL Token
POST
https://<access_url>/minio/webrpc
This endpoint allows you to get a URL token for downloading objects.
Request Body
{"jsonrpc":"2.0","result":{"token":"<bearer_token>","uiVersion":"2019-09-11T18:31:07Z"},"id":1}
Download Objects
GET
https://<access_url>/minio/download/<bucket>/<object>
This endpoint allows you to download objects.
Path Parameters
Delete Object
POST
https://<access_url>/minio/webrpc
This endpoint allows you to delete the object you selected.
Request Body
{"jsonrpc":"2.0","result":{"uiVersion":"2019-09-11T18:31:07Z"},"id":1}
Share Object
POST
https://<access_url>/minio/webrpc
This endpoint allows you to share the object you selected.
Request Body
{"jsonrpc":"2.0","result":{"uiVersion":"2019-09-11T18:31:07Z","url":"<object_directory>?X-Amz-Algorithm=AWS4-HMAC-SHA256\u0026X-Amz-Credential=UBFSNUG8AZIII4XOMUTW%2F20210903%2F%2Fs3%2Faws4_request\u0026X-Amz-Date=20210903T182225Z\u0026X-Amz-Expires=<expiry_time>\u0026X-Amz-SignedHeaders=host\u0026X-Amz-Signature=d35eb873a0c3bb0ea316c550b6259ce5f5eb7ba08da8a5c813721eae1f654b78"},"id":1}
Backup Object to Filecoin - online deal
POST
https://<access_url>/minio/deal/<bucket>/<object>
This endpoint allows you to backup the object you selected to Filecoin network.
Request Body
{
"data": {
"filename": "~/minio-data/test/waymo.zip",
"walletAddress": "wabkhtadjzfydxxda2vzyasg7cimd3jie6ermpw",
"verifiedDeal": "false",
"fastRetrieval": "true",
"dataCid": "bafykbzaceb5cfdrbg45khvhk4mza6",
"minerId": "t03354",
"price": "0.000005",
"duration": "1036700", //epochs
"dealCid": "bafyreicmqtttadqdksrqvunxhcgvfvb47m",
"timeStamp": "1628025191856290" //miliseconds
},
"status": "success",
"message": "success"
}
Retrieve Object from Filecoin - online deal
GET
https://<access_url>/minio/retrieve/<bucket>/<object>
This endpoint allows you to retrieve the object you selected from Filecoin network.
{
"data": {
"file_name": "waymo.zip",
"deals": [
{
"data": {
"filename": "~/minio-data/test/waymo.zip",
"walletAddress": "5wabkhtadjzfydxxdq66j4dubbhwpnojqd3jmpw",
"verifiedDeal": "false",
"fastRetrieval": "true",
"dataCid": "bafykbzaceb5cfdpdupjd4mza6",
"minerId": "t03354",
"price": "0.000005",
"duration": "1036700",
"dealCid": "bafyreicmm2g654",
"timeStamp": "1628025191856290"
},
"status": "success",
"message": "success"
},
{
"data": {
"filename": "~/minio-data/testre/waymo.zip",
"walletAddress": "5wabkhtadjzfydxxda2vzyasg7cimkcphswrq66j4dubbhwpnoj",
"verifiedDeal": "false",
"fastRetrieval": "true",
"dataCid": "bafykbzaceb5cfdpdupjd4mza6",
"minerId": "t03354",
"price": "0.000005",
"duration": "1036700",
"dealCid": "bafyreijg227wlo4bge76bcxk7cw",
"timeStamp": "1628026238100552"
},
"status": "success",
"message": "success"
}
]
},
"status": "success",
"message": "success"
}
General Settings
Change Password
POST
https://<access_url>/minio/webrpc
This endpoint allows you to change password.
Request Body
Get Storage Info
POST
https://<access_url>/minio/webrpc
This endpoint allows you to get storage information.
Request Body
{"jsonrpc":"2.0","result":{"storageInfo":{"Used":653465,"Total":7537270108160,"Available":4140889018368,"Backend":{"Type":1,"OnlineDisks":0,"OfflineDisks":0,"StandardSCData":0,"StandardSCParity":0,"RRSCData":0,"RRSCParity":0,"Sets":null}},"uiVersion":"2019-09-11T18:31:07Z"},"id":1}
Get Server Info
POST
https://<access_url>/minio/webrpc
Request Body
{"jsonrpc":"2.0","result":{"MinioVersion":"2019-09-11T18:33:15Z","MinioMemory":"Used: 6.8 MB | Allocated: 3.7 GB | Used-Heap: 6.8 MB | Allocated-Heap: 65 MB","MinioPlatform":"Host: 2f245ecded89 | OS: linux | Arch: amd64","MinioRuntime":"Version: go1.13 | CPUs: 24","MinioGlobalInfo":{"isBrowserEnabled":true,"isDistXL":false,"isEnvBrowser":false,"isEnvCreds":false,"isEnvRegion":false,"isSSL":false,"isWorm":false,"isXL":false,"serverRegion":""},"MinioUserInfo":{"isIAMUser":false},"uiVersion":"2019-09-11T18:31:07Z"},"id":1}
Last updated