Skip to content

REST API

Ordine 服务器默认在端口 9433 暴露 REST API,所有端点以 /api/ 为前缀。

基础 URL

http://localhost:9433/api

资源

流水线

方法路径说明
GET/pipelines列出所有流水线
POST/pipelines创建流水线
PUT/pipelinesUpsert 流水线
GET/pipelines/:id获取单个流水线
PATCH/pipelines/:id更新流水线
DELETE/pipelines/:id删除流水线
POST/pipelines/:id/run运行流水线

运行流水线

sh
curl -X POST http://localhost:9433/api/pipelines/my-pipeline/run \
  -H 'Content-Type: application/json' \
  -d '{"inputPath": "/path/to/project"}'

响应:

json
{ "jobId": "d1612c1b-cd83-4936-b3db-8777847b1871" }

操作

方法路径说明
GET/operations列出所有操作
POST/operations创建操作
PUT/operationsUpsert 操作
GET/operations/:id获取单个操作
PATCH/operations/:id更新操作
DELETE/operations/:id删除操作

技能

方法路径说明
GET/skills列出所有技能
POST/skills创建技能
GET/skills/:id获取单个技能
PATCH/skills/:id更新技能
DELETE/skills/:id删除技能

最佳实践

方法路径说明
GET/best-practices列出所有最佳实践
PUT/best-practicesUpsert 最佳实践
DELETE/best-practices/:id删除最佳实践

规则

方法路径说明
GET/rules列出所有规则
PUT/rulesUpsert 规则
DELETE/rules/:id删除规则

配方

方法路径说明
GET/recipes列出所有配方
POST/recipes创建配方
PUT/recipesUpsert 配方
DELETE/recipes/:id删除配方

任务

方法路径说明
GET/jobs列出所有任务
GET/jobs/:id获取单个任务
GET/jobs/:id/traces获取任务追踪
DELETE/jobs/:id删除任务

文件系统

方法路径说明
GET/filesystem浏览文件系统

代码片段

方法路径说明
GET/code-snippets列出代码片段
PUT/code-snippetsUpsert 代码片段
DELETE/code-snippets删除代码片段

检查清单项

方法路径说明
GET/checklist-items列出检查清单项
PUT/checklist-itemsUpsert 检查清单项
DELETE/checklist-items删除检查清单项

通用模式

Upsert

大多数资源支持 PUT 进行 upsert — 请求体中包含 id 字段。如果 ID 存在则更新,否则创建。

Released under the MIT License.