Kong - remove a service

Viewed 1010

Is there any way to remove a service from kong's database.

Right now when I am running an instance again I am getting the unique constraint error from kong.

1 Answers

You can use the admin API, just use DELETE on /services/ with id or name

For example to delete the service with id 0f32ae39-d338-4074-a112-c5106c99776d

curl -X DELETE http://localhost:8001/services/0f32ae39-d338-4074-a112-c5106c99776d

To delete the service with name serviceFoo

curl -X DELETE http://localhost:8001/services/serviceFoo
Related