<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ## 7\. Plugins *地址*:/plugins *說明*:插件,插件作用域:global、service、route,優先級:route>service>global ### 7.1 請求方法 | 序號 | NAME | 請求URI | 請求body | 說明 | | --- | --- | --- | --- | --- | | 1 | POST | /plugins | {...} | 新增全局插件 | | 2 | ~ | /routes/{route id}/plugins | ~ | 新增route范圍內的插件 | | 3 | ~ | /services/{service id}/plugins | ~ | 新增service范圍內的插件 | | 4 | ~ | /consumers/{consumer id}/plugins | ~ | 新增consumer權限下的插件 | | 5 | GET | /plugins | | 查詢插件列表 | | 6 | ~ | /routes/{route id}/plugins | | 查詢路由下的所有插件 | | 7 | ~ | /services/{service id}/plugins | | 查詢sercie下的所有插件 | | 8 | ~ | /consumers/{consumer id}/plugins | | 查詢consumer下的所有插件 | | 9 | GET | /plugins/{plugin id} | | 獲取插件信息 | | 10 | PATCH | /plugins/{plugin id} | | 更新插件信息 | | 11 | PUT | /plugins/{plugin id} | | 新增/更新插件信息 | | 12 | DELETE | /plugins/{plugin id} | | 刪除插件 | | 13 | GET | /plugins/schema/{plugin name} | 插件名稱 | 獲取plugin的schema | | ***14*** | ***GET*** | ***/plugins/enabled*** | \*\*\*\*\*\* | ***v1.3.x版本以上*** | ### 7.2 body 請求參數 | 序號 | 參數名 | 可選 | 默認值 | 說明 | 示例 | | --- | --- | --- | --- | --- | --- | | 1 | name | 必選 | | 插件名稱 | basic-auth | | 2 | route | 可選 | | 路由ID | "route":{"id":""} | | 3 | service | 可選 | | serviceID | "service":{"id":""} | | 4 | consumer | | | consumerID | "consumer":{"id":""} | | 5 | config | 可選 | {} | | | | 6 | run\_on | 必選 | first | | | | 7 | protocols | | \["http","https"\] | `"http"`,`"https"`,`"tcp"`, and`"tls"` | | | 8 | enabled | 可選 | true | 是否啟用 | true or false | | 9 | tags | 可選 | | 標簽 | | ### 7.3 數據樣例 body 請求參數 ``` { "id": "ec1a1f6f-2aa4-4e58-93ff-b56368f19b27", "name": "rate-limiting", "created_at": 1422386534, "route": null, "service": null, "consumer": null, "config": {"hour":500, "minute":20}, "run_on": "first", "protocols": ["http", "https"], "enabled": true, "tags": ["user-level", "low-priority"] } ``` 插件列表 ``` { "data": [{ "id": "a4407883-c166-43fd-80ca-3ca035b0cdb7", "name": "rate-limiting", "created_at": 1422386534, "route": null, "service": null, "consumer": null, "config": {"hour":500, "minute":20}, "run_on": "first", "protocols": ["http", "https"], "enabled": true, "tags": ["user-level", "low-priority"] }, { "id": "01c23299-839c-49a5-a6d5-8864c09184af", "name": "rate-limiting", "created_at": 1422386534, "route": null, "service": null, "consumer": null, "config": {"hour":500, "minute":20}, "run_on": "first", "protocols": ["tcp", "tls"], "enabled": true, "tags": ["admin", "high-priority", "critical"] }], "next": "http://localhost:8001/plugins?offset=6378122c-a0a1-438d-a5c6-efabae9fb969" } ``` 插件schema ``` { "fields": { "hide_credentials": { "default": false, "type": "boolean" }, "key_names": { "default": "function", "required": true, "type": "array" } } } ```
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看