创建任务
POST/wiki/convert/tasks
History
Version | Changes |
---|---|
v6.15.0 | Added in v6.15.0 |
创建导入、导出任务。
不同的页面类型支持不同的导出格式,如下:
页面类型 | 导出格式 |
---|---|
default | pdf,docx |
collaboration | pdf,png,markdown |
word | pdf,docx |
excel | pdf,xlsx |
ppt | pdf,pptx |
collaborationPlugin | 无限制,支持的格式由插件定义 |
Request
Query Parameters
teamID stringrequired
团队ID
requestUserID string
用户 ID,此参数仅在作为 Oauth 机器人调用时才能传递。它用于以指定用户的身份执行操作
- application/json
Body
required
- MOD1
taskType string
Possible values: [ExportPage
]
任务类型
payload
object
任务参数
oneOf
taskType 为 ExportPage 时的参数
pageID string
页面 ID
format string
Possible values: [pdf
, png
, docx
, xlsx
, pptx
, markdown
]
导出格式
hideTitle boolean
导出为 png 时有效,是否隐藏标题
width integer
Possible values: <= 2560
Default value: 1280
导出为 png 时有效,宽度
height integer
Possible values: <= 1600
Default value: 800
导出为 png 时有效,高度
Responses
- 200
- 401
- 403
- 404
- 500
创建成功
- application/json
- Schema
- Example (from schema)
Schema
data
object
id string
任务 ID
result string
本次请求结果,SUCCESS|FAIL
errorCode string
本次请求错误码
errorMsg string
本次请求错误信息
errorData object
本次请求错误元数据
{
"data": {
"id": "string"
},
"result": "string",
"errorCode": "string",
"errorMsg": "string",
"errorData": {}
}
如果身份验证凭据不正确或丢失,则返回
- 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...