Second page of worklog gives 405 Method not allowed

I’m calling https://mysite.atlassian.net/rest/api/2/worklog/updated?since=1514674800000 without any problems. However, it’s more than 1000 records.

No problem, I call the nextPage information like this: https://mysite.atlassian.net/rest/api/2/worklog/updated?since=1516263457151

But then I get 405 method not allowed.

I don’t see any difference between these 2 calls.

Why am I not getting the second page of data?

Thank you!

Calling https://mysite.atlassian.net/rest/api/2/worklog/updated?since=1516263457151 separate doesn’t give errors, so it’s only when I’m looping :confused:

The example response on the reference page for worklog updated shows 2 “since” parameters in the querystring. Is this the same in the response you’re getting? Have you tried calling it with both “since” parameters as received from the response?

Thank you for the suggestion, but the result stays the same.

I did some further testing. The example I provided above is simplified. Between the 2 calls I call other api functions. All the others are POST.

As soon as I do 1 POST, I can no longer do a GET (error 405). So if I comment out all the posts, it’s no problem to do the 2 calls mentioned earlier.

So:

  • GET, POST: fine
  • GET, GET: fine
  • GET, POST, GET: error

:confounded:

Upon further debugging I found the fetch arguments where not properly cleared between 2 calls. this caused the payload to move from request tot request. As long as it where posts, the payload was overwritten and there was no problem. At the next GET however, the payload was not cleared.

So my bad. :slight_smile: It would be helpful though I got more feedback than 405!