Coda
  1. Packs
Coda
  • Permissions
    • Get sharing metadata
    • Delete permission
    • Search principals
    • Get ACL settings
    • Update ACL settings
    • List permissions
    • Add permission
  • Pages
    • Content export status
    • List pages
    • Create a page
    • Begin content export
    • Get a page
    • Delete a page
    • Update a page
  • Tables
    • List tables
    • Get a table
  • Columns
    • List columns
    • Get a column
  • Rows
    • Push a button
    • List table rows
    • Insert/upsert rows
    • Delete multiple rows
    • Get a row
    • Delete row
    • Update row
  • Formulas
    • List formulas
    • Get a formula
  • Controls
    • List controls
    • Get a control
  • CustomDocDomains
    • List custom doc domains
    • Add custom domain
    • Deletes a custom domain
    • Updates a custom domain
    • Gets custom doc domains providers
  • Miscellaneous
    • Resolve browser link
    • Get mutation status
  • Automations
    • Trigger automation
  • Analytics
    • List doc analytics
    • List page analytics
    • Get doc analytics summary
    • List Pack analytics
    • Get Pack analytics summary
    • Get analytics last updated day
    • List Pack formula analytics
  • Workspaces
    • List workspace users
    • List workspace roles
    • Updates user role
  • Packs
    • List Packs
      GET
    • Create Pack
      POST
    • Gets the JSON Schema for Pack configuration.
      GET
    • List the versions for a Pack.
      GET
    • Get the next valid version for a Pack.
      POST
    • Get the difference between two pack versions.
      GET
    • Register Pack version
      POST
    • Pack version upload complete
      POST
    • Create a new Pack release.
      POST
    • List the releases for a Pack.
      GET
    • Update an existing Pack release.
      PUT
    • Set the OAuth configurations of the Pack.
      PUT
    • Retrieve the OAuth configuration of the Pack.
      GET
    • List permissions for a Pack
      GET
    • Add a permission for Pack
      POST
    • Delete a permission for Pack
      DELETE
    • List makers for Pack
      GET
    • Add a maker for Pack
      POST
    • Delete a maker for Pack
      DELETE
    • List categories for Pack
      GET
    • Add a category for Pack
      POST
    • Delete a category for Pack
      DELETE
    • Upload a Pack asset.
      POST
    • Upload Pack source code.
      POST
    • Pack asset upload complete
      POST
    • Pack source code upload complete
      POST
    • get the source code for a Pack version.
      GET
    • List the Pack listings accessible to a user.
      GET
    • Get detailed listing information for a Pack.
      GET
    • List featured docs for a Pack
      GET
    • Update featured docs for a Pack
      PUT
    • Get a single Pack
      GET
    • Update Pack
      PATCH
    • Delete Pack
      DELETE
    • Set the system connection credentials of the Pack.
      PUT
    • Patch the system connection credentials of the Pack.
      PATCH
    • Retrieve the system connection metadata of the Pack.
      GET
    • Retrieve the logs of a Pack.
      GET
    • Retrieve the grouped logs of a Pack.
      GET
  • Publishing
    • Get doc categories
    • Unpublish doc
    • Publish doc
  • Docs
    • Get info about a doc
    • Delete doc
    • Update doc
    • Create doc
    • List available docs
  • Account
    • Get user info
  1. Packs

Upload a Pack asset.

开发环境
http://dev-cn.your-api-server.com
开发环境
http://dev-cn.your-api-server.com
POST
/packs/{packId}/uploadAsset
Packs
Request a signed s3 URL to upload your Pack asset.
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'http://dev-cn.your-api-server.com/packs/123/uploadAsset' \
--header 'Content-Type: application/json' \
--data-raw '{
    "packAssetType": "logo",
    "imageHash": "f0e4c2f76c58916ec258f246851bea091d14d4247a2fc3e18694461b1816e13b",
    "mimeType": "image/jpeg",
    "filename": "image.jpg"
}'
响应示例响应示例
200 - 示例 1
{
    "uploadUrl": "https://coda-us-west-2-prod-blobs-upload.s3-accelerate.amazonaws.com/packs/123/assets/logo/e23fcb5e564f08b71183d424c2c380c0",
    "packAssetUploadedPathName": "/packs/123/assets/e23fcb5e564f08b71183d424c2c380c0",
    "headers": "{\"header1\": \"value1\"}"
}

请求参数

Path 参数
packId
integer 
必需
ID of a Pack
>= 1
示例值:
123
Body 参数application/json
Payload for a Pack asset upload.
packAssetType
enum<string> 
必需
枚举值:
logocoverexampleImage
imageHash
string 
必需
The SHA-256 hash of the image to be uploaded.
示例值:
f0e4c2f76c58916ec258f246851bea091d14d4247a2fc3e18694461b1816e13b
mimeType
string 
必需
The media type of the image being sent.
示例值:
image/jpeg
filename
string 
必需
示例值:
image.jpg
示例

返回响应

🟢200The information indicating where to upload the Pack asset.
application/json
Body
Information indicating where to upload the Pack asset, and an endpoint to mark the upload as complete.
uploadUrl
string <url>
必需
A signed URL to be used for uploading a Pack asset.
示例值:
https://coda-us-west-2-prod-blobs-upload.s3-accelerate.amazonaws.com/packs/123/assets/logo/e23fcb5e564f08b71183d424c2c380c0
packAssetUploadedPathName
string 
必需
An endpoint to mark the upload as complete.
示例值:
/packs/123/assets/e23fcb5e564f08b71183d424c2c380c0
headers
object 
必需
Key-value pairs of authorization headers to include in the upload request.
示例值:
{"header1": "value1"}
额外字段
string 
可选
🟠400400
🟠401401
🟠403403
🟠404404
🟠429429
修改于 2024-03-20 08:13:15
上一页
Delete a category for Pack
下一页
Upload Pack source code.
Built with