上传文件
POST/resources/files
上传文件
History
Version | Changes |
---|---|
v3.14.117, v3.15.26 | Added in: v3.14.117, v3.15.26 |
Request
Query Parameters
teamID stringrequired
团队ID
- multipart/form-data
Body
required
文件信息
file binaryrequired
文件二进制内容
name stringrequired
Possible values: non-empty
and <= 255 characters
文件名称
Responses
- 200
- 401
- 403
- 404
- 500
请求成功
- application/json
- Schema
- Example (from schema)
Schema
data
object
token string
文件token
result string
本次请求结果,SUCCESS|FAIL
errorCode string
本次请求错误码
errorMsg string
本次请求错误信息
errorData object
本次请求错误元数据
[
{
"result": "SUCCESS",
"data": {
"token": "5f1f3b93"
}
},
{
"result": "FAIL",
"errorCode": "NotFound",
"errorMsg": "NotFound file"
}
]
如果身份验证凭据不正确或丢失,则返回
- application/json
- Schema
- Example (from schema)
Schema
result string
本次请求结果,SUCCESS|FAIL
errorCode string
本次请求错误码
errorMsg string
本次请求错误信息
{
"result": "FAIL",
"errorCode": "Unauthorized",
"errorMsg": "Access token is invalid"
}
如果scope检验不通过,则返回
- application/json
- Schema
- Example (from schema)
Schema
result string
本次请求结果,SUCCESS|FAIL
errorCode string
本次请求错误码
errorMsg string
本次请求错误信息
{
"result": "FAIL",
"errorCode": "Forbidden",
"errorMsg": "Scope is invalid"
}
如果未找到资源对象,则返回
- application/json
- Schema
- Example (from schema)
Schema
result string
本次请求结果,SUCCESS|FAIL
errorCode string
本次请求错误码
errorMsg string
本次请求错误信息
{
"result": "FAIL",
"errorCode": "NotFound",
"errorMsg": "Not Found"
}
内部服务器错误
- application/json
- Schema
- Example (from schema)
Schema
result string
本次请求结果,SUCCESS|FAIL
errorCode string
本次请求错误码
errorMsg string
本次请求错误信息
{
"result": "FAIL",
"errorCode": "Internal Server Error",
"errorMsg": "Internal Server Error"
}
Loading...