# 參數
---
id //可選的 插件id
name // 可選的 插件名稱
api_id // 可選的 基于該api_id字段的清單中的過濾器
consumer_id // 可選的
size // 可選,預設為100 對要傳回的對象數量的限制
offset // 可選的 用于分頁的光标 offset是一個對象辨別符用于定義清單中的一個位置
# 官文
---
教程: https://getkong.org/docs/.x/admin-api/#add-plugin
清單: https://getkong.org/plugins
文檔: https://getkong.org/docs/.x/admin-api/#add-plugin
開發: https://getkong.org/docs/.x/plugin-development/
# 配置插件
---
curl -i -X POST \
--url http://localhost:8001/apis/example-api/plugins/ \
--data 'name=key-auth'
# 擷取插件清單
---
擷取已用在API上面的插件清單
---
http://localhost:/plugins/
or
curl http://localhost:/plugins/
擷取已啟用的插件清單
---
http://localhost:/plugins/enabled
or
curl http://localhost:/plugins/enabled
# 擷取插件結構
---
/plugins/schema/{plugin name}
http://localhost:/plugins/schema/key-auth
or
http://localhost:/plugins/schema/key-auth
# 添加和更新插件
---
參考開發文檔 https://getkong.org/docs/.x/plugin-development/
# 删除API依賴插件
---
這裡的删除不是删除插件,隻是删除API依賴,怎麼删除插件我還在找
curl -i -X DELETE --url http://localhost:8001/apis/example-api/plugins/15308ced-153e-4005-b88c-f10f7b9b50bb
文章來源:http://blog.csdn.net/qq_26656329/article/details/78295987