Cloady Docs
API ReferenceEndpointsGit

Act on a development app's repository

One action per call: discard, stage, unstage, commit, checkout, merge, rebase, revert, cherry, pull or push. Commits live in the container and die with it unless pushed.

POST
/api/workspaces/{workspaceSlug}/apps/{appSlug}/git
AuthorizationBearer <token>

Personal API token (cldy_…)

In: header

Path Parameters

workspaceSlug*string
appSlug*string

Query Parameters

env?string

Value in

  • "production"
  • "preview"
  • "development"
region?string

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/api/workspaces/string/apps/string/git" \  -H "Content-Type: application/json" \  -d '{    "action": "discard",    "paths": [      "string"    ]  }'
{  "ok": true,  "branch": "string",  "branches": [    "string"  ],  "shallow": true,  "writable": true,  "ahead": 0,  "behind": 0,  "changes": [    {      "code": "string",      "path": "string",      "staged": true,      "add": 0,      "del": 0    }  ],  "commits": [    {      "sha": "string",      "subject": "string",      "author": "string",      "date": "string"    }  ]}