FreeKB - Kong delete Consumers API Key using curl
Kong - delete Consumers API Key using curl

The curl DELETE command can be used to delete a Consumers API Key.


On the Kong server

If Kong is running on docker, refer to Kong - Docker container command line for the steps on how to issue commands in the Kong Docker container. Assuming you are using the default kong.conf file, the Kong Admin API will listen on port 8001.

If issuing this command on the Kong server, this command will delete a Consumers API key.

curl -X DELETE "http://localhost:8001/consumers/consumer_name_or_id/key-auth/key_name_or_id"

 


From a remote server

If issuing this command from a remote server, this command will display a Consumer API key.

curl -X DELETE "http://hostname:8000/admin-api/consumers/consumer_name_or_id/key-auth/key_name_or_id"

 


Validation

If the delete is successful, there will be no output returned.

If the API key does not exist, the attempt to delete the API key will return the following.

{
 "message":"Not Found"
}

 



Add a Comment




We will never share your name or email with anyone. Enter your email if you would like to be notified when we respond to your comment.




Please enter 4f515 in the box below so that we can be sure you are a human.




Comments

Web design by yours truely - me, myself, and I   |   jeremy.canfield@freekb.net   |