# 參數
---
id //可選的 插件id
name // 可選的 插件名稱
api_id // 可選的 基於該api_id字段的列表中的過濾器
consumer_id // 可選的
size // 可選,默認爲100 對要返回的對象數量的限制
offset // 可選的 用於分頁的光標 offset是一個對象標識符用於定義列表中的一個位置
# 官文
---
教程: https://getkong.org/docs/0.11.x/admin-api/#add-plugin
列表: https://getkong.org/plugins
文檔: https://getkong.org/docs/0.11.x/admin-api/#add-plugin
開發: https://getkong.org/docs/0.11.x/plugin-development/
# 配置插件
---
curl -i -X POST \
--url http://localhost:8001/apis/example-api/plugins/ \
--data 'name=key-auth'
# 獲取插件列表
---
獲取已用在API上面的插件列表
---
http://localhost:8001/plugins/
or
curl http://localhost:8001/plugins/
獲取已啓用的插件列表
---
http://localhost:8001/plugins/enabled
or
curl http://localhost:8001/plugins/enabled
# 獲取插件結構
---
/plugins/schema/{plugin name}
http://localhost:8001/plugins/schema/key-auth
or
http://localhost:8001/plugins/schema/key-auth
# 添加和更新插件
---
參考開發文檔 https://getkong.org/docs/0.11.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