Skip to content
CADCAMFUN
Docs

Documentation

History and workflows

Project Git-compatible commits, branches, restores, reviews, GitHub mirroring, and workflow dispatch.

Playground

Send these requests to your own running sidecar. Values stay in this browser.

Not connected
How this works

The sidecar listens on a loopback port chosen at startup and prints it in its ready line; use that URL and the CADCAMFUN_TOKEN it was started with. Requests go straight from this page to that address.

The sidecar sends CORS headers only to the Tauri origins and to http://localhost or http://127.0.0.1 on any port. From the hosted docs the browser blocks the response, so run the docs locally (bun run dev in packages/web) to use the playground, or copy the request as curl. To experiment without touching real data, start the sidecar with CADCAMFUN_DATA_DIR pointed at a throwaway directory — see the API walkthrough.

Operations

22 endpoints in the vcs group, generated from the sidecar's own OpenAPI document. Protected operations take Authorization: Bearer $CADCAMFUN_TOKEN; see authentication. Behaviour and limits are in the subsystem guide.

get /api/projects/{id}/vcs/status vcs.status
get /api/projects/{id}/vcs/log vcs.log
post /api/projects/{id}/vcs/commit vcs.commit
get /api/projects/{id}/vcs/branches vcs.branches
post /api/projects/{id}/vcs/branches vcs.createBranch
post /api/projects/{id}/vcs/checkout vcs.checkout
post /api/projects/{id}/vcs/restore vcs.restore
get /api/projects/{id}/vcs/diff vcs.diff
get /api/projects/{id}/pulls vcs.listPullRequests
post /api/projects/{id}/pulls vcs.openPullRequest
get /api/projects/{id}/pulls/{number} vcs.pullRequest
post /api/projects/{id}/pulls/{number}/reviews vcs.review
post /api/projects/{id}/pulls/{number}/merge vcs.mergePullRequest
post /api/projects/{id}/pulls/{number}/close vcs.closePullRequest
get /api/projects/{id}/vcs/remote vcs.remote
put /api/projects/{id}/vcs/remote vcs.setRemote
post /api/projects/{id}/vcs/push vcs.push
post /api/projects/{id}/vcs/pull vcs.pull
get /api/projects/{id}/actions/runs vcs.runs
post /api/projects/{id}/actions/dispatch vcs.dispatch
get /api/projects/{id}/actions/workflows vcs.listWorkflows
get /api/projects/{id}/actions/workflows/{name} vcs.workflow
History and workflows operations in 3D Drag to orbit · scroll to zoom · right-drag to pan
One block per operation (22), stacked per resource section of this page and coloured by method: green GET, orange POST, blue PUT, violet PATCH, red DELETE. Generated from the OpenAPI document at build time.

/api/projects

get /api/projects/{id}/vcs/status # vcs.status

Requires Authorization: Bearer <token>.

Parameters
NameInTypeRequired
id path string required
Responses
200 object application/json
{
  branch: string
  head: string | null
  dirty: string[]
}
400 BadRequestEncoded application/json
BadRequestEncoded
401 UnauthorizedEncoded application/json
UnauthorizedEncoded
403 ForbiddenEncoded application/json
ForbiddenEncoded
404 NotFoundEncoded application/json
NotFoundEncoded
409 ConflictEncoded application/json
ConflictEncoded
500 InternalErrorEncoded application/json
InternalErrorEncoded
SDK example
vcs.status
import { CadCam } from "@cadcamfun/api/sdk"

const client = CadCam.make({
  baseUrl: process.env.CADCAMFUN_URL!,
  headers: { authorization: `Bearer ${process.env.CADCAMFUN_TOKEN}` },
})

// VcsStatusInput
const result = await client.vcs.status({
  id: "<id>"
})
curl
GET /api/projects/{id}/vcs/status
curl --request GET "${CADCAMFUN_URL}/api/projects/<id>/vcs/status" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}"
Try it
get /api/projects/{id}/vcs/log # vcs.log

Requires Authorization: Bearer <token>.

Parameters
NameInTypeRequired
id path string required
rev query string | null optional
limit query string | null optional
path query string | null optional
Responses
200 Array<object> application/json
Array<{
  oid: string
  parents: string[]
  message: string
  author: {
    name: string
    email: string
    time: number | "Infinity" | "-Infinity" | "NaN"
  }
}>
400 BadRequestEncoded application/json
BadRequestEncoded
401 UnauthorizedEncoded application/json
UnauthorizedEncoded
403 ForbiddenEncoded application/json
ForbiddenEncoded
404 NotFoundEncoded application/json
NotFoundEncoded
409 ConflictEncoded application/json
ConflictEncoded
500 InternalErrorEncoded application/json
InternalErrorEncoded
SDK example
vcs.log
import { CadCam } from "@cadcamfun/api/sdk"

