Skip to main content
PATCH
/
v1
/
projects
/
{projectId}
/
setup
Update setup
curl --request PATCH \
  --url https://capy.ai/api/v1/projects/{projectId}/setup \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "repositories": [
    {
      "repository": "<string>",
      "branch": "<string>",
      "scripts": {
        "initialize": "<string>",
        "updateAfterCheckout": "<string>",
        "startup": "<string>"
      },
      "commands": [
        {
          "name": "<string>",
          "command": "<string>"
        }
      ],
      "timeouts": {
        "initialize": 1830,
        "updateAfterCheckout": 1830,
        "startup": 1830
      }
    }
  ],
  "hooks": {
    "pre": {},
    "post": {},
    "context": {
      "maxOutputLength": 123
    }
  }
}
'
{
  "legacyHooks": {
    "repositories": [
      "<string>"
    ],
    "checkComplete": true
  },
  "legacyWarmPool": {
    "enabled": true,
    "hasSetupCommands": true
  },
  "setup": {
    "repositories": [
      {
        "repository": "<string>",
        "branch": "<string>",
        "scripts": {
          "initialize": "<string>",
          "updateAfterCheckout": "<string>",
          "startup": "<string>"
        },
        "commands": [
          {
            "name": "<string>",
            "command": "<string>"
          }
        ],
        "timeouts": {
          "initialize": 1830,
          "updateAfterCheckout": 1830,
          "startup": 1830
        }
      }
    ],
    "hooks": {
      "pre": {},
      "post": {},
      "context": {
        "maxOutputLength": 123
      }
    }
  }
}

Authorizations

Authorization
string
header
required

API token (capy_xxxx). Generate at capy.ai/settings/tokens

Path Parameters

projectId
string
required

Project ID.

Query Parameters

replaceLegacyHooks
boolean

Set to true to confirm that saving Setup replaces active deprecated .capy/settings.json hooks for future runs.

Body

application/json
repositories
object[]
required
vmSize
enum<string>
Available options:
small,
medium,
large,
ultra,
hyper
hooks
object

Response

Success

source
enum<string>
required
Available options:
legacy,
setup,
none
legacyHooks
object
required
legacyWarmPool
object
required
setup
object
required