# Retrieving artifact version in state script

**URL:** <https://hub.mender.io/t/retrieving-artifact-version-in-state-script/6461>\
**Category:** General Discussions\
**Tags:** state-scripts\
**Created:** [January 11, 2024, 4:34pm UTC](https://hub.mender.io/t/retrieving-artifact-version-in-state-script/6461 "2024-01-11T16:34:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![I\_Iob](https://avatars.discourse-cdn.com/v4/letter/i/f475e1/32.png) [@I\_Iob](https://hub.mender.io/u/I_Iob)\
**Post date:** [January 11, 2024, 4:34pm UTC](https://hub.mender.io/t/retrieving-artifact-version-in-state-script/6461/1 "2024-01-11T16:34:18Z")

</div>

I should implement a user confirmation before installing an update; the confirmation procedure should be different when the update is a just a bug fix or feature changes. In order to decide which procedure to adopt, the confirmation app needs to know the artifact version. I’d like to prepare a state script (ArtifactInstall\_Enter) that communicates to the confirmation app the artifact version but, as far as I understood, Mender client do not pass such info to a state script. Is there another way to retrieve it?

Thanks

---

<div class="post-metadata">

**Author:** ![TheYoctoJester](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/theyoctojester/32/1444_2.png) [@TheYoctoJester](https://hub.mender.io/u/TheYoctoJester)\
**Post date:** [January 12, 2024, 12:52pm UTC](https://hub.mender.io/t/retrieving-artifact-version-in-state-script/6461/2 "2024-01-12T12:52:23Z")

</div>

Hi @I_Iob,

Sorry, but there is no direct way to get this kind of information. The most elegant way is to have separate state scripts for the desired functionality and then package them into the artefacts as needed, as during artefact construction time the time is known.

Greets,  
Josef