const client = CadCam.make({
  baseUrl: process.env.CADCAMFUN_URL!,
  headers: { authorization: `Bearer ${process.env.CADCAMFUN_TOKEN}` },
})

// VcsLogInput
const result = await client.vcs.log({
  id: "<id>"
})
curl
GET /api/projects/{id}/vcs/log
curl --request GET "${CADCAMFUN_URL}/api/projects/<id>/vcs/log" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}"
Try it
post /api/projects/{id}/vcs/commit # vcs.commit

Requires Authorization: Bearer <token>.

Parameters
NameInTypeRequired
id path string required
Request body · required · application/json
{
  message: string
  authorKind?: "user" | "ai" | null
  files?: {
    [key: string]: string
  } | null
}
Responses
201 object application/json
{
  oid: string
  parents: string[]
  message: string
  author: {
    name: string
    email: string
    time: number | "Infinity" | "-Infinity" | "NaN"
  }
}
400 BadRequestEncoded application/json
BadRequestEncoded
401 UnauthorizedEncoded application/json
UnauthorizedEncoded
403 ForbiddenEncoded application/json
ForbiddenEncoded
404 NotFoundEncoded application/json
NotFoundEncoded
409 ConflictEncoded application/json
ConflictEncoded
500 InternalErrorEncoded application/json
InternalErrorEncoded
SDK example
vcs.commit
import { CadCam } from "@cadcamfun/api/sdk"

const client = CadCam.make({
  baseUrl: process.env.CADCAMFUN_URL!,
  headers: { authorization: `Bearer ${process.env.CADCAMFUN_TOKEN}` },
})

// VcsCommitInput
const result = await client.vcs.commit({
  id: "<id>",
  message: "",
  authorKind: "user",
  files: {}
})
curl
POST /api/projects/{id}/vcs/commit
curl --request POST "${CADCAMFUN_URL}/api/projects/<id>/vcs/commit" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}" \
  --header "Content-Type: application/json" \
  --data-binary @request.json
Try it
get /api/projects/{id}/vcs/branches # vcs.branches

Requires Authorization: Bearer <token>.

Parameters
NameInTypeRequired
id path string required
Responses
200 object application/json
{
  current: string
  branches: {
    [key: string]: string
  }
}
400 BadRequestEncoded application/json
BadRequestEncoded
401 UnauthorizedEncoded application/json
UnauthorizedEncoded
403 ForbiddenEncoded application/json
ForbiddenEncoded
404 NotFoundEncoded application/json
NotFoundEncoded
409 ConflictEncoded application/json
ConflictEncoded
500 InternalErrorEncoded application/json
InternalErrorEncoded
SDK example
vcs.branches
import { CadCam } from "@cadcamfun/api/sdk"

const client = CadCam.make({
  baseUrl: process.env.CADCAMFUN_URL!,
  headers: { authorization: `Bearer ${process.env.CADCAMFUN_TOKEN}` },
})

// VcsBranchesInput
const result = await client.vcs.branches({
  id: "<id>"
})
curl
GET /api/projects/{id}/vcs/branches
curl --request GET "${CADCAMFUN_URL}/api/projects/<id>/vcs/branches" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}"
Try it
post /api/projects/{id}/vcs/branches # vcs.createBranch

Requires Authorization: Bearer <token>.

Parameters
NameInTypeRequired
id path string required
Request body · required · application/json
{
  name: string
  from?: string | null
}
Responses
201 object application/json
{
  current: string
  branches: {
    [key: string]: string
  }
}
400 BadRequestEncoded application/json
BadRequestEncoded
401 UnauthorizedEncoded application/json
UnauthorizedEncoded
403 ForbiddenEncoded application/json
ForbiddenEncoded
404 NotFoundEncoded application/json
NotFoundEncoded
409 ConflictEncoded application/json
ConflictEncoded
500 InternalErrorEncoded application/json
InternalErrorEncoded
SDK example
vcs.createBranch
import { CadCam } from "@cadcamfun/api/sdk"

const client = CadCam.make({
  baseUrl: process.env.CADCAMFUN_URL!,
  headers: { authorization: `Bearer ${process.env.CADCAMFUN_TOKEN}` },
})

// VcsCreateBranchInput
const result = await client.vcs.createBranch({
  id: "<id>",
  name: "",
  from: ""
})
curl
POST /api/projects/{id}/vcs/branches
curl --request POST "${CADCAMFUN_URL}/api/projects/<id>/vcs/branches" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}" \
  --header "Content-Type: application/json" \
  --data-binary @request.json
