# Extracting artifact info before download begins

**URL:** <https://hub.mender.io/t/extracting-artifact-info-before-download-begins/5017>\
**Category:** General Discussions\
**Tags:** mender-client, mender-artifact\
**Created:** [June 13, 2022, 9:22am UTC](https://hub.mender.io/t/extracting-artifact-info-before-download-begins/5017 "2022-06-13T09:22:01Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![freddy47](https://avatars.discourse-cdn.com/v4/letter/f/57b2e6/32.png) [@freddy47](https://hub.mender.io/u/freddy47)\
**Post date:** [June 13, 2022, 9:22am UTC](https://hub.mender.io/t/extracting-artifact-info-before-download-begins/5017/1 "2022-06-13T09:22:01Z")

</div>

Hey I am looking for an way to extract the artifact version information before it is downloaded.  
This is to show the end-user a pop-up message containing the artifact information using a state-script.  
I am using the mender systemd service on ubuntu 18.04.

Does anyone know if and how this information can be read by a custom state-script

---

<div class="post-metadata">

**Author:** ![kacf](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/kacf/32/146_2.png) [@kacf](https://hub.mender.io/u/kacf)\
**Post date:** [June 14, 2022, 7:27am UTC](https://hub.mender.io/t/extracting-artifact-info-before-download-begins/5017/2 "2022-06-14T07:27:22Z")

</div>

The is unfortunately not possible with state scripts. Only Update Modules can do that. Your best bet would be to look at the [`rootfs-image-v2`](https://github.com/mendersoftware/mender/blob/3.3.0/tests/rootfs-image-v2) Update Module (which is a reimplementation of what is inside the client) and the [Update Module File API](https://github.com/mendersoftware/mender/blob/3.3.0/Documentation/update-modules-v3-file-api.md#file-api) and tweak the `rootfs-image-v2` to check the version information inside the `Download` state.

See also the chapter about [using an Update Module](https://docs.mender.io/development/client-installation/use-an-updatemodule), and the chapter about [making one](https://docs.mender.io/development/artifact-creation/create-a-custom-update-module) for a gentler introduction to the concept.
