Hereās an API creation request (lifted from docs) - just ran this with Postman against my local box:
Request URL:http://domain.com:3000/api/apis
Request Method:POST
Accept:*/*
Accept-Encoding:gzip, deflate
Accept-Language:en-GB,en;q=0.8,en-US;q=0.6,de;q=0.4,es;q=0.2
Authorization:822f2b1c75dc4a4a522944caa757976a
Cache-Control:no-cache
Connection:keep-alive
Content-Length:3355
Content-Type:text/plain;charset=UTF-8
Host:domain.com:3000
Origin:chrome-extension://fdmmgilgnpjigdojojpjoooidkmcomcm
Pragma:no-cache
{
"api_definition": {
"name": "Test API 2",
"auth": {
"auth_header_name": "authorization"
},
"definition": {
"location": "header",
"key": ""
},
"proxy": {
"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-path/",
"method_actions": {
"GET": {
"action": "no_action",
"code": 200,
"data": "",
"headers": {}
}
}
},
{
"path": "/test-path/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": [
"token"
]
},
"notifications": {
"shared_secret": "",
"oauth_on_keychange_url": ""
},
"enable_ip_whitelisting": true,
"allowed_ips": [
"127.0.0.1"
],
"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
}
]
}
Response was:
{
"Status": "OK",
"Message": "API created",
"Meta": "56a1076130c55e6c66000006"
}