I need to update about 100,000 issues due to addition of a custom field.
I am using python jira library. the code ran for some time and now i am getting error
KeyError: 'x-ratelimit-fillrate'
Since i was not sure how to get header values when i am getting this error from jira client, I ran similar code with jira rest api's using pyhon.
I see the response header has values like
"X-Ratelimit-Limit": "300000"
"X-Ratelimit-Remaining": "0",
"X-Ratelimit-Reset": "2024-02-07T07:40Z",
"Retry-After": "243",
I need guidance in terms of how to ensure i don't hit "X-Ratelimit-Remaining": "0", and complete my task of updating so many issues
.
Here is some documentation about rate limiting on Jira Cloud. You are on Cloud right?
That page shows you a code example of how to handle the headers and retry when you hit the limit.
When you hit "X-Ratelimit-Remaining": "0" or the Retry-After header is present you should wait that amount of seconds before executing a request again (243s in your example).
To my surprise the headers you mention are not all described on that page and are better explained on the Data Center documentation. If I'm not mistaken X-Ratelimit-Limit tells you how many request you can do in 5 minutes.
Thanks @Charlie Misonne
is there anyway to find out what the current value of X-Ratelimit-Remaining?
when i print(session.headers) not getting this value till failure?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vishal,
I'm note sure.
Do you see this one?: X-RateLimit-NearLimit
indicates that less than 20% of any budget remains.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Based on the response on stackflow thread, looks like rate limiting values come only when we hit error Code 429
how to get rate limit values in JIRA REST API of /rest/api/3/field
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.