1. git-codeZone
1024PaaS-租户业务接口
  • 主要流程
  • codeZone
    • 获取codeZone列表
      GET
    • 创建codeZone
      POST
    • forkCodeZone
      POST
    • 导入 CodeZone
      POST
    • 设置环境变量,写入config配置文件中
      PUT
    • 编辑codeZone
      PUT
    • 获取编辑CodeZone的Playground(副本模式)
      GET
    • 编辑文件
      PUT
    • 获取编辑CodeZone的Playground
      GET
    • 从github导入创建codeZone
      POST
    • 下载代码文件
      GET
    • 导入文件
      POST
    • 删除codeZone
      DELETE
  • codeZoneResource
    • 设置codeZone的磁盘资源ID
      POST
    • 设置codeZone的URLResource
      POST
  • codeZoneMiddleware
    • 获取codeZone依赖的中间件列表
    • 增加codeZone依赖的中间件
    • 删除codeZone依赖的中间件
    • 查询中间件运行状态
  • codeZoneSnapshot
    • 复制 codeZoneSnapshot
    • 下载 codeZoneSnapshot 文件
    • 发布codeZoneSnapshot
  • unitTest
    • 获取依赖引入、初始化、准备、拆除方法行号
    • 获取运行结果
    • 运行单元测试
    • 获取单元测试测试用例列表
  • git-codeZone
    • add
      POST
    • addAndCommit
      POST
    • branch
      GET
    • createBranch
      POST
    • commit
      POST
    • log
      GET
    • reset
      POST
    • revert
      POST
    • 查看某次提交变更文件
      GET
    • 查看某次提交文件内容
      GET
    • status
      GET
  • docker
    • 下载代码文件
    • 发布 codeSnapshot
    • 查询 docker 状态
    • 下载代码文件
    • 获取代码文件内容
  • git-docker
    • add
    • addAndCommit
    • branch
    • createBranch
    • commit
    • log
    • reset
    • revert
    • 查看某次提交变更文件
    • 查看某次提交文件内容
    • status
  • unitTestFramework
    • 获取单元测试框架列表
  • environment
    • 获取基础环境列表
  • middleware
    • 获取PaaS支持的中间件类型列表
  • playground
    • 创建playground
    • 下载代码文件
    • 批量创建Playground并异步激活(返回结果不代表已全部激活完成)
    • 获取代码文件内容
    • 批量释放Playground
    • 获取 playground 状态
    • 导入文件 json
    • 激活playground
    • 获取playground状态
    • playground绑定CodeZoneSnapshot
    • playground绑定dockerContainer
    • 切换指定playground的环境版本
    • 删除 playground
    • 暂停playground
    • playground资源释放
    • playground 运行脚本
    • 获取运行结果
    • 修改资源配置
    • 获取当前资源
    • playground 停止运行脚本
  • git-playground
    • add
    • addAndCommit
    • branch
    • createBranch
    • commit
    • log
    • reset
    • revert
    • 查看某次提交变更文件
    • 查看某次提交文件内容
    • status
  • playgroundUnitTest
    • 创建测试用例文件
    • 获取依赖引入、初始化、准备、拆除方法行号
    • 获取运行结果
    • 运行单元测试
    • 停止单元测试
    • 获取单元测试测试用例列表
  • DiskResource
    • 申请一个磁盘资源
    • 上传文件
  • URLResource
    • 申请一个URL资源
    • 获取URL资源的suffix列表
  • ticket
    • 获取 jsSdk 需要信息
    • 获取入场券信息
    • 获取入场券
  • playgroundMiddleware
    • 获取执行结果
    • 执行命令 如 mysql 执行 sql (异步)
    • 导出数据库
    • 执行命令 如 mysql 执行 sql (同步)
    • 获取 playground 依赖的中间件列表
  • nix
    • 增加 nix 依赖
  • file
    • 根据fileContentKey获取文件内容
  • mq
    • 创建mq队列
  • IDE Server
    • 下线
    • 上线
    • 创建mq队列
  1. git-codeZone

createBranch

POST
/api/v1/sdk/codeZones/{id}/git/branch

请求参数

Path 参数

Header 参数

Body 参数application/json

示例
{
    "commitId": "string",
    "name": "string"
}

请求示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location '/api/v1/sdk/codeZones//git/branch' \
--header 'tenantCode: demo' \
--header 'userId: 2' \
--header 'nonce: {{nonce}}' \
--header 'timestamp: {{timestamp}}' \
--header 'token: {{token}}' \
--header 'Content-Type: application/json' \
--data '{
    "commitId": "string",
    "name": "string"
}'

返回响应

🟢200OK
application/json
Bodyapplication/json

示例
{
    "errors": [
        {
            "errcode": "string",
            "errmsg": "string",
            "field": "string"
        }
    ],
    "status": "failure",
    "timestamp": "2019-08-24T14:15:22.123Z"
}
🟢201Created
🟠401Unauthorized
🟠403Forbidden
🟠404Not Found
修改于 2025-07-20 07:38:08
上一页
branch
下一页
commit
Built with