Hi,
I am using Tyk Dashboard and Tyk Gateway. I am able to create APIs using Dashboard API. They are also visible in the dashboard. However, I cannot consume them untill I open the API in dashboard for edit and click on ‘Update’. For example, if I created an API with following definition using the dashboard API http://DOMAIN-NAME:3000/api/apis/:
{ "api_definition": { "name": "test-api", "auth": { "auth_header_name": "authorization" }, "definition": { "location": "header", "key": "" }, "proxy": { "listen_path": "/test-api/", "target_url": "http://httpbin.org/" }, "version_data": { "use_extended_paths": true, "not_versioned": true, "versions": { "Default": { "expires": "", "name": "Default", "paths": { "ignored": [], "white_list": [], "black_list": [] }, "extended_paths": { "ignored": [ { "path": "/test-api/", "method_actions": { "GET": { "action": "no_action", "code": 200, "data": "", "headers": {} } } }, { "path": "/test-api/reply", "method_actions": { "GET": { "action": "reply", "code": 200, "data": "{\"foo\": \"bar\"}", "headers": { "x-test": "test" } } } } ], "white_list": [], "black_list": [] }, "use_extended_paths": true } } }, "use_oauth2": false, "oauth_meta": { "auth_login_redirect": "", "allowed_access_types": [], "allowed_authorize_types": [] }, "notifications": { "shared_secret": "", "oauth_on_keychange_url": "" }, "enable_ip_whitelisting": false, "allowed_ips": [], "use_keyless": false, "enable_signature_checking": false, "use_basic_auth": false, "active": true, "enable_batch_request_support": true }, "hook_references": [ { "event_name": "QuotaExceeded", "hook": { "api_model": {}, "id": "54be6c0beba6db07a6000002", "org_id": "54b53d3aeba6db5c35000002", "name": "Test Post", "method": "POST", "target_path": "http://httpbin.org/post", "template_path": "", "header_map": { "x-tyk-test": "123456" }, "event_timeout": 0 }, "event_timeout": 60 } ] }
and try to access the API http://DOMAIN-NAME:8080/test-api/reply then it throws following error:
<title>404 Not Found</title>
<h1>Not Found</h1>
<p>The requested URL was not found on the server. If you entered the URL manually please check your spelling and try again.</p>
Now, if I edit the API in dashboard and click Update without any changes then I get the following expected result:
{“foo”: “bar”}
Am I required to explicitly call more of the Dashboard or Gateway APIs (say to reload) after the creation of new API?
Any pointers would be helpful.