コンテンツへスキップ
CADCAMFUN
ドキュメント

ドキュメント

歴史とワークフロー

プロジェクトの Git 互換のコミット、ブランチ、リストア、レビュー、GitHub ミラーリング、およびワークフロー ディスパッチ。

英語から自動翻訳されています。 英語の原文を見る

プレイグラウンド

これらのリクエストを独自の実行中のサイドカーに送信します。値はこのブラウザ内に残ります。

接続されていません
仕組み

サイドカーは起動時に選択されたループバック ポートをリッスンし、それをそのポートに出力します。 ready ライン;その URL を使用し、 CADCAMFUN_TOKEN で始まりました。リクエストはこのページからそのアドレスに直接送信されます。

サイドカーは CORS ヘッダーを Tauri オリジンと http://localhost または http://127.0.0.1 どのポートでも。ホストされているドキュメントからはブラウザーが応答をブロックするため、ドキュメントをローカルで実行します (bun run dev で packages/web) プレイグラウンドを使用するか、リクエストをcurlとしてコピーします。実際のデータに触れることなく実験するには、次のようにしてサイドカーを開始します。 CADCAMFUN_DATA_DIR 使い捨てディレクトリを指す - を参照 aPI のチュートリアル.

運営

22 エンドポイント( vcs サイドカー自体から生成されたグループ OpenAPIドキュメント。保護された操作には時間がかかります Authorization: Bearer $CADCAMFUN_TOKEN;見る 認証。行動と制限は次のとおりです サブシステムガイド.

得る /api/projects/{id}/vcs/status vcs.status
得る /api/projects/{id}/vcs/log vcs.log
役職 /api/projects/{id}/vcs/commit vcs.commit
得る /api/projects/{id}/vcs/branches vcs.branches
役職 /api/projects/{id}/vcs/branches vcs.createBranch
役職 /api/projects/{id}/vcs/checkout vcs.checkout
役職 /api/projects/{id}/vcs/restore vcs.restore
得る /api/projects/{id}/vcs/diff vcs.diff
得る /api/projects/{id}/pulls vcs.listPullRequests
役職 /api/projects/{id}/pulls vcs.openPullRequest
得る /api/projects/{id}/pulls/{number} vcs.pullRequest
役職 /api/projects/{id}/pulls/{number}/reviews vcs.review
役職 /api/projects/{id}/pulls/{number}/merge vcs.mergePullRequest
役職 /api/projects/{id}/pulls/{number}/close vcs.closePullRequest
得る /api/projects/{id}/vcs/remote vcs.remote
置く /api/projects/{id}/vcs/remote vcs.setRemote
役職 /api/projects/{id}/vcs/push vcs.push
役職 /api/projects/{id}/vcs/pull vcs.pull
得る /api/projects/{id}/actions/runs vcs.runs
役職 /api/projects/{id}/actions/dispatch vcs.dispatch
得る /api/projects/{id}/actions/workflows vcs.listWorkflows
得る /api/projects/{id}/actions/workflows/{name} vcs.workflow
3D での履歴とワークフローの操作 ドラッグして周回します · スクロールしてズーム · 右ドラッグしてパンします
オペレーションごとに 1 つのブロック (22)、このページのリソース セクションごとにスタックされ、メソッドごとに色分けされます: 緑色の GET、オレンジ色の POST、青色の PUT、紫色の PATCH、赤色の DELETE。ビルド時に OpenAPI ドキュメントから生成されます。

/api/projects

得る /api/projects/{id}/vcs/status # vcs.status

必要 Authorization: Bearer <token>.

パラメータ
名前でタイプ必須
iD パス 弦 必須
応答
200 物体 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の例
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
/api/projects/{id}/vcs/status を取得します
curl --request GET "${CADCAMFUN_URL}/api/projects/<id>/vcs/status" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}"
試してみてください
得る /api/projects/{id}/vcs/log # vcs.log

必要 Authorization: Bearer <token>.

パラメータ
名前でタイプ必須
iD パス 弦 必須
回転数 クエリ 弦 | null オプション
限界 クエリ 弦 | null オプション
パス クエリ 弦 | null オプション
応答
200 配列<オブジェクト> 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の例
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
/api/projects/{id}/vcs/log を取得します
curl --request GET "${CADCAMFUN_URL}/api/projects/<id>/vcs/log" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}"
試してみてください
役職 /api/projects/{id}/vcs/commit # vcs.commit

