---
title: "创建插件"
method: POST
path: "/v2/tenants/{tenant_name}/plugin"
tags: ["v2"]
---

# 创建插件

`POST /v2/tenants/{tenant_name}/plugin`

create plugin

## Path parameters

- `tenant_name` string, required

## Request body

- object
  - `build_model` string — 构建模式 in: body
  - `env_info` PluginDefaultENV[] — in: body
    - `env_name` string, required — 配置项名称 in: path
    - `env_value` string, required — 配置项值 in: path
    - `plugin_id` string — 对应插件id in: path
  - `git_url` string — git地址 in: body
  - `image_local` string — 插件goodrain地址 in: body
  - `image_url` string — 插件docker地址 in: body
  - `plugin_cmd` string — 插件启动命令 in: body
  - `plugin_id` string, required — in: body
  - `plugin_info` string — 插件用途描述 in: body
  - `plugin_model` string — 插件模式 in: body
  - `plugin_name` string, required — in: body
  - `repo` string — 带分支信息的git地址 in: body
  - `tenant_id` string — in: body

## Response `default`

统一返回格式

- CommandResponse — unresolved $ref

---

[API](https://skmtc.net/goodrain/apis/untitled-api.md) · [All operations](https://skmtc.net/goodrain/apis/untitled-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/goodrain/untitled-api/revisions/8c773e222448/schema)
