Create doc
开发环境
开发环境
POST
/docs
Docs
请求示例请求示例
Python
Shell
JavaScript
Java
curl --location --request POST 'http://dev-cn.your-api-server.com/docs' \
--header 'Content-Type: application/json' \
--data-raw '{
"title": "Project Tracker",
"sourceDoc": "iJKlm_noPq",
"timezone": "America/Los_Angeles",
"folderId": "fl-ABcdEFgHJi",
"initialPage": {
"pageContent": {
"canvasContent": {
"format": "html",
"content": "<p><b>This</b> is rich text</p>"
},
"type": "canvas"
},
"name": "Launch Status",
"subtitle": "See the status of launch-related tasks.",
"iconName": "rocket",
"imageUrl": "https://example.com/image.jpg",
"parentPageId": "canvas-tuVwxYz"
}
}'
响应示例响应示例
201 - 示例 1
{
"icon": {
"name": "string",
"type": "string",
"browserLink": "https://cdn.coda.io/icons/png/color/icon-32.png"
},
"docSize": {
"totalRowCount": 31337,
"tableAndViewCount": 42,
"pageCount": 10,
"overApiSizeLimit": false
},
"published": {
"mode": "view",
"description": "Hello World!",
"browserLink": "https://coda.io/@coda/hello-world",
"imageLink": "string",
"discoverable": true,
"earnCredit": true,
"categories": [
"Project Management"
]
},
"folder": {
"id": "fl-1Ab234",
"browserLink": "https://coda.io/docs?folderId=fl-1Ab234",
"name": "My docs",
"type": "folder"
},
"workspace": {
"id": "ws-1Ab234",
"organizationId": "org-2Bc456",
"browserLink": "https://coda.io/docs?workspaceId=ws-1Ab234",
"name": "My workspace",
"type": "workspace"
},
"id": "AbCDeFGH",
"href": "https://coda.io/apis/v1/docs/AbCDeFGH",
"browserLink": "https://coda.io/d/_dAbCDeFGH",
"name": "Product Launch Hub",
"owner": "user@example.com",
"ownerName": "Some User",
"createdAt": "2018-04-11T00:18:57.946Z",
"updatedAt": "2018-04-11T00:18:57.946Z",
"workspaceId": "ws-1Ab234",
"folderId": "fl-1Ab234",
"requestId": "abc-123-def-456",
"type": "doc",
"sourceDoc": {
"id": "AbCDeFGH",
"href": "https://coda.io/apis/v1/docs/AbCDeFGH",
"browserLink": "https://coda.io/d/_dAbCDeFGH",
"type": "doc"
}
}
请求参数
Body 参数application/json
返回响应
修改于 2024-03-20 08:13:15