Create a Kong entity
kong_createCreate a new Kong entity by specifying the collection path and a JSON body according to the Kong schema. Ideal for adding services, routes, plugins, and more.
Instructions
Create a new entity (POST /). Pass the entity body as data. Example: entity='services', data={ name:'example', url:'http://httpbin.org' }. Tip: use kong_plugin_schema first when creating plugins to get valid config fields.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | The entity object to create (JSON), per the Kong schema. | |
| entity | Yes | The Admin API collection path. Plain entity name (e.g. 'services', 'routes', 'consumers', 'plugins', 'upstreams', 'certificates') or a nested collection path (e.g. 'upstreams/my-upstream/targets', 'services/my-service/routes', 'consumers/bob/key-auth'). Common values: services, routes, consumers, consumer_groups, plugins, upstreams, certificates, ca_certificates, snis, vaults, keys, key-sets, workspaces, acls, tags, upstreams/<upstream>/targets, services/<service>/routes, services/<service>/plugins, routes/<route>/plugins, consumers/<consumer>/plugins, consumers/<consumer>/key-auth, consumers/<consumer>/basic-auth, consumers/<consumer>/jwt, consumers/<consumer>/hmac-auth, consumers/<consumer>/acls, rbac/roles, rbac/users, admins, groups, event-hooks, developers. | |
| workspace | No | EE workspace to scope this request to. Overrides the configured default workspace. Leave empty for OSS or the 'default' workspace. |