Try it
post /api/projects/{id}/vcs/checkout # vcs.checkout

Requires Authorization: Bearer <token>.

Parameters
NameInTypeRequired
id path string required
Request body · required · application/json
{
  branch: string
}
Responses
200 object application/json
{
  branch: string
  head: string | null
  dirty: string[]
}
400 BadRequestEncoded application/json
BadRequestEncoded
401 UnauthorizedEncoded application/json
UnauthorizedEncoded
403 ForbiddenEncoded application/json
ForbiddenEncoded
404 NotFoundEncoded application/json
NotFoundEncoded
409 ConflictEncoded application/json
ConflictEncoded
500 InternalErrorEncoded application/json
InternalErrorEncoded
SDK example
vcs.checkout
import { CadCam } from "@cadcamfun/api/sdk"

const client = CadCam.make({
  baseUrl: process.env.CADCAMFUN_URL!,
  headers: { authorization: `Bearer ${process.env.CADCAMFUN_TOKEN}` },
})

// VcsCheckoutInput
const result = await client.vcs.checkout({
  id: "<id>",
  branch: ""
})
curl
POST /api/projects/{id}/vcs/checkout
curl --request POST "${CADCAMFUN_URL}/api/projects/<id>/vcs/checkout" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}" \
  --header "Content-Type: application/json" \
  --data-binary @request.json
Try it
post /api/projects/{id}/vcs/restore # vcs.restore

Requires Authorization: Bearer <token>.

Parameters
NameInTypeRequired
id path string required
Request body · required · application/json
{
  rev: string
  paths?: string[] | null
}
Responses
200 object application/json
{
  oid: string
  parents: string[]
  message: string
  author: {
    name: string
    email: string
    time: number | "Infinity" | "-Infinity" | "NaN"
  }
}
400 BadRequestEncoded application/json
BadRequestEncoded
401 UnauthorizedEncoded application/json
UnauthorizedEncoded
403 ForbiddenEncoded application/json
ForbiddenEncoded
404 NotFoundEncoded application/json
NotFoundEncoded
409 ConflictEncoded application/json
ConflictEncoded
500 InternalErrorEncoded application/json
InternalErrorEncoded
SDK example
vcs.restore
import { CadCam } from "@cadcamfun/api/sdk"

const client = CadCam.make({
  baseUrl: process.env.CADCAMFUN_URL!,
  headers: { authorization: `Bearer ${process.env.CADCAMFUN_TOKEN}` },
})

// VcsRestoreInput
const result = await client.vcs.restore({
  id: "<id>",
  rev: "",
  paths: [
    ""
  ]
})
curl
POST /api/projects/{id}/vcs/restore
curl --request POST "${CADCAMFUN_URL}/api/projects/<id>/vcs/restore" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}" \
  --header "Content-Type: application/json" \
  --data-binary @request.json
Try it
get /api/projects/{id}/vcs/diff # vcs.diff

Requires Authorization: Bearer <token>.

Parameters
NameInTypeRequired
id path string required
from query string | null optional
to query string required
Responses
200 Array<object> application/json
Array<{
  path: string
  kind: "drawings" | "components" | "toolpaths" | "materials" | "tools" | "machine-configs" | "costs" | "project" | "other"
  id?: string | null
  name?: string | null
  status: "added" | "modified" | "deleted"
  changes: Array<{
    pointer: string
    before?: unknown | null
    after?: unknown | null
  }>
}>
400 BadRequestEncoded application/json
BadRequestEncoded
401 UnauthorizedEncoded application/json
UnauthorizedEncoded
403 ForbiddenEncoded application/json
ForbiddenEncoded
404 NotFoundEncoded application/json
NotFoundEncoded
409 ConflictEncoded application/json
ConflictEncoded
500 InternalErrorEncoded application/json
InternalErrorEncoded
SDK example
vcs.diff
import { CadCam } from "@cadcamfun/api/sdk"

const client = CadCam.make({
  baseUrl: process.env.CADCAMFUN_URL!,
  headers: { authorization: `Bearer ${process.env.CADCAMFUN_TOKEN}` },
})

// VcsDiffInput
const result = await client.vcs.diff({
  id: "<id>"
})
curl
GET /api/projects/{id}/vcs/diff
curl --request GET "${CADCAMFUN_URL}/api/projects/<id>/vcs/diff?to=<to>" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}"
Try it
get /api/projects/{id}/pulls # vcs.listPullRequests

Requires Authorization: Bearer <token>.

