# Query meta-data by build\_id

**URL:** <https://forum.buildkite.community/t/query-meta-data-by-build-id/2289>\
**Category:** Features Requests\
**Created:** [October 6, 2022, 12:09am UTC](https://forum.buildkite.community/t/query-meta-data-by-build-id/2289 "2022-10-06T00:09:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![simonbyrne](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/simonbyrne/32/847_2.png) [@simonbyrne](https://forum.buildkite.community/u/simonbyrne)\
**Post date:** [October 6, 2022, 12:09am UTC](https://forum.buildkite.community/t/query-meta-data-by-build-id/2289/1 "2022-10-06T00:09:15Z")

</div>

[`buildkite-agent meta-data get`](https://buildkite.com/docs/agent/v3/cli-meta-data#getting-data) currently has a `--job` argument , which requires a `JOB_ID`. Would it be possible to allow it also be queried by `BUILD_ID` (similar to the `--build` argument in the [`buildkite-agent artifact download`](https://buildkite.com/docs/agent/v3/cli-artifact#downloading-artifacts)?

---

<div class="post-metadata">

**Author:** ![benmc](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/benmc/32/1159_2.png) [@benmc](https://forum.buildkite.community/u/benmc)\
**Post date:** [October 6, 2022, 3:55am UTC](https://forum.buildkite.community/t/query-meta-data-by-build-id/2289/2 "2022-10-06T03:55:36Z")

</div>

Hey @simonbyrne!

This sounds like a fair suggestion. It might be worth opening it as an issue on [the agent repo on GitHub](https://github.com/buildkite/agent) to gain some visibility around it, especially if others would like that flag to be added.

Depending on what you’re hoping to do with the meta-data, it is available in REST API calls when you [get a build](https://buildkite.com/docs/apis/rest-api/builds#get-a-build).

Cheers,

Ben

---

<div class="post-metadata">

**Author:** ![simonbyrne](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/simonbyrne/32/847_2.png) [@simonbyrne](https://forum.buildkite.community/u/simonbyrne)\
**Post date:** [November 5, 2022, 11:40pm UTC](https://forum.buildkite.community/t/query-meta-data-by-build-id/2289/3 "2022-11-05T23:40:08Z")

</div>

Thanks, I have opened an issue here: [Query meta-data by build\_id · Issue #1776 · buildkite/agent · GitHub](https://github.com/buildkite/agent/issues/1776)
