MinIO Plus API 文档
简介:MinIO Plus API 文档
HOST:mpdemo.liuxp.me
联系人:刘小平
Version:1.0.0
接口路径:/v2/api-docs
[TOC]
MinIO Plus Demo 接口
文件下载
接口地址:/storage/download/{fileKey}
请求方式:GET
请求数据类型:application/x-www-form-urlencoded
响应数据类型:*/*
接口描述:
请求参数:
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
|---|---|---|---|---|---|
| fileKey | fileKey | path | true | string |
响应状态:
| 状态码 | 说明 | schema |
|---|---|---|
| 200 | OK | |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Not Found |
响应参数:
暂无
响应示例:
获取图标
接口地址:/storage/icon/{fileType}
请求方式:GET
请求数据类型:application/x-www-form-urlencoded
响应数据类型:*/*
接口描述:
请求参数:
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
|---|---|---|---|---|---|
| fileType | fileType | path | true | string |
响应状态:
| 状态码 | 说明 | schema |
|---|---|---|
| 200 | OK | |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Not Found |
响应参数:
暂无
响应示例:
图片预览 - 原图
接口地址:/storage/image/{fileKey}
请求方式:GET
请求数据类型:application/x-www-form-urlencoded
响应数据类型:*/*
接口描述:
请求参数:
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
|---|---|---|---|---|---|
| fileKey | fileKey | path | true | string |
响应状态:
| 状态码 | 说明 | schema |
|---|---|---|
| 200 | OK | |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Not Found |
响应参数:
暂无
响应示例:
图片预览 - 缩略图
接口地址:/storage/preview/{fileKey}
请求方式:GET
请求数据类型:application/x-www-form-urlencoded
响应数据类型:*/*
接口描述:
请求参数:
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
|---|---|---|---|---|---|
| fileKey | fileKey | path | true | string |
响应状态:
| 状态码 | 说明 | schema |
|---|---|---|
| 200 | OK | |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Not Found |
响应参数:
暂无
响应示例:
上传完成
接口地址:/storage/upload/complete/{fileKey}
请求方式:POST
请求数据类型:application/json
响应数据类型:*/*
接口描述:
请求示例:
{
"partMd5List": []
}
请求参数:
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
|---|---|---|---|---|---|
| fileCompleteDTO | fileCompleteDTO | body | true | 文件完成入参DTO | 文件完成入参DTO |
| partMd5List | 文件md5 | true | array | string | |
| fileKey | fileKey | path | true | string |
响应状态:
| 状态码 | 说明 | schema |
|---|---|---|
| 200 | OK | Response«object» |
| 201 | Created | |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Not Found |
响应参数:
| 参数名称 | 参数说明 | 类型 | schema |
|---|---|---|---|
| code | 状态码 | integer(int32) | integer(int32) |
| data | 响应业务参数 | object | |
| message | 操作成功 | string |
响应示例:
{
"code": 0,
"data": {},
"message": ""
}
上传任务初始化
接口地址:/storage/upload/init
请求方式:POST
请求数据类型:application/json
响应数据类型:*/*
接口描述:
请求示例:
{
"fileMd5": "",
"fileSize": 0,
"fullFileName": "",
"isPrivate": true
}
请求参数:
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
|---|---|---|---|---|---|
| fileCheckDTO | fileCheckDTO | body | true | 文件预检查入参DTO | 文件预检查入参DTO |
| fileMd5 | 文件md5 | true | string | ||
| fileSize | 文件长度 | true | integer(int64) | ||
| fullFileName | 文件名(含扩展名) | true | string | ||
| isPrivate | 是否私有 false:否 true:是 | false | boolean |
响应状态:
| 状态码 | 说明 | schema |
|---|---|---|
| 200 | OK | Response«文件初始化结果» |
| 201 | Created | |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Not Found |
响应参数:
| 参数名称 | 参数说明 | 类型 | schema |
|---|---|---|---|
| code | 状态码 | integer(int32) | integer(int32) |
| data | 响应业务参数 | 文件初始化结果 | 文件初始化结果 |
| fileKey | 文件KEY | string | |
| fileMd5 | 文件md5 | string | |
| fileMimeType | MIME类型 | string | |
| fileName | 文件名 | string | |
| fileSize | 文件长度 | integer(int64) | |
| fileSuffix | 文件后缀 | string | |
| id | 主键 | integer(int64) | |
| isDone | 是否秒传 | boolean | |
| partCount | 分块数量 | integer(int32) | |
| partList | 分块信息 | array | Part |
| endPosition | 结束位置 | integer | |
| startPosition | 开始位置 | integer | |
| uploadId | minio的上传id | string | |
| url | 上传地址 | string | |
| partSize | 分块大小 | integer(int32) | |
| message | 操作成功 | string |
响应示例:
{
"code": 0,
"data": {
"fileKey": "",
"fileMd5": "",
"fileMimeType": "",
"fileName": "",
"fileSize": 0,
"fileSuffix": "",
"id": 0,
"isDone": true,
"partCount": 0,
"partList": [
{
"endPosition": 0,
"startPosition": 0,
"uploadId": "",
"url": ""
}
],
"partSize": 0
},
"message": ""
}
文件预分片
接口地址:/storage/upload/sharding
请求方式:POST
请求数据类型:application/json
响应数据类型:*/*
接口描述:
请求示例:
{
"fileSize": 0
}
请求参数:
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
|---|---|---|---|---|---|
| preShardingDTO | preShardingDTO | body | true | 文件预分片入参DTO | 文件预分片入参DTO |
| fileSize | 文件长度 | true | integer(int64) |
响应状态:
| 状态码 | 说明 | schema |
|---|---|---|
| 200 | OK | Response«文件预分片结果» |
| 201 | Created | |
| 401 | Unauthorized | |
| 403 | Forbidden | |
| 404 | Not Found |
响应参数:
| 参数名称 | 参数说明 | 类型 | schema |
|---|---|---|---|
| code | 状态码 | integer(int32) | integer(int32) |
| data | 响应业务参数 | 文件预分片结果 | 文件预分片结果 |
| fileSize | 文件长度 | integer(int64) | |
| partCount | 分块数量 | integer(int32) | |
| partList | 分块信息 | array | Part_1 |
| endPosition | 结束位置 | integer | |
| startPosition | 开始位置 | integer | |
| partSize | 分块大小 | integer(int32) | |
| message | 操作成功 | string |
响应示例:
{
"code": 0,
"data": {
"fileSize": 0,
"partCount": 0,
"partList": [
{
"endPosition": 0,
"startPosition": 0
}
],
"partSize": 0
},
"message": ""
}


