API Created via Tyk Gateway REST API is not visible on Dashboard

Using docker I have installed the following:
tyk_gateway,
tyk_dashboard,
redis,
mongodb

When I use the Gateway’s REST API to create a new API, I get a success message. But I don’t see it on the dashboard.
I tried :

  1. Refreshing the dashboard
  2. Hot reloading the changes via Gateway’s REST API
  3. Restarting the Gateway

I followed the steps mentioned here: https://tyk.io/docs/with-tyk-community-edition/tutorials/create-api/

Why is the new API not visible on the dashboard?

Hi Priyank,
if you use the gateway APIs to create an API, there is no record in the dashboard. Use the dashboard APIs Tyk Dashboard API and the API will be visible in the dashboard.

Note: the dashboard API is not available with the Open Source version as is the Dashboard itself.

In addition, should you wish to see analytics, please install Tyk_Pump as well.

Happy Tyk’ing!
/mike

1 Like

Ok APIs are visible only via the interface they were created through. If I created an API via dashboard, is there another endpoint I can use to query it?

On the Dashboard, it show the API’s Base URL as http://tyk.docker/<listen_path>/

I have dashboard.tyk.docker pointed to 127.0.0.1 in /etc/hosts but tyk.docker is not mapped anywhere. I suppose it should point to CE Gateway server, which happens to be the same machine.

So I tried to access the API created via dashboard:

curl -H "x-tyk-authorization: 352d20ee67be67f6340b4c0605b044b7" -H "Authorization: 5d81e493abc6d700019d1f991f01fd3d15be4b28991055fa51a53ac1" -s http://localhost:8080/my-api/

I get:

404 page not found

But if I try to access API created via REST API, it works.

curl -H "x-tyk-authorization: 352d20ee67be67f6340b4c0605b044b7" -H "Authorization: 5d81e493abc6d700019d1f991f01fd3d15be4b28991055fa51a53ac1" -s http://localhost:8080/test-api/

I get

{ "error": "Key has expired, please renew" }

I am not concerned about the key expiry error. Just testing whether it is recognizing that test-api exists.

How do I use the API’s created via Dashboard?