Adding the plugin using the Konnect API
About this task
When using the /plugin-schemas
API, authenticate your requests with either a personal access token or a system account token by including it in the authorization header:
--header 'Authorization: Bearer kpat_xgfT'
Steps
-
Upload the
schema.lua
file for your plugin using the/plugin-schemas
endpoint:curl -i -X POST \ https://{region}.api.konghq.com/konnect-api/api/runtime_groups/{controlPlaneId}/v2/plugin-schemas \ --header 'Content-Type: application/json' \ --data "{\"lua_schema\": <your escaped Lua schema>}"
Result:
You should get an
HTTP 201
response. -
To check that your schema was uploaded, use the following request:
curl -i -X GET \ https://{region}.api.konghq.com/konnect-api/api/runtime_groups/{controlPlaneId}/v1/available-plugins
Result:
This request returns an
HTTP 200
response with the schema for your plugin as a JSON object.