欢迎您访问 最编程 本站为您分享编程语言代码,编程技术文章!
您现在的位置是: 首页

Fastone: 集群数据集中枢管理与导入导出功能,配备AK/SK权限控制

最编程 2024-07-27 15:54:17
...

1集群数据集管理

1.1新增数据集

POST  /api/v1/linkedDatasets

requestBody:
{
    "name": "test"
}

responseBody: 
{
    "id": 1,
    "name": "test",
    "type": "S3",
    "region": "north-west"
    "prefix": "test"
}

1.2绑定数据集

POST  /api/v1/linkedDatasets

requestBody:
{
  "name": "my-dataset",
  "prefix": "folder2"
}

responseBody:
{
  "id": 2,
  "name": "my-dataset",
  "type": "S3",
  "region": "north-west",
  "prefix": "folder2"
}

1.3查看指定数据集

GET  /api/v1/linkedDatasets/{id}

responseBody:
 {
  "id": 1,
  "name": "test",
  "type": "S3",
  "region": "north-west",
  "prefix": "test"
}

1.4查看当前用户下的所有数据集

GET  /api/v1/linkedDatasets

response:
[
    {
        "id": 1,
        "type": "S3",
        "region": "north-west",
        "name": "test",
        "prefix": "test"
    },
    {
        "id": 2,
        "type": "S3",
        "region": "north-west",
        "name": "my-dataset",
        "prefix": "folder2"
    }
]

1.5删除数据集

DELETE /api/v1/linkedDatasets/{id}

2.aksk

GET  /api/v1/users/{id}/aksk

response:
{
  "accessKey": "accessKey",
  "secretKey": "secretKey",
  "region": "north-west",
  "provider": "AWS"
}

3.数据集导入导出

3.1 导入或导出

POST  /api/v1/linkedDatasets/{id}/transaction

request:
{
    "transactionType": "IMPORT | EXPORT",
    "clusterPath": "/home",
    "clusterId": 2
}

3.2 导入导出状态

GET  /api/v1/linkedDatasets/{id}/transaction/status?clusterId=1&transactionType=IMPORT|EXPORT
{
    "state": "NONE | PROCESSING | COMPLETE | FAILED"
    "msg": "This is detail msg about dataset transaction"
}