Parameters
NameInTypeRequired
id path string required
state query "open" | "merged" | "closed" | null optional
Responses
200 Array<object> application/json
Array<{
  id: string
  projectId: string
  number: number | "Infinity" | "-Infinity" | "NaN"
  title: string
  body: string
  head: string
  base: string
  state: "open" | "merged" | "closed"
  authorId: string
  authorKind: "user" | "ai"
  mergeCommit: string | null
  remoteNumber: number | "Infinity" | "-Infinity" | "NaN" | null
  createdAt: string
  updatedAt: string
}>
400 BadRequestEncoded application/json
BadRequestEncoded
401 UnauthorizedEncoded application/json
UnauthorizedEncoded
403 ForbiddenEncoded application/json
ForbiddenEncoded
404 NotFoundEncoded application/json
NotFoundEncoded
409 ConflictEncoded application/json
ConflictEncoded
500 InternalErrorEncoded application/json
InternalErrorEncoded
SDK example
vcs.listPullRequests
import { CadCam } from "@cadcamfun/api/sdk"

const client = CadCam.make({
  baseUrl: process.env.CADCAMFUN_URL!,
  headers: { authorization: `Bearer ${process.env.CADCAMFUN_TOKEN}` },
})

// VcsListPullRequestsInput
const result = await client.vcs.listPullRequests({
  id: "<id>"
})
curl
GET /api/projects/{id}/pulls
curl --request GET "${CADCAMFUN_URL}/api/projects/<id>/pulls" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}"
Try it
post /api/projects/{id}/pulls # vcs.openPullRequest

Requires Authorization: Bearer <token>.

Parameters
NameInTypeRequired
id path string required
Request body · required · application/json
{
  title: string
  body?: string | null
  head: string
  base?: string | null
  authorKind?: "user" | "ai" | null
}
Responses
201 object application/json
{
  id: string
  projectId: string
  number: number | "Infinity" | "-Infinity" | "NaN"
  title: string
  body: string
  head: string
  base: string
  state: "open" | "merged" | "closed"
  authorId: string
  authorKind: "user" | "ai"
  mergeCommit: string | null
  remoteNumber: number | "Infinity" | "-Infinity" | "NaN" | null
  createdAt: string
  updatedAt: string
}
400 BadRequestEncoded application/json
BadRequestEncoded
401 UnauthorizedEncoded application/json
UnauthorizedEncoded
403 ForbiddenEncoded application/json
ForbiddenEncoded
404 NotFoundEncoded application/json
NotFoundEncoded
409 ConflictEncoded application/json
ConflictEncoded
500 InternalErrorEncoded application/json
InternalErrorEncoded
SDK example
vcs.openPullRequest
import { CadCam } from "@cadcamfun/api/sdk"

const client = CadCam.make({
  baseUrl: process.env.CADCAMFUN_URL!,
  headers: { authorization: `Bearer ${process.env.CADCAMFUN_TOKEN}` },
})

// VcsOpenPullRequestInput
const result = await client.vcs.openPullRequest({
  id: "<id>",
  title: "",
  body: "",
  head: "",
  base: "",
  authorKind: "user"
})
curl
POST /api/projects/{id}/pulls
curl --request POST "${CADCAMFUN_URL}/api/projects/<id>/pulls" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}" \
  --header "Content-Type: application/json" \
  --data-binary @request.json
Try it
get /api/projects/{id}/pulls/{number} # vcs.pullRequest

Requires Authorization: Bearer <token>.

Parameters
NameInTypeRequired
id path string required
number path string required
Responses
200 object application/json
{
  pullRequest: {
    id: string
    projectId: string
    number: number | "Infinity" | "-Infinity" | "NaN"
    title: string
    body: string
    head: string
    base: string
    state: "open" | "merged" | "closed"
    authorId: string
    authorKind: "user" | "ai"
    mergeCommit: string | null
    remoteNumber: number | "Infinity" | "-Infinity" | "NaN" | null
    createdAt: string
    updatedAt: string
  }
  reviews: Array<{
    id: string
    pullRequestId: string
    reviewerId: string
    verdict: "comment" | "approve" | "request-changes"
    body: string
    path: string | null
    pointer: string | null
    createdAt: string
  }>
  changes: Array<{
    path: string
    kind: "drawings" | "components" | "toolpaths" | "materials" | "tools" | "machine-configs" | "costs" | "project" | "other"
    id?: string | null
    name?: string | null
    status: "added" | "modified" | "deleted"
    changes: Array<{
      pointer: string
      before?: unknown | null
      after?: unknown | null
    }>
  }>
}
400 BadRequestEncoded application/json
BadRequestEncoded
401 UnauthorizedEncoded application/json
UnauthorizedEncoded
403 ForbiddenEncoded application/json
ForbiddenEncoded
404 NotFoundEncoded application/json
NotFoundEncoded
409 ConflictEncoded application/json
ConflictEncoded
500 InternalErrorEncoded application/json
InternalErrorEncoded
SDK example
vcs.pullRequest
import { CadCam } from "@cadcamfun/api/sdk"

