# How to debug the kong API on community edition

**URL:** <https://discuss.konghq.com/t/how-to-debug-the-kong-api-on-community-edition/2789>\
**Category:** Questions\
**Created:** [February 11, 2019, 5:35am UTC](https://discuss.konghq.com/t/how-to-debug-the-kong-api-on-community-edition/2789 "2019-02-11T05:35:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Santosh\_Ghalsasi](https://avatars.discourse-cdn.com/v4/letter/s/0ea827/32.png) [@Santosh\_Ghalsasi](https://discuss.konghq.com/u/Santosh_Ghalsasi)\
**Post date:** [February 11, 2019, 5:35am UTC](https://discuss.konghq.com/t/how-to-debug-the-kong-api-on-community-edition/2789/1 "2019-02-11T05:35:56Z")

</div>

Hi,  
I am trying to create a pass-through API proxy using Kong community edition. I have used below commands to create/add the service, route and basic auth plugin

1. Service -  
curl -i -X POST [http://localhost:8001/services/](http://localhost:8001/services/)   
-d ‘name=foo-service’   
-d ‘url=http://xxxxxxxxxxxx.com:8080’

2. Route -

curl -i -X POST [http://localhost:8001/routes/](http://localhost:8001/routes/)   
-d ‘hosts[]=[xxxxxxxxxxxx.com](http://xxxxxxxxxxxx.com)’   
-d ‘paths[]=/api/CustomerManagement/V1/customer’   
-d ‘strip\_path=false’   
-d ‘service.id=dadae525-602d-46e2-9d17-580830d44b8f’   
-d ‘methods[]=GET’   
-d ‘methods[]=POST’   
-d ‘methods[]=PATCH’   
-d ‘methods[]=DELETE’

1. Basic Auth plugin -

curl -X POST [http://localhost:8001/routes/4f181b2a-ea70-4d7f-8c67-669f60c20bbf/plugins](http://localhost:8001/routes/4f181b2a-ea70-4d7f-8c67-669f60c20bbf/plugins)   
–data “name=basic-auth”   
–data “config.hide\_credentials=true”

1. Consumer -

curl -i -X POST   
–url [http://localhost:8001/consumers/](http://localhost:8001/consumers/)   
–data “username=abcorgapp”

1. Create credentials -

curl -X POST [http://localhost:8001/consumers/abcorgapp/basic-auth](http://localhost:8001/consumers/abcorgapp/basic-auth)   
–data “username=abcorguser”   
–data “password=demo2019”

1. Call API -

curl -i -X GET   
–url [http://localhost:8000/api/CustomerManagement/V1/customer](http://localhost:8000/api/CustomerManagement/V1/customer)   
–header “Host: [xxxxxxxxxxx.com](http://xxxxxxxxxxx.com)”   
–header ‘Authorization: Basic YWJjb3JndXNlcjpkZW1vMjAxOQo=’

The kong is running on docker container and the backend service that I want to hit is also on another container. I am able to hit that service using curl command from the machine where docker engine is running.

I am getting below error when I hit the API.

HTTP/1.1 404  
Content-Length: 0  
Connection: keep-alive  
Date: Mon, 11 Feb 2019 05:27:02 GMT  
X-Kong-Upstream-Latency: 44  
X-Kong-Proxy-Latency: 5  
Via: kong/1.0.2

This must be coming from Kong to backend connectivity because - If I call the API with incorrect path then it gives the route not matched error, If I give wrong credentials then it gives a 403 forbidden error. So connection between postman to Kong is working fine but there is something missing to configure.

Can anyone help me and let me know how to debug this issue of if I have to do more configuration to make this work?

Regards,  
Santosh
