I am trying to create an API in Tyk on Premise Community Edition using Gateway REST API as per the tutorial, but after executing the command
curl -H “x-tyk-authorization: {your-secret}”
-s
-H “Content-Type: application/json”
-X POST
-d ‘{
“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://httpbin.org/”,
“strip_listen_path”: true
},
“active”: true
}’ https://{your-tyk-host}:{port}/tyk/apis/ | python -mjson.tool
with the required values, I am getting error “No JSON object could be decoded”.
Any idea why this error is coming??