const client = CadCam.make({
  baseUrl: process.env.CADCAMFUN_URL!,
  headers: { authorization: `Bearer ${process.env.CADCAMFUN_TOKEN}` },
})

// VcsPullRequestInput
const result = await client.vcs.pullRequest({
  id: "<id>",
  number: "<number>"
})
curl
GET /api/projects/{id}/pulls/{number}
curl --request GET "${CADCAMFUN_URL}/api/projects/<id>/pulls/<number>" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}"
Try it
post /api/projects/{id}/pulls/{number}/reviews # vcs.review

Requires Authorization: Bearer <token>.

Parameters
NameInTypeRequired
id path string required
number path string required
Request body · required · application/json
{
  verdict: "comment" | "approve" | "request-changes"
  body?: string | null
  path?: string | null
  pointer?: string | null
}
Responses
201 object application/json
{
  id: string
  pullRequestId: string
  reviewerId: string
  verdict: "comment" | "approve" | "request-changes"
  body: string
  path: string | null
  pointer: string | null
  createdAt: string
}
400 BadRequestEncoded application/json
BadRequestEncoded
401 UnauthorizedEncoded application/json
UnauthorizedEncoded
403 ForbiddenEncoded application/json
ForbiddenEncoded
404 NotFoundEncoded application/json
NotFoundEncoded
409 ConflictEncoded application/json
ConflictEncoded
500 InternalErrorEncoded application/json
InternalErrorEncoded
SDK example
vcs.review
import { CadCam } from "@cadcamfun/api/sdk"

const client = CadCam.make({
  baseUrl: process.env.CADCAMFUN_URL!,
  headers: { authorization: `Bearer ${process.env.CADCAMFUN_TOKEN}` },
})

// VcsReviewInput
const result = await client.vcs.review({
  id: "<id>",
  number: "<number>",
  verdict: "comment",
  body: "",
  path: "",
  pointer: ""
})
curl
POST /api/projects/{id}/pulls/{number}/reviews
curl --request POST "${CADCAMFUN_URL}/api/projects/<id>/pulls/<number>/reviews" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}" \
  --header "Content-Type: application/json" \
  --data-binary @request.json
Try it
post /api/projects/{id}/pulls/{number}/merge # vcs.mergePullRequest

Requires Authorization: Bearer <token>.

Parameters
NameInTypeRequired
id path string required
number path string required
Responses
200 object application/json
{
  id: string
  projectId: string
  number: number | "Infinity" | "-Infinity" | "NaN"
  title: string
  body: string
  head: string
  base: string
  state: "open" | "merged" | "closed"
  authorId: string
  authorKind: "user" | "ai"
  mergeCommit: string | null
  remoteNumber: number | "Infinity" | "-Infinity" | "NaN" | null
  createdAt: string
  updatedAt: string
}
400 BadRequestEncoded application/json
BadRequestEncoded
401 UnauthorizedEncoded application/json
UnauthorizedEncoded
403 ForbiddenEncoded application/json
ForbiddenEncoded
404 NotFoundEncoded application/json
NotFoundEncoded
409 ConflictEncoded application/json
ConflictEncoded
500 InternalErrorEncoded application/json
InternalErrorEncoded
SDK example
vcs.mergePullRequest
import { CadCam } from "@cadcamfun/api/sdk"

const client = CadCam.make({
  baseUrl: process.env.CADCAMFUN_URL!,
  headers: { authorization: `Bearer ${process.env.CADCAMFUN_TOKEN}` },
})

// VcsMergePullRequestInput
const result = await client.vcs.mergePullRequest({
  id: "<id>",
  number: "<number>"
})
curl
POST /api/projects/{id}/pulls/{number}/merge
curl --request POST "${CADCAMFUN_URL}/api/projects/<id>/pulls/<number>/merge" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}"
Try it
post /api/projects/{id}/pulls/{number}/close # vcs.closePullRequest

Requires Authorization: Bearer <token>.

