Hi,
I need help figuring out how how to create an API. I’m new to Tyk and installed the on-prem Pro version with the Vagrant instructions. I’m trying to create an API through the Dashboard REST API following this tutorial:
https://tyk.io/tyk-documentation/get-started/with-tyk-on-premise/tutorials/tyk-premise-pro/create-an-api/
I used cURL to send an almost identical request as shown in the tutorial, changing only things like API name, and API key (which I got through the dashboard for the example generated user as instructed in the tutorials). I get this error:
{
“Message”: “API object validation failed, most likely malformed input”,
“Meta”: null,
“Status”: “Error”
}
My example request follows:
curl -H “Authorization: a768f533927f41c065c9db703cc88070”
-s
-H “Content-Type: application/json”
-X POST
-d ‘{
“api_definition”: {
“name”: “My API Test”,
“slug”: “myapi-test-api”,
“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”: “/myapi_test/”,
“target_url”: “http://httpbin.org/”,
“strip_listen_path”: true
},
“active”: true
}
}’ http://localhost:3000/api/apis/ | python -mjson.tool
Thanks for any help you can provide.