1. 新增操作 POST /api/v0/storage/operations
1.1 COPY
request ->
{
"sourceStorageId": 1,
"sourceDirectory": "/home",
"sourceFiles": ["foo.txt", "foo.zip"],
"targetStorageId": 2,
"targetDirectory": "/test",
"operation": "COPY"
}
2. count操作状态 GET /api/v0/storage/operations/group/state/count
{
"RUNNING": 2,
"COMPLETE": 8,
"QUEUED": 5,
"FAILED": 1
}
3. 操作记录 GET /api/v0/storage/operations
{
"content": [
{
"id": 1,
"sourceStorageId": 1,
"sourceDirectory": "/home/fastone",
"operateFiles": ["aaa", "vvv", "bbb"],
"operation": "MOVE",
"targetStorageId": 2,
"targetDirectory": "/home/test",
"targetFiles": ["aaa", "vvv", "bbb"],
"start": "2012",
"end": "2018",
"state": "COMPLETE"
},{
"id": 1,
"sourceStorageId": 1,
"sourceDirectory": "/home/fastone",
"operateFiles": ["aaa", "vvv", "bbb"],
"operation": "PACK",
"targetStorageId": 2,
"targetDirectory": "/home/test",
"targetFiles": ["fastone.zip"],
"start": "2012",
"end": "2018",
"state": "COMPLETE"
}
],
"pageable": {
"sort": {
"unsorted": false,
"sorted": true,
"empty": false
},
"pageNumber": 0,
"pageSize": 1000,
"offset": 0,
"paged": true,
"unpaged": false
},
"totalPages": 1,
"totalElements": 6,
"last": true,
"first": true,
"number": 0,
"sort": {
"unsorted": false,
"sorted": true,
"empty": false
},
"numberOfElements": 6,
"size": 1000,
"empty": false
}
网友评论