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

## Changes

- **2017-11-07** `5e3ca7f5dfc5` — 1 info
  - endpoint added
- **2017-11-07** `7b547fba71aa` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/goodrain/apis/untitled-api/changes/v2/tenants/:tenant_name/plugin/post.md)

---

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