Meta API Cache

Skip to first unread message

Oct 29, 2020, 4:12:18 PM10/29/20
to VersionOne-dev
Hello guys,

I'm working on a tool that uses the VersionOne Meta API. I need to get details about defect attributes in the JSON format so I send the following request (I'm using the API Examples VersionOne instance just for demonstrating purposes):

curl -H 'Authorization: Bearer 1.aBg7sVXSZeEsf3cwvQFEdkkt384=' -H 'Accept: application/json'

It worked fine. But in one day I noticed it gets the response in the XML format. I've started to dig and found the response is cached for one hour (Cache-Control: public, max-age=3600) and the Vary header includes only the Accept-Encoding header and doesn't include the Content-Type header. So if the cache is stale and someone sends a request for getting metadata in the XML format, that response will be cached for 1 hour and sent to everyone disregarding the Accept header value specified in the request. I've tried to add -H 'Cache-Control: no-store' to the request but it doesn't help.

The issue can be reproduced by following these steps:
  1. curl -H 'Authorization: Bearer 1.aBg7sVXSZeEsf3cwvQFEdkkt384=' -H 'Accept: application/json' -H 'Cache-Control: no-store'
  2. curl -H 'Authorization: Bearer 1.aBg7sVXSZeEsf3cwvQFEdkkt384=' -H 'Accept: text/xml' -H 'Cache-Control: no-store'
Can anybody from the VersionOne team handle that issue, please?


Nov 10, 2020, 12:24:07 PM11/10/20
to VersionOne-dev
We have a defect in our backlog about meta.v1 handler erroneously responding with same ETag for different response content types (XML vs JSON), which then leads to our CDN provider returning improperly-cached response and omitting "Vary: Accept" response header.

As a workaround, you could pass desired content type via "accept" query string parameter instead of "Accept" header, ie

Nov 11, 2020, 8:55:43 AM11/11/20
to VersionOne-dev
Thank you so much, Pavel!

вторник, 10 ноября 2020 г. в 19:24:07 UTC+2, pavel:

deep thoughtm

Nov 11, 2020, 8:55:43 AM11/11/20
Try support at or stack overflow.  You probably won’t get a response here from V1 team since they stopped supporting the versionOne-dev group about 5 years or so ago.

You received this message because you are subscribed to the Google Groups "VersionOne-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit

Reply all
Reply to author
0 new messages