Tyk-gateway standalone mode


I was tyk-gateway without dashboard on centos. After all setup, I am hitting an issue on creating api. Basically api creation seems to fail. I get following response for api creation with key field being empty

“action”: “added”,
“key”: “”,
“status”: “ok”

Following is the snippet for debug log
time=“Dec 19 18:21:24” level=debug msg=POST
time=“Dec 19 18:21:24” level=debug msg=“Creating new definition file”
time=“Dec 19 18:21:24” level=warning msg=“API Definition with this ID already exists, deleting file…”

Following is the add-api post that I am making
curl -H “x-tyk-authorization: {secret}”
-H “Content-Type: application/json”
-d ‘{
“api_definition”: {
“name”: “Test API”,
“slug”: “test-api”,
“api_id”: “1”,
“org_id”: “1”,
“auth”: {
“auth_header_name”: “Authorization”
“definition”: {
“location”: “header”,
“key”: “x-api-version”
“version_data”: {
“not_versioned”: true,
“versions”: {
“Default”: {
“name”: “Default”,
“use_extended_paths”: true
“proxy”: {
“listen_path”: “/test-api/”,
“target_url”: “http://tyk-vagrant2:9080/”,
“strip_listen_path”: true
“active”: true
http://tyk-vagrant2:8080/tyk/apis/ | python -mjson.tool

Appreciate any pointers.


Have you checked if there are any files in the apps folder? Tyk ships with a demo that has api id of 1, you might need to delete the file (or use the API)


Thanks for reply. I deleted the default file as well as tried using random ids but with same result. Is the “api_id” in the post used by gateway or does it allocate one internally? The “org_id” is “1” as shown in documentation but I never created it - I am guessing that is not the issue.

Did you restart the gateway after deleting the file?

Yes Martin but same issue persists.

Can you share your gateway log output?