必要 Authorization: Bearer <token>.

パラメータ
名前でタイプ必須
iD パス 弦 必須
リクエスト本文 · 必須 · application/json
{
  message: string
  authorKind?: "user" | "ai" | null
  files?: {
    [key: string]: string
  } | null
}
応答
201 物体 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の例
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
試してみてください
得る /api/projects/{id}/vcs/branches # vcs.branches

必要 Authorization: Bearer <token>.

パラメータ
名前でタイプ必須
iD パス 弦 必須
応答
200 物体 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の例
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
/api/projects/{id}/vcs/branches を取得します
curl --request GET "${CADCAMFUN_URL}/api/projects/<id>/vcs/branches" \
  --header "Authorization: Bearer ${CADCAMFUN_TOKEN}"
試してみてください
役職 /api/projects/{id}/vcs/branches # vcs.createBranch

必要 Authorization: Bearer <token>.

パラメータ
名前でタイプ必須
iD パス 弦 必須
リクエスト本文 · 必須 · application/json
{
  name: string
  from?: string | null
}
応答
201 物体 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の例
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
試してみてください
役職 /api/projects/{id}/vcs/checkout # vcs.checkout

必要 Authorization: Bearer <token>.

パラメータ
名前でタイプ必須
iD パス 弦 必須
リクエスト本文 · 必須 · application/json
{
  branch: string
}
応答
200 物体 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の例
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
試してみてください
役職 /api/projects/{id}/vcs/restore # vcs.restore

必要 Authorization: Bearer <token>.

パラメータ
名前でタイプ必須
iD パス 弦 必須
リクエスト本文 · 必須 · application/json
{
  rev: string
  paths?: string[] | null
}
応答
200 物体 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の例
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
試してみてください
得る /api/projects/{id}/vcs/diff # vcs.diff

必要 Authorization: Bearer <token>.

パラメータ
名前でタイプ必須
iD パス 弦 必須
から クエリ 弦 | null オプション
まで クエリ 弦 必須
応答
200 配列<オブジェクト> 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の例
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}"
試してみてください
得る /api/projects/{id}/pulls # vcs.listPullRequests

必要 Authorization: Bearer <token>.

パラメータ
名前でタイプ必須
iD パス 弦 必須
州 クエリ "開ける" | 「合併した」 | 「閉まっている」 | null オプション
応答
200 配列<オブジェクト> 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の例
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}"
試してみてください
役職 /api/projects/{id}/pulls # vcs.openPullRequest

必要 Authorization: Bearer <token>.

パラメータ
名前でタイプ必須
iD パス 弦 必須
リクエスト本文 · 必須 · application/json
{
  title: string
  body?: string | null
  head: string
  base?: string | null
  authorKind?: "user" | "ai" | null
}
応答
201 物体 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の例
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
試してみてください
得る /api/projects/{id}/pulls/{number} # vcs.pullRequest

必要 Authorization: Bearer <token>.

パラメータ
名前でタイプ必須
iD パス 弦 必須
番号 パス 弦 必須
応答
200 物体 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の例
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}"
試してみてください
役職 /api/projects/{id}/pulls/{number}/reviews # vcs.review

必要 Authorization: Bearer <token>.

パラメータ
名前でタイプ必須
iD パス 弦 必須
番号 パス 弦 必須
リクエスト本文 · 必須 · application/json
{
  verdict: "comment" | "approve" | "request-changes"
  body?: string | null
  path?: string | null
  pointer?: string | null
}
応答
201 物体 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の例
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
試してみてください
役職 /api/projects/{id}/pulls/{number}/merge # vcs.mergePullRequest

必要 Authorization: Bearer <token>.

パラメータ
名前でタイプ必須
iD パス 弦 必須
番号 パス 弦 必須
応答
200 物体 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の例
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}"
試してみてください
役職 /api/projects/{id}/pulls/{number}/close # vcs.closePullRequest

必要 Authorization: Bearer <token>.

