# https://buildkite.com/organizations/X/jobs?q=state:failed not available?

**URL:** <https://forum.buildkite.community/t/https-buildkite-com-organizations-x-jobs-q-state-failed-not-available/719>\
**Category:** General\
**Created:** [October 2, 2019, 9:15pm UTC](https://forum.buildkite.community/t/https-buildkite-com-organizations-x-jobs-q-state-failed-not-available/719 "2019-10-02T21:15:27Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![nathan.pierce](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/nathan.pierce/32/393_2.png) [@nathan.pierce](https://forum.buildkite.community/u/nathan.pierce)\
**Post date:** [October 2, 2019, 9:15pm UTC](https://forum.buildkite.community/t/https-buildkite-com-organizations-x-jobs-q-state-failed-not-available/719/1 "2019-10-02T21:15:27Z")

</div>

I’d love to be able to visit [https://buildkite.com/organizations/X/jobs?q=state:failed](https://buildkite.com/organizations/X/jobs?q=state:failed) and see all failed jobs. Is this possible? Even better would be a list of failed jobs and filter by agent.

It doesn’t look as if that’s possible and the page says:

Server request for query `Jobs_OrganizationRelayQL` failed for the following reasons: 1. Variable state\_3 of type [JobStates!]! was provided invalid value for 0 (Expected “FAILED” to be one of: PENDING, WAITING, WAITING\_FAILED, BLOCKED, BLOCKED\_FAILED, UNBLOCKED, UNBLOCKED\_FAILED, LIMITING, LIMITED, SCHEDULED, ASSIGNED, ACCEPTED, RUNNING, FINISHED, CANCELING, CANCELED, TIMING\_OUT, TIMED\_OUT, SKIPPED, BROKEN) type\_2:[JobTypes!]!,$state\_3:[JobStates!]!,$concurrency\_4:Jo ^^^

---

<div class="post-metadata">

**Author:** ![anon85971592](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@anon85971592](https://forum.buildkite.community/u/anon85971592)\
**Post date:** [October 3, 2019, 10:36am UTC](https://forum.buildkite.community/t/https-buildkite-com-organizations-x-jobs-q-state-failed-not-available/719/2 "2019-10-03T10:36:23Z")

</div>

@nathan.pierce doesn’t that exact URL just work right now? :)

---

<div class="post-metadata">

**Author:** ![nathan.pierce](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/nathan.pierce/32/393_2.png) [@nathan.pierce](https://forum.buildkite.community/u/nathan.pierce)\
**Post date:** [October 3, 2019, 1:03pm UTC](https://forum.buildkite.community/t/https-buildkite-com-organizations-x-jobs-q-state-failed-not-available/719/3 "2019-10-03T13:03:51Z")

</div>

Not sure why, but I didn’t include the error I see. Sorry about that.  
Note: I’m using my org name in place of X in the url.

---

<div class="post-metadata">

**Author:** ![nathan.pierce](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/nathan.pierce/32/393_2.png) [@nathan.pierce](https://forum.buildkite.community/u/nathan.pierce)\
**Post date:** [October 7, 2019, 1:26pm UTC](https://forum.buildkite.community/t/https-buildkite-com-organizations-x-jobs-q-state-failed-not-available/719/4 "2019-10-07T13:26:35Z")

</div>

@anon85971592 Any ideas why this isn’t possible for us?

---

<div class="post-metadata">

**Author:** ![anon85971592](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@anon85971592](https://forum.buildkite.community/u/anon85971592)\
**Post date:** [October 8, 2019, 1:15am UTC](https://forum.buildkite.community/t/https-buildkite-com-organizations-x-jobs-q-state-failed-not-available/719/5 "2019-10-08T01:15:30Z")

</div>

@nathan.pierce doh! I must have been low on coffee when I wrote that. You’re right, that’s totally not a thing.

Just shipping a PR now to make it real. I’ll let you know when it’s live.

---

<div class="post-metadata">

**Author:** ![anon85971592](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@anon85971592](https://forum.buildkite.community/u/anon85971592)\
**Post date:** [October 8, 2019, 1:49am UTC](https://forum.buildkite.community/t/https-buildkite-com-organizations-x-jobs-q-state-failed-not-available/719/6 "2019-10-08T01:49:08Z")

</div>

@nathan.pierce 🚀

`state=failed` isn’t a thing I’m afraid, however `state=finished passed=false` is a thing!

---

<div class="post-metadata">

**Author:** ![nathan.pierce](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/nathan.pierce/32/393_2.png) [@nathan.pierce](https://forum.buildkite.community/u/nathan.pierce)\
**Post date:** [October 8, 2019, 1:16pm UTC](https://forum.buildkite.community/t/https-buildkite-com-organizations-x-jobs-q-state-failed-not-available/719/7 "2019-10-08T13:16:40Z")

</div>

Passed:false looks like it will work!  
However, I tried [https://buildkite.com/organizations/X/jobs?q=passed:false](https://buildkite.com/organizations/X/jobs?q=passed:false) and it’s just sitting there with the loading icon for a looong time. It eventually throws:

`Server request for query`Jobs\_OrganizationRelayQL`failed for the following reasons: 1. An error occurred while executing your GraphQL query. Please contact hello@buildkite.com for help and provide this query in the email.`

Is there a way to limit the search to certain agents, using regex on the queue attribute?

---

<div class="post-metadata">

**Author:** ![nathan.pierce](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/nathan.pierce/32/393_2.png) [@nathan.pierce](https://forum.buildkite.community/u/nathan.pierce)\
**Post date:** [October 11, 2019, 2:01pm UTC](https://forum.buildkite.community/t/https-buildkite-com-organizations-x-jobs-q-state-failed-not-available/719/8 "2019-10-11T14:01:03Z")

</div>

Any ideas @anon85971592 ?

---

<div class="post-metadata">

**Author:** ![anon18197598](https://avatars.discourse-cdn.com/v4/letter/a/9d8465/32.png) [@anon18197598](https://forum.buildkite.community/u/anon18197598)\
**Post date:** [October 16, 2019, 4:17am UTC](https://forum.buildkite.community/t/https-buildkite-com-organizations-x-jobs-q-state-failed-not-available/719/9 "2019-10-16T04:17:20Z")

</div>

I’d guess because that isn’t hitting our database indexes and it’s timing out. Are you able to include `state=finished` too?

---

<div class="post-metadata">

**Author:** ![nathan.pierce](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/nathan.pierce/32/393_2.png) [@nathan.pierce](https://forum.buildkite.community/u/nathan.pierce)\
**Post date:** [October 18, 2019, 4:19pm UTC](https://forum.buildkite.community/t/https-buildkite-com-organizations-x-jobs-q-state-failed-not-available/719/11 "2019-10-18T16:19:22Z")

</div>

How do I include two of them?

[https://buildkite.com/organizations/EOSIO/jobs?q=passed:false+state:finished](https://buildkite.com/organizations/EOSIO/jobs?q=passed:false+state:finished) - times out  
[https://buildkite.com/organizations/EOSIO/jobs?q=passed:false&state:finished](https://buildkite.com/organizations/EOSIO/jobs?q=passed:false&state:finished) - removes the second section

I tried a few options too:  
[https://buildkite.com/organizations/EOSIO/jobs?q[]=passed:false&q[]=state:finished](https://buildkite.com/organizations/EOSIO/jobs?q%5B%5D=passed:false&q%5B%5D=state:finished)  
[https://buildkite.com/organizations/EOSIO/jobs?q=passed:false&state:finished](https://buildkite.com/organizations/EOSIO/jobs?q=passed:false&state:finished)

No luck…

Also, can I use time ranges?

---

<div class="post-metadata">

**Author:** ![anon18197598](https://avatars.discourse-cdn.com/v4/letter/a/9d8465/32.png) [@anon18197598](https://forum.buildkite.community/u/anon18197598)\
**Post date:** [October 19, 2019, 9:28pm UTC](https://forum.buildkite.community/t/https-buildkite-com-organizations-x-jobs-q-state-failed-not-available/719/12 "2019-10-19T21:28:03Z")

</div>

Should just be:

[https://buildkite.com/organizations/X/jobs?passed=false&state=finished](https://buildkite.com/organizations/X/jobs?passed=false&state=finished)

I’ll check on the time ranges front.

---

<div class="post-metadata">

**Author:** ![nathan.pierce](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/nathan.pierce/32/393_2.png) [@nathan.pierce](https://forum.buildkite.community/u/nathan.pierce)\
**Post date:** [October 21, 2019, 1:20pm UTC](https://forum.buildkite.community/t/https-buildkite-com-organizations-x-jobs-q-state-failed-not-available/719/13 "2019-10-21T13:20:17Z")

</div>

When I use that, I see

 ![53%20AM](https://us1.discourse-cdn.com/flex016/uploads/buildkite1/original/1X/aa452d31a34ddd0af31eca5bc828cb503e75aa24.png)

Seems like there is something wrong.
