API 参考EndpointsGit
Read a patch from a development app's repository
With no `sha`, diffs the working tree. `path` narrows it to one file. Large patches come back with `truncated: true`.
Authorization
cloady AuthorizationBearer <token>
Personal API token (cldy_…)
In: header
Path Parameters
workspaceSlug*string
appSlug*string
Query Parameters
sha?string
path?string
env?string
Value in
- "production"
- "preview"
- "development"
region?string
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/workspaces/string/apps/string/git/diff"{ "ok": true, "commit": { "sha": "string", "subject": "string", "author": "string", "date": "string" }, "files": [ { "path": "string", "status": "string", "add": 0, "del": 0 } ], "patch": "string", "truncated": true}Pull Git changes POST
Fetch the current branch's upstream and fast-forward to it. Fails when the branches have diverged or uncommitted changes would be overwritten. A GitHub remote is read with the workspace's GitHub App installation; any other host is read without credentials. Works only on a development app: any other app answers 403 `read_only`. Runs git in the app's running container and returns its output.
Get the authenticated user GET
下一页