# How to link output ID's to original file names

**URL:** <https://help.galaxyproject.org/t/how-to-link-output-ids-to-original-file-names/17702>\
**Category:** usegalaxy.eu support\
**Tags:** devops-administration, feature-request, history-export\
**Created:** [May 4, 2026, 2:47pm UTC](https://help.galaxyproject.org/t/how-to-link-output-ids-to-original-file-names/17702 "2026-05-04T14:47:01Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![cornek](https://avatars.discourse-cdn.com/v4/letter/c/ed655f/32.png) [@cornek](https://help.galaxyproject.org/u/cornek)\
**Post date:** [May 4, 2026, 2:47pm UTC](https://help.galaxyproject.org/t/how-to-link-output-ids-to-original-file-names/17702/1 "2026-05-04T14:47:01Z")

</div>

Hello all,

With the risk of something similar having been addressed before: I have downloaded results from Galaxy (not created within a workflow). How can I (batch-) link these basically anonymous (“job on dataset xxx”) results to my original file names that were uploaded?

It would help a lot if the file/job-list under history could easily be exported to a tsv- or csv-file…!

Thank you for your consideration!

Kind regards, Corné

---

<div class="post-metadata">

**Author:** ![jennaj](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/jennaj/32/27_2.png) [@jennaj](https://help.galaxyproject.org/u/jennaj)\
**Post date:** [May 4, 2026, 6:30pm UTC](https://help.galaxyproject.org/t/how-to-link-output-ids-to-original-file-names/17702/2 "2026-05-04T18:30:26Z")

</div>

Hi @cornek

I don’t think this has been discussed here yet or not recently!

For an API approach, you would query the original Galaxy history directly instead of parsing a downloaded history archive. Then your mapping can be used to navigate the downloaded content.

Start with the history contents endpoint, then query each dataset for details such as name, tags, state, and related metadata. If you use [#nametags](https://galaxyproject.github.io/training-material/search2?query=tags) for your samples, this will be easier when tracking through tools (outside of a workflow) to summarize by those tags.

- [Galaxy API | Galaxy Hub](https://galaxyproject.org/develop/api/)
- [https://usegalaxy.org/api/docs/](https://usegalaxy.org/api/docs/)
- [Hands-on: Scripting Galaxy using the API and BioBlend / Scripting Galaxy using the API and BioBlend / Development in Galaxy](https://training.galaxyproject.org/training-material/topics/dev/tutorials/bioblend-api/tutorial.html)
- [Usage documentation — BioBlend 1.9.0 documentation](https://bioblend.readthedocs.io/en/latest/api_docs/galaxy/docs.html)

The relevant pattern is:

> GET /api/histories/{history\_id}/contentsGET /api/histories/{history\_id}/contents/datasets/{dataset\_id}

This could be wrapped in a script to run against your history and write back into wherever you downloaded the `tar.xvf` history archive as a supplementary custom map.

The alternative I can this of is to parse the `[ARCHIVE]/datasets_attrs.txt` JSON directly with a custom script.

Let us know what you think or if this helps! 🙂

Update: I’m still thinking about your idea about a UI navigation or downloadable tabular version of the JSON. Or, maybe a standalone utility to parse it that can be shared. More soon about this. 🧑‍🔬

---

<div class="post-metadata">

**Author:** ![cornek](https://avatars.discourse-cdn.com/v4/letter/c/ed655f/32.png) [@cornek](https://help.galaxyproject.org/u/cornek)\
**Post date:** [May 5, 2026, 10:33am UTC](https://help.galaxyproject.org/t/how-to-link-output-ids-to-original-file-names/17702/3 "2026-05-05T10:33:03Z")

</div>

Hi JennaJ,

Thank you for your reply! One of the things I like about Galaxy is that I (as a non-bioinformatician) can perform complicated bioinformatics analyses 🙂 To me, you’re proposed solution still sounds rather complicated 🤔 I’m thinking there should be an easier way to do this?

---

<div class="post-metadata">

**Author:** ![jennaj](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/jennaj/32/27_2.png) [@jennaj](https://help.galaxyproject.org/u/jennaj)\
**Post date:** [May 8, 2026, 1:52am UTC](https://help.galaxyproject.org/t/how-to-link-output-ids-to-original-file-names/17702/4 "2026-05-08T01:52:54Z")

</div>

Hi @cornek

After thinking a bit more, I decided that while Python is possible, it would be interesting to do this all directly in Galaxy!

Galaxy includes a tool to parse JSON structured metadata. Knowing how to write the **jq query** isn’t really needed. Instead, _knowing what you want_ is the important part.

I was able to get both ChatGPT and Claude to produce something usable with 2 then 3 iterations. These tools are very powerful for informatics! You should be able to use my example here to have an AI produce further customizations as wanted.

**Tool**

- **jq query** and transform JSON documents

**Process**

1. Download a history archive and uncompress it (either kind).
2. Upload the `datasets_attrs.txt` file back up into a history.
3. Run **jq query** to produce a `txt` version of the desired attribute content.
4. Use the pencil icon to change to `tabular` format.
5. Ready! to do anything else you might do with tabular data.

**Example history**

- [https://usegalaxy.org/u/jen-galaxyproject/h/using-tags-to-track-samples](https://usegalaxy.org/u/jen-galaxyproject/h/using-tags-to-track-samples)

* * *

Thoughts: I’m not sure if it is practical to expose/query this same data **until after** the action to generate a specific history export archive is completed. Using a workflow instead is the current supported model for sample tracking, but it is understandable why that can be restrictive. I am going to think about this more and will watch for your feedback.

**Update 5/8** : I created a ticket for this idea. Let’s see what the developers think and please feel free to add more context about use cases, or comments, on the ticket!

- [Convenience data mapping file in exported history downloads · Issue #22665 · galaxyproject/galaxy · GitHub](https://github.com/galaxyproject/galaxy/issues/22665)

I hope this helps to get it started, and let us know what you think! 🚀

---

<div class="post-metadata">

**Author:** ![cornek](https://avatars.discourse-cdn.com/v4/letter/c/ed655f/32.png) [@cornek](https://help.galaxyproject.org/u/cornek)\
**Post date:** [June 3, 2026, 10:15am UTC](https://help.galaxyproject.org/t/how-to-link-output-ids-to-original-file-names/17702/5 "2026-06-03T10:15:38Z")

</div>

Hi JennaJ,

I’ve tried your approach. The tabular file that was generated looked a bit weird as though some hard returns were missing so I ended up (with a little help) using the JSON file instead. This approach should work for us!.

Thnx again for your help!.

---

<div class="post-metadata">

**Author:** ![jennaj](https://sea2.discourse-cdn.com/flex020/user_avatar/help.galaxyproject.org/jennaj/32/27_2.png) [@jennaj](https://help.galaxyproject.org/u/jennaj)\
**Post date:** [June 3, 2026, 8:17pm UTC](https://help.galaxyproject.org/t/how-to-link-output-ids-to-original-file-names/17702/6 "2026-06-03T20:17:31Z")

</div>

Hi @cornek I’m glad that helped to get you started at least! The developers like the idea of including something in the out folder and added the ticket I made to a feature request list. We are all meeting this month for the [our conference](https://galaxyproject.org/events/gcc2026/) so perhaps during the CoFest (a type of hackathon) someone will pick it up! If not, for a future release. This was a really good idea so I’m glad you asked! And thanks for letting us know you have the information you need. 🚀
