获取提交附件上传地址。Get commit asset upload URL.
为指定提交生成附件上传的预签名 URL。返回上传地址(upload_url)、过期时间及上传确认地址(verify_url)。 Generate a pre-signed URL for uploading an asset to the specified commit. Returns the upload URL, expiration time, and upload confirmation URL. 上传流程为:先调用此接口获取上传地址,然后将文件 PUT 到上传地址,最后调用确认接口完成上传。 Upload process: first call this endpoint to get the upload URL, then PUT the file to the upload URL, and finally call the confirmation endpoint to complete the upload. 通过 ttl 参数可设置附件保留天数。 Use the ttl parameter to set the number of days to retain the asset. 访问令牌调用此接口需包含以下权限。Required permissions for access token. repo-code:rw
Request
- Base URL: https://api.cnb.cool (the document declares no server; this is the origin it was published from)
- URL: https://api.cnb.cool/{repo}/-/git/commit-assets/{sha1}/asset-upload-url
- Auth: API key in header Authorization
Path parameters
不带.git后缀的仓库名称。格式:组织名称/仓库名称。Repository name without .git suffix. Format: org/repo.
提交的哈希值。Commit hash.
Request body
Response
Created
Changes
No recorded changes to this operation across all 1 revision of this API.