Travis Jobs API - Version 3 broken

Jobs API for verion 3 return 503.
curl -v -H “Authorization: token yyy” -H “Travis-API-Version: 3” "https://api.travis-ci.com/jobs?state=failed

It Hangs forever :cry:

I have tried with different state created,started,passed,canceled,failed,errored in jobs API.
I get 503 for all job state except created state.

But the same Jobs API with all state params works in travis-ci.org, we need it to be worked in our private Travis.

Any workaround is welcome.

Hello, there.

We use the same code base for both .org and .com for this, so it is not clear to me what the difference might be. The actual data in question probably have something to do with it, but it’s hard to say conclusively.

In my testing, /jobs?state=failed does not really “hang forever”, but times out after 30 seconds. Without the filter on the HTTP request itself, my query returns in a few seconds; not great, but usable. I don’t know yet what the bottleneck is.

I am assuming that you are consuming the data with some JSON processor. In that scenario, it is not too difficult to filter the result after the HTTP request returns; e.g.,

curl -sSf -H "Travis-API-Version: 3"  -H "Authorization: token XXXXXX" https://api.travis-ci.com/jobs | jq -r '.jobs | map(select(.state == "passed"))'

Would something like that work for you?

Hello BanzaiMan,
Thanks for your reply, But We would be glad if there is a fix for this issue.
Because we are not managing the code base for Travis client in the service we are using.

Regarding the difference in org and com, We also thought the same, there should be some problem with data, but we haven’t sure that the data problem is only with our account or it for all account.

We really halted because of this issue, awaiting for some fix!!

Thanks