API version error

Imported Google Group message. Original thread at: Redirecting to Google Groups Import Date: 2016-01-19 21:12:02 +0000.
Sender:Jayadatta Vallabhaneni.
Date:Friday, 8 May 2015 22:29:47 UTC+1.

Martin,

I tried creating couple of API’s with version enabled. Added it to the policy and to the key. I am getting the below error when trying to post the data to the API. Do you know if this is some kind of cache related issue? Below is the version information from apis collection. I added the version as 1.0 with no expiry date in dashboard.

“version_data” : {
“not_versioned” : false,
“versions” : {
“MS4w” : {
“name” : “MS4w”,
“expires” : “”,
“paths” : {
“ignored” : [],
“white_list” : [],
“black_list” : []
},
“use_extended_paths” : true,
“extended_paths” : {
“ignored” : [],
“white_list” : [],
“black_list” : [],
“cache” : [],
“transform” : [],
“transform_headers” : []
}
},
“RGVmYXVsdA==” : {
“name” : “RGVmYXVsdA==”,
“expires” : “”,
“paths” : {
“ignored” : [],
“white_list” : [],
“black_list” : []
},
“use_extended_paths” : true,
“extended_paths” : {
“ignored” : [],
“white_list” : [],
“black_list” : [],
“cache” : [],
“transform” : [],
“transform_headers” : []
}
}
}
}

~Jaya

Imported Google Group message.
Sender:Martin Buhr.
Date:Friday, 8 May 2015 22:34:05 UTC+1.

Hi Jaya,

Hmm, nothing wrong with the definitions from what I can see (Tyk b64 encodes the names because of Mongo weirdness), what is the error? I think you forgot to attach it :wink:

Cheers,
Martin

Imported Google Group message.
Sender:Jayadatta Vallabhaneni.
Date:Friday, 8 May 2015 22:39:55 UTC+1.

hmm. Below is the error when i try to post it.

{
“error”: “This API version does not seem to exist”
}

~Jaya

  • show quoted text -

Imported Google Group message.
Sender:Martin Buhr.
Date:Friday, 8 May 2015 22:49:04 UTC+1.

Hi Jaya,

So there’s a version ‘1.0’ and a ‘Default’, what does the request look like that you are sending in? As in, I assume it’s a header value, but would help to see a curl example or the raw request to see what it looks like so I can try and replicate :slight_smile:

Cheers,
Martin

Imported Google Group message.
Sender:Jayadatta Vallabhaneni.
Date:Friday, 8 May 2015 23:05:24 UTC+1.

I found the issue. It is the client that is creating the issue. Captured the network packets and for some reason the client is adding extra value for the same header. It is getting transmitted like the below.

x-api-version: 1.0, 1.0

Thanks for your help Martin.

~Jay

  • show quoted text -