Parameters
NameInTypeRequired
id path string required
number path string required
Responses
200 object application/json
{
  id: string
  projectId: string
  number: number | "Infinity" | "-Infinity" | "NaN"
  title: string
  body: string
  head: string
  base: string
  state: "open" | "merged" | "closed"
  authorId: string
  authorKind: "user" | "ai"
  mergeCommit: string | null
  remoteNumber: number | "Infinity" | "-Infinity" | "NaN" | null
  createdAt: string
  updatedAt: string
}
400 BadRequestEncoded application/json
BadRequestEncoded
401 UnauthorizedEncoded application/json
UnauthorizedEncoded
403 ForbiddenEncoded application/json
ForbiddenEncoded
404 NotFoundEncoded application/json
NotFoundEncoded
409 ConflictEncoded application/json
ConflictEncoded
500 InternalErrorEncoded application/json
InternalErrorEncoded
SDK example
vcs.closePullRequest
import { CadCam } from "@cadcamfun/api/sdk"

const client = CadCam.make({
  baseUrl: process.env.CADCAMFUN_URL!,
  headers: { authorization: `Bearer ${process.env.CADCAMFUN_TOKEN}` },
})

// VcsClosePullRequestInput
const result = await client.vcs.closePullRequest({
  id: "<id>",
  number: "<number>"
})
curl
POST /api/projects/{id}/pulls/{number}/close
curl --request POST "${CADCAMFUN_URL}/api/projects/<id>/pulls/<number>/close" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}"
Try it
get /api/projects/{id}/vcs/remote # vcs.remote

Requires Authorization: Bearer <token>.

Parameters
NameInTypeRequired
id path string required
Responses
200 object application/json
{
  remote: string | null
}
400 BadRequestEncoded application/json
BadRequestEncoded
401 UnauthorizedEncoded application/json
UnauthorizedEncoded
403 ForbiddenEncoded application/json
ForbiddenEncoded
404 NotFoundEncoded application/json
NotFoundEncoded
409 ConflictEncoded application/json
ConflictEncoded
500 InternalErrorEncoded application/json
InternalErrorEncoded
SDK example
vcs.remote
import { CadCam } from "@cadcamfun/api/sdk"

const client = CadCam.make({
  baseUrl: process.env.CADCAMFUN_URL!,
  headers: { authorization: `Bearer ${process.env.CADCAMFUN_TOKEN}` },
})

// VcsRemoteInput
const result = await client.vcs.remote({
  id: "<id>"
})
curl
GET /api/projects/{id}/vcs/remote
curl --request GET "${CADCAMFUN_URL}/api/projects/<id>/vcs/remote" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}"
Try it
put /api/projects/{id}/vcs/remote # vcs.setRemote

Requires Authorization: Bearer <token>.

Parameters
NameInTypeRequired
id path string required
Request body · required · application/json
{
  remote: string | null
}
Responses
200 object application/json
{
  remote: string | null
}
400 BadRequestEncoded application/json
BadRequestEncoded
401 UnauthorizedEncoded application/json
UnauthorizedEncoded
403 ForbiddenEncoded application/json
ForbiddenEncoded
404 NotFoundEncoded application/json
NotFoundEncoded
409 ConflictEncoded application/json
ConflictEncoded
500 InternalErrorEncoded application/json
InternalErrorEncoded
SDK example
vcs.setRemote
import { CadCam } from "@cadcamfun/api/sdk"

const client = CadCam.make({
  baseUrl: process.env.CADCAMFUN_URL!,
  headers: { authorization: `Bearer ${process.env.CADCAMFUN_TOKEN}` },
})

// VcsSetRemoteInput
const result = await client.vcs.setRemote({
  id: "<id>",
  remote: ""
})
curl
PUT /api/projects/{id}/vcs/remote
curl --request PUT "${CADCAMFUN_URL}/api/projects/<id>/vcs/remote" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}" \
  --header "Content-Type: application/json" \
  --data-binary @request.json
Try it
post /api/projects/{id}/vcs/push # vcs.push

Requires Authorization: Bearer <token>.

Parameters
NameInTypeRequired
id path string required
x-github-token header string required
Request body · required · application/json
{
  branch?: string | null
}
Responses
200 object application/json
{
  oid: string
  objects: number | "Infinity" | "-Infinity" | "NaN"
}
400 BadRequestEncoded application/json
BadRequestEncoded
401 UnauthorizedEncoded application/json
UnauthorizedEncoded
403 ForbiddenEncoded application/json
ForbiddenEncoded
404 NotFoundEncoded application/json
NotFoundEncoded
409 ConflictEncoded application/json
ConflictEncoded
500 InternalErrorEncoded application/json
InternalErrorEncoded
SDK example
vcs.push
import { CadCam } from "@cadcamfun/api/sdk"

const client = CadCam.make({
  baseUrl: process.env.CADCAMFUN_URL!,
  headers: { authorization: `Bearer ${process.env.CADCAMFUN_TOKEN}` },
})