パラメータ
名前でタイプ必須
iD パス 弦 必須
番号 パス 弦 必須
応答
200 物体 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の例
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}"
試してみてください
得る /api/projects/{id}/vcs/remote # vcs.remote

必要 Authorization: Bearer <token>.

パラメータ
名前でタイプ必須
iD パス 弦 必須
応答
200 物体 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の例
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}"
試してみてください
置く /api/projects/{id}/vcs/remote # vcs.setRemote

必要 Authorization: Bearer <token>.

パラメータ
名前でタイプ必須
iD パス 弦 必須
リクエスト本文 · 必須 · application/json
{
  remote: string | null
}
応答
200 物体 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の例
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
試してみてください
役職 /api/projects/{id}/vcs/push # vcs.push

必要 Authorization: Bearer <token>.

パラメータ
名前でタイプ必須
iD パス 弦 必須
x-github-トークン ヘッダ 弦 必須
リクエスト本文 · 必須 · application/json
{
  branch?: string | null
}
応答
200 物体 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の例
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
試してみてください
役職 /api/projects/{id}/vcs/pull # vcs.pull

必要 Authorization: Bearer <token>.

パラメータ
名前でタイプ必須
iD パス 弦 必須
x-github-トークン ヘッダ 弦 必須
リクエスト本文 · 必須 · application/json
{
  branch?: string | null
}
応答
200 物体 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の例
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
試してみてください
得る /api/projects/{id}/actions/runs # vcs.runs

必要 Authorization: Bearer <token>.

パラメータ
名前でタイプ必須
iD パス 弦 必須
応答
200 配列<オブジェクト> 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の例
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}"
試してみてください
役職 /api/projects/{id}/actions/dispatch # vcs.dispatch

必要 Authorization: Bearer <token>.

パラメータ
名前でタイプ必須
iD パス 弦 必須
リクエスト本文 · 必須 · application/json
{
  ref?: string | null
}
応答
200 配列<オブジェクト> 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の例
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
試してみてください
得る /api/projects/{id}/actions/workflows # vcs.listWorkflows

必要 Authorization: Bearer <token>.

パラメータ
名前でタイプ必須
iD パス 弦 必須
参照 クエリ 弦 | null オプション
応答
200 配列<オブジェクト> 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の例
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}"
試してみてください
得る /api/projects/{id}/actions/workflows/{name} # vcs.workflow

必要 Authorization: Bearer <token>.

パラメータ
名前でタイプ必須
iD パス 弦 必須
名前 パス 弦 必須
参照 クエリ 弦 | null オプション
応答
200 物体 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の例
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}"
試してみてください

スキーマ

このグループのパラメータ、本体、および応答から到達可能な名前付きスキーマ。あ ? オプションのフィールドをマークします。 | null null 値が存在する可能性があるフィールドにマークを付けます。

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
}

このグループに電話をかける

オペレーション ID の形式は次のとおりです。 vcs.<name>。生成された Promise SDK (@cadcamfun/api/sdk) それらのほとんどを次のように公開します client.<namespace>.<method>(input)、 どこ input パスパラメータとボディフィールドの 1 つのフラットオブジェクトです。各カードの SDK の例は、正確なアクセサーと入力タイプを示しています。マルチパート アップロード、バイナリまたは JavaScript 応答、生の Webhook は生成されません。それらのカードが示しているのは fetch 代わりに。

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
  }
}

トラブルシューティング

症状考えられる原因修理
呼び出しごとの 401以前の起動からのトークン、または欠落しています Bearer 接頭辞送信 Authorization: Bearer <token> サイドカーが開始されたトークンを使用します。
何も起きる前の 400本体またはパラメータがスキーマと一致しませんペイロードとカード上のリクエスト スキーマを比較します。
別の場所で見えるレコードの 403 または 404代理アカウントは異なります権利を送信します x-session-token、またはレコードを所有するローカル プロファイルを使用します。
409重複した名前や古いブランチヘッドなどの矛盾した状態リソースを再読み込みし、現在のデータで再試行します。
「CORS によってブロックされました」と表示されてみてくださいドキュメントは非ループバックオリジンから提供されますドキュメントをローカルで実行するか、リクエストをcurlとしてコピーします。
接続拒否サイドカーが新しいポートで再起動されました新しいポートからポートを読み取ります ready 行。