# Step key for trigger steps

**URL:** <https://forum.buildkite.community/t/step-key-for-trigger-steps/1208>\
**Category:** General\
**Created:** [August 26, 2020, 2:53am UTC](https://forum.buildkite.community/t/step-key-for-trigger-steps/1208 "2020-08-26T02:53:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ngan](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/ngan/32/662_2.png) [@ngan](https://forum.buildkite.community/u/ngan)\
**Post date:** [August 26, 2020, 2:53am UTC](https://forum.buildkite.community/t/step-key-for-trigger-steps/1208/1 "2020-08-26T02:53:02Z")

</div>

Hello,

Do trigger steps support the `key`/`identifier` attribute? If so, I don’t see it documented. I’ve tried it and it doesn’t return an error.

However, when fetching the build from the REST api, the `step_key` attribute is not on the job. Also, I can’t easily tell what the triggered pipeline was without (1) the pipeline actually being triggered _and_ (2) parsing the `triggered_build.url` (which seem clunky).

Thanks!

---

<div class="post-metadata">

**Author:** ![anon85187480](https://avatars.discourse-cdn.com/v4/letter/a/90db22/32.png) [@anon85187480](https://forum.buildkite.community/u/anon85187480)\
**Post date:** [August 26, 2020, 6:32am UTC](https://forum.buildkite.community/t/step-key-for-trigger-steps/1208/2 "2020-08-26T06:32:04Z")

</div>

All steps support `key`/`identifier` – they’re necessary for [explicit dependencies](https://buildkite.com/docs/pipelines/dependencies), for example.

It sounds like you’ve spotted some missing values in the REST API response, though – I’ll have to take a look at those. 👍🏻

---

<div class="post-metadata">

**Author:** ![ngan](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/ngan/32/662_2.png) [@ngan](https://forum.buildkite.community/u/ngan)\
**Post date:** [August 26, 2020, 7:43am UTC](https://forum.buildkite.community/t/step-key-for-trigger-steps/1208/3 "2020-08-26T07:43:01Z")

</div>

Awesome. Thank you! For context, we’re using the step key to compare the current build to a previous one. We have a ruby library that can build out the pipeline(.yml) for upload. We’ve put business logic in there to conditionally skip certain steps based on whether certain files have been changed. However, when the PR lands on the main branch, we want to look back at the build for the parent commit and unskip anything that we are unsure of or that has failed.

Command has `step_key` so we can link the current step with the predecessor job. However, since Trigger jobs don’t return the key, we’ve been having to use the label (oof).

---

<div class="post-metadata">

**Author:** ![ngan](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.buildkite.community/ngan/32/662_2.png) [@ngan](https://forum.buildkite.community/u/ngan)\
**Post date:** [August 26, 2020, 7:43am UTC](https://forum.buildkite.community/t/step-key-for-trigger-steps/1208/4 "2020-08-26T07:43:55Z")

</div>

Also, wanted to bring this to your attention: [https://github.com/buildkite/docs/pull/807](https://github.com/buildkite/docs/pull/807)