// VcsPushInput
const result = await client.vcs.push({
  id: "<id>",
  branch: ""
})
curl
POST /api/projects/{id}/vcs/push
curl --request POST "${CADCAMFUN_URL}/api/projects/<id>/vcs/push" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}" \
  --header "Content-Type: application/json" \
  --data-binary @request.json
Try it
post /api/projects/{id}/vcs/pull # vcs.pull

Requires Authorization: Bearer <token>.

Parameters
NameInTypeRequired
id path string required
x-github-token header string required
Request body · required · application/json
{
  branch?: string | null
}
Responses
200 object application/json
{
  kind: string
  oid: string
}
400 BadRequestEncoded application/json
BadRequestEncoded
401 UnauthorizedEncoded application/json
UnauthorizedEncoded
403 ForbiddenEncoded application/json
ForbiddenEncoded
404 NotFoundEncoded application/json
NotFoundEncoded
409 ConflictEncoded application/json
ConflictEncoded
500 InternalErrorEncoded application/json
InternalErrorEncoded
SDK example
vcs.pull
import { CadCam } from "@cadcamfun/api/sdk"

const client = CadCam.make({
  baseUrl: process.env.CADCAMFUN_URL!,
  headers: { authorization: `Bearer ${process.env.CADCAMFUN_TOKEN}` },
})

// VcsPullInput
const result = await client.vcs.pull({
  id: "<id>",
  branch: ""
})
curl
POST /api/projects/{id}/vcs/pull
curl --request POST "${CADCAMFUN_URL}/api/projects/<id>/vcs/pull" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}" \
  --header "Content-Type: application/json" \
  --data-binary @request.json
Try it
get /api/projects/{id}/actions/runs # vcs.runs

Requires Authorization: Bearer <token>.

Parameters
NameInTypeRequired
id path string required
Responses
200 Array<object> application/json
Array<{
  id: string
  projectId: string
  workflow: string
  event: "push" | "pull-request" | "manual"
  ref: string
  sha: string
  status: "queued" | "running" | "success" | "failure"
  events: unknown[]
  startedAt: string
  finishedAt: string | null
}>
400 BadRequestEncoded application/json
BadRequestEncoded
401 UnauthorizedEncoded application/json
UnauthorizedEncoded
403 ForbiddenEncoded application/json
ForbiddenEncoded
404 NotFoundEncoded application/json
NotFoundEncoded
409 ConflictEncoded application/json
ConflictEncoded
500 InternalErrorEncoded application/json
InternalErrorEncoded
SDK example
vcs.runs
import { CadCam } from "@cadcamfun/api/sdk"

const client = CadCam.make({
  baseUrl: process.env.CADCAMFUN_URL!,
  headers: { authorization: `Bearer ${process.env.CADCAMFUN_TOKEN}` },
})

// VcsRunsInput
const result = await client.vcs.runs({
  id: "<id>"
})
curl
GET /api/projects/{id}/actions/runs
curl --request GET "${CADCAMFUN_URL}/api/projects/<id>/actions/runs" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}"
Try it
post /api/projects/{id}/actions/dispatch # vcs.dispatch

Requires Authorization: Bearer <token>.

Parameters
NameInTypeRequired
id path string required
Request body · required · application/json
{
  ref?: string | null
}
Responses
200 Array<object> application/json
Array<{
  id: string
  projectId: string
  workflow: string
  event: "push" | "pull-request" | "manual"
  ref: string
  sha: string
  status: "queued" | "running" | "success" | "failure"
  events: unknown[]
  startedAt: string
  finishedAt: string | null
}>
400 BadRequestEncoded application/json
BadRequestEncoded
401 UnauthorizedEncoded application/json
UnauthorizedEncoded
403 ForbiddenEncoded application/json
ForbiddenEncoded
404 NotFoundEncoded application/json
NotFoundEncoded
409 ConflictEncoded application/json
ConflictEncoded
500 InternalErrorEncoded application/json
InternalErrorEncoded
SDK example
vcs.dispatch
import { CadCam } from "@cadcamfun/api/sdk"

const client = CadCam.make({
  baseUrl: process.env.CADCAMFUN_URL!,
  headers: { authorization: `Bearer ${process.env.CADCAMFUN_TOKEN}` },
})

// VcsDispatchInput
const result = await client.vcs.dispatch({
  id: "<id>",
  ref: ""
})
curl
POST /api/projects/{id}/actions/dispatch
curl --request POST "${CADCAMFUN_URL}/api/projects/<id>/actions/dispatch" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}" \
  --header "Content-Type: application/json" \
  --data-binary @request.json
Try it
get /api/projects/{id}/actions/workflows # vcs.listWorkflows

Requires Authorization: Bearer <token>.

Parameters
NameInTypeRequired
id path string required
ref query string | null optional
Responses
200 Array<object> application/json
Array<{
  name: string
  path: string
  content: string
  problem?: string | null
}>
400 BadRequestEncoded application/json
BadRequestEncoded
401 UnauthorizedEncoded application/json
UnauthorizedEncoded
403 ForbiddenEncoded application/json
ForbiddenEncoded
404 NotFoundEncoded application/json
NotFoundEncoded
409 ConflictEncoded application/json
ConflictEncoded
500 InternalErrorEncoded application/json
InternalErrorEncoded
SDK example
vcs.listWorkflows
import { CadCam } from "@cadcamfun/api/sdk"

const client = CadCam.make({
  baseUrl: process.env.CADCAMFUN_URL!,
  headers: { authorization: `Bearer ${process.env.CADCAMFUN_TOKEN}` },
})

// VcsListWorkflowsInput
const result = await client.vcs.listWorkflows({
  id: "<id>"
})
curl
GET /api/projects/{id}/actions/workflows
curl --request GET "${CADCAMFUN_URL}/api/projects/<id>/actions/workflows" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}"
Try it
get /api/projects/{id}/actions/workflows/{name} # vcs.workflow

Requires Authorization: Bearer <token>.

Parameters
NameInTypeRequired
id path string required
name path string required
ref query string | null optional
Responses
200 object application/json
{
  name: string
  path: string
  content: string
  problem?: string | null
}
400 BadRequestEncoded application/json
BadRequestEncoded
401 UnauthorizedEncoded application/json
UnauthorizedEncoded
403 ForbiddenEncoded application/json
ForbiddenEncoded
404 NotFoundEncoded application/json
NotFoundEncoded
409 ConflictEncoded application/json
ConflictEncoded
500 InternalErrorEncoded application/json
InternalErrorEncoded
SDK example
vcs.workflow
import { CadCam } from "@cadcamfun/api/sdk"

const client = CadCam.make({
  baseUrl: process.env.CADCAMFUN_URL!,
  headers: { authorization: `Bearer ${process.env.CADCAMFUN_TOKEN}` },
})

// VcsWorkflowInput
const result = await client.vcs.workflow({
  id: "<id>",
  name: "<name>"
})
curl
GET /api/projects/{id}/actions/workflows/{name}
curl --request GET "${CADCAMFUN_URL}/api/projects/<id>/actions/workflows/<name>" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}"
Try it

Schemas

Named schemas reachable from this group's parameters, bodies and responses. A ? marks an optional field; | null marks a field that may be present with a null value.

BadRequestEncoded
{
  _tag: "BadRequest"
  message: string
}
ConflictEncoded
{
  _tag: "Conflict"
  message: string
}
ForbiddenEncoded
{
  _tag: "Forbidden"
  message: string
}
InternalErrorEncoded
{
  _tag: "InternalError"
  message: string
}
NotFoundEncoded
{
  _tag: "NotFound"
  message: string
}
UnauthorizedEncoded
{
  _tag: "Unauthorized"
  message: string
}

Calling this group

Operation ids have the form vcs.<name>. The generated Promise SDK (@cadcamfun/api/sdk) exposes most of them as client.<namespace>.<method>(input), where input is one flat object of path parameters and body fields; each card's SDK example shows the exact accessor and input type. Multipart uploads, binary or JavaScript responses and raw webhooks are not generated; those cards show fetch instead.

Errors from the Promise SDK
import { CadCam, ClientError } from "@cadcamfun/api/sdk"

const client = CadCam.make({
  baseUrl: process.env.CADCAMFUN_URL!,
  headers: { authorization: `Bearer ${process.env.CADCAMFUN_TOKEN}` },
})

try {
  await client.projects.list()
} catch (error) {
  if (error instanceof ClientError) {
    // Transport | UnexpectedStatus | UnsupportedContentType | MalformedResponse | SseEventTooLarge
  } else {
    // a declared error body: switch on error._tag
  }
}

Troubleshooting

SymptomLikely causeFix
401 on every callToken from a previous launch, or missing Bearer prefixSend Authorization: Bearer <token> with the token the sidecar was started with.
400 before anything happensBody or parameter does not match the schemaCompare the payload with the request schema on the card.
403 or 404 on a record you can see elsewhereThe acting account differsSend the right x-session-token, or use the local profile that owns the record.
409Conflicting state, such as a duplicate name or a stale branch headRe-read the resource and retry with current data.
Try it says "blocked by CORS"The docs are served from a non-loopback originRun the docs locally or copy the request as curl.
Connection refusedThe sidecar restarted on a new portRead the port from the new ready line.