Imported Google Group message. Original thread at: Redirecting to Google Groups Import Date: 2016-01-19 21:33:35 +0000.
Sender:Victor Franzonatto
.
Date:Friday, 15 May 2015 23:15:34 UTC+1.
Hi,
I have the API:
[
{
“id”: “5556621ff6b73b0001000002”,
“name”: “Test API”,
“slug”: “test-api”,
“api_id”: “c793e0f762e7478e5f4df2b4cf6aa451”,
“org_id”: “55565e51f6b73b0001000001”,
“use_keyless”: false,
“use_oauth2”: false,
“oauth_meta”: {
“allowed_access_types”: [
],
“allowed_authorize_types”: [
],
“auth_login_redirect”: “”
},
“auth”: {
“use_param”: false,
“auth_header_name”: “Authorization”
},
“use_basic_auth”: true,
“notifications”: {
“shared_secret”: “”,
“oauth_on_keychange_url”: “”
},
“enable_signature_checking”: false,
“hmac_allowed_clock_skew”: -1,
“definition”: {
“location”: “header”,
“key”: “x-api-version”
},
“version_data”: {
“not_versioned”: true,
“versions”: {
“Default”: {
“name”: “Default”,
“expires”: “”,
“paths”: {
“ignored”: [
],
“white_list”: [
],
“black_list”: [
]
},
“use_extended_paths”: true,
“extended_paths”: {
“ignored”: [
],
“white_list”: [
],
“black_list”: [
],
“cache”: [
],
“transform”: [
],
“transform_headers”: [
]
}
}
}
},
“proxy”: {
“listen_path”: “/c793e0f762e7478e5f4df2b4cf6aa451/”,
“target_url”: “http://test-api:8080/”,
“strip_listen_path”: true
},
“custom_middleware”: {
“pre”: [
],
“post”: [
]
},
“cache_options”: {
“cache_timeout”: 60,
“enable_cache”: true,
“cache_all_safe_requests”: false,
“enable_upstream_cache_control”: false
},
“session_lifetime”: 0,
“active”: true,
“auth_provider”: {
“name”: “”,
“storage_engine”: “”,
“meta”: {
}
},
“session_provider”: {
“name”: “”,
“storage_engine”: “”,
“meta”: null
},
“event_handlers”: {
“events”: {
}
},
“enable_batch_request_support”: false,
“enable_ip_whitelisting”: false,
“allowed_ips”: [
],
“dont_set_quota_on_create”: false,
“expire_analytics_after”: 0
}
]
And i do the request:
POST /tyk/keys/55564c62a5ed9c0001000001a81a9484a24442ca72947822765b03c5 -d ’
{
“allowance”: 999,
“rate”: 1000,
“per”: 60,
“expires”: 0,
“quota_max”: -1,
“quota_renews”: 1406121006,
“quota_remaining”: 0,
“quota_renewal_rate”: 60,
“access_rights”: {
“c793e0f762e7478e5f4df2b4cf6aa451”: {
“api_name”: “Test API”,
“api_id”: “c793e0f762e7478e5f4df2b4cf6aa451”
}
},
“org_id”: “55565e51f6b73b0001000001”
}
’
Gateway log:
time=“2015-05-15T22:07:58Z” level=info msg=“New key added or updated.” key=“55564c62a5ed9c0001000001a81a9484a24442ca72947822765b03c5”
When I try to get the API Keys, none is returned:
GET tyk/keys/?api_id=c793e0f762e7478e5f4df2b4cf6aa451
Return:
{
“keys”:[
]
}
Any thoughts?
Thanks,
Victor.