Documentation
History and workflows
Project Git-compatible commits, branches, restores, reviews, GitHub mirroring, and workflow dispatch.
Send these requests to your own running sidecar. Values stay in this browser.
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.
/api/projects
vcs.status Requires Authorization: Bearer <token>.
| Name | In | Type | Required |
|---|---|---|---|
| id | path | string | required |
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
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
curl --request GET "${CADCAMFUN_URL}/api/projects/<id>/vcs/status" \
--header "Authorization: Bearer ${CADCAMFUN_TOKEN}" Try it
vcs.log Requires Authorization: Bearer <token>.
| Name | In | Type | Required |
|---|---|---|---|
| id | path | string | required |
| rev | query | string | null | optional |
| limit | query | string | null | optional |
| path | query | string | null | optional |
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
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
curl --request GET "${CADCAMFUN_URL}/api/projects/<id>/vcs/log" \
--header "Authorization: Bearer ${CADCAMFUN_TOKEN}" Try it
vcs.commit Requires Authorization: Bearer <token>.
| Name | In | Type | Required |
|---|---|---|---|
| id | path | string | required |
{ message: string authorKind?: "user" | "ai" | null files?: { [key: string]: string } | null }
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
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
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
vcs.branches Requires Authorization: Bearer <token>.
| Name | In | Type | Required |
|---|---|---|---|
| id | path | string | required |
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
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
curl --request GET "${CADCAMFUN_URL}/api/projects/<id>/vcs/branches" \
--header "Authorization: Bearer ${CADCAMFUN_TOKEN}" Try it
vcs.createBranch Requires Authorization: Bearer <token>.
| Name | In | Type | Required |
|---|---|---|---|
| id | path | string | required |
{ name: string from?: string | null }
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
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
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
vcs.checkout Requires Authorization: Bearer <token>.
| Name | In | Type | Required |
|---|---|---|---|
| id | path | string | required |
{ branch: string }
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
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
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
vcs.restore Requires Authorization: Bearer <token>.
| Name | In | Type | Required |
|---|---|---|---|
| id | path | string | required |
{ rev: string paths?: string[] | null }
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
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
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
vcs.diff Requires Authorization: Bearer <token>.
| Name | In | Type | Required |
|---|---|---|---|
| id | path | string | required |
| from | query | string | null | optional |
| to | query | string | required |
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
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
curl --request GET "${CADCAMFUN_URL}/api/projects/<id>/vcs/diff?to=<to>" \
--header "Authorization: Bearer ${CADCAMFUN_TOKEN}" Try it
vcs.listPullRequests Requires Authorization: Bearer <token>.
| Name | In | Type | Required |
|---|---|---|---|
| id | path | string | required |
| state | query | "open" | "merged" | "closed" | null | optional |
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
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
curl --request GET "${CADCAMFUN_URL}/api/projects/<id>/pulls" \
--header "Authorization: Bearer ${CADCAMFUN_TOKEN}" Try it
vcs.openPullRequest Requires Authorization: Bearer <token>.
| Name | In | Type | Required |
|---|---|---|---|
| id | path | string | required |
{ title: string body?: string | null head: string base?: string | null authorKind?: "user" | "ai" | null }
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
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
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
vcs.pullRequest Requires Authorization: Bearer <token>.
| Name | In | Type | Required |
|---|---|---|---|
| id | path | string | required |
| number | path | string | required |
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
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
curl --request GET "${CADCAMFUN_URL}/api/projects/<id>/pulls/<number>" \
--header "Authorization: Bearer ${CADCAMFUN_TOKEN}" Try it
vcs.review Requires Authorization: Bearer <token>.
| Name | In | Type | Required |
|---|---|---|---|
| id | path | string | required |
| number | path | string | required |
{ verdict: "comment" | "approve" | "request-changes" body?: string | null path?: string | null pointer?: string | null }
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
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
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
vcs.mergePullRequest Requires Authorization: Bearer <token>.
| Name | In | Type | Required |
|---|---|---|---|
| id | path | string | required |
| number | path | string | required |
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
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
curl --request POST "${CADCAMFUN_URL}/api/projects/<id>/pulls/<number>/merge" \
--header "Authorization: Bearer ${CADCAMFUN_TOKEN}" Try it
vcs.closePullRequest Requires Authorization: Bearer <token>.
| Name | In | Type | Required |
|---|---|---|---|
| id | path | string | required |
| number | path | string | required |
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
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
curl --request POST "${CADCAMFUN_URL}/api/projects/<id>/pulls/<number>/close" \
--header "Authorization: Bearer ${CADCAMFUN_TOKEN}" Try it
vcs.remote Requires Authorization: Bearer <token>.
| Name | In | Type | Required |
|---|---|---|---|
| id | path | string | required |
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
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
curl --request GET "${CADCAMFUN_URL}/api/projects/<id>/vcs/remote" \
--header "Authorization: Bearer ${CADCAMFUN_TOKEN}" Try it
vcs.setRemote Requires Authorization: Bearer <token>.
| Name | In | Type | Required |
|---|---|---|---|
| id | path | string | required |
{ remote: string | null }
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
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
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
vcs.push Requires Authorization: Bearer <token>.
| Name | In | Type | Required |
|---|---|---|---|
| id | path | string | required |
| x-github-token | header | string | required |
{ branch?: string | null }
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
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
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
vcs.pull Requires Authorization: Bearer <token>.
| Name | In | Type | Required |
|---|---|---|---|
| id | path | string | required |
| x-github-token | header | string | required |
{ branch?: string | null }
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
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
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
vcs.runs Requires Authorization: Bearer <token>.
| Name | In | Type | Required |
|---|---|---|---|
| id | path | string | required |
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
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
curl --request GET "${CADCAMFUN_URL}/api/projects/<id>/actions/runs" \
--header "Authorization: Bearer ${CADCAMFUN_TOKEN}" Try it
vcs.dispatch Requires Authorization: Bearer <token>.
| Name | In | Type | Required |
|---|---|---|---|
| id | path | string | required |
{ ref?: string | null }
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
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
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
vcs.listWorkflows Requires Authorization: Bearer <token>.
| Name | In | Type | Required |
|---|---|---|---|
| id | path | string | required |
| ref | query | string | null | optional |
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
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
curl --request GET "${CADCAMFUN_URL}/api/projects/<id>/actions/workflows" \
--header "Authorization: Bearer ${CADCAMFUN_TOKEN}" Try it
vcs.workflow Requires Authorization: Bearer <token>.
| Name | In | Type | Required |
|---|---|---|---|
| id | path | string | required |
| name | path | string | required |
| ref | query | string | null | optional |
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
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
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 }
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.
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
| Symptom | Likely cause | Fix |
|---|---|---|
| 401 on every call | Token from a previous launch, or missing Bearer prefix | Send Authorization: Bearer <token> with the token the sidecar was started with. |
| 400 before anything happens | Body or parameter does not match the schema | Compare the payload with the request schema on the card. |
| 403 or 404 on a record you can see elsewhere | The acting account differs | Send the right x-session-token, or use the local profile that owns the record. |
| 409 | Conflicting state, such as a duplicate name or a stale branch head | Re-read the resource and retry with current data. |
| Try it says "blocked by CORS" | The docs are served from a non-loopback origin | Run the docs locally or copy the request as curl. |
| Connection refused | The sidecar restarted on a new port | Read the port from the new ready line. |