# Using API to create a deployment using artifact\_id

**URL:** <https://hub.mender.io/t/using-api-to-create-a-deployment-using-artifact-id/5579>\
**Category:** General Discussions\
**Tags:** api, deployments\
**Created:** [January 31, 2023, 12:04pm UTC](https://hub.mender.io/t/using-api-to-create-a-deployment-using-artifact-id/5579 "2023-01-31T12:04:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![llebris](https://avatars.discourse-cdn.com/v4/letter/l/ce73a5/32.png) [@llebris](https://hub.mender.io/u/llebris)\
**Post date:** [January 31, 2023, 12:04pm UTC](https://hub.mender.io/t/using-api-to-create-a-deployment-using-artifact-id/5579/1 "2023-01-31T12:04:23Z")

</div>

Hello,

Is there a solution to create a deployment using an artifact\_id instead of artifact\_name ?

llebris,

---

<div class="post-metadata">

**Author:** ![kjaskiewiczz](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/kjaskiewiczz/32/807_2.png) [@kjaskiewiczz](https://hub.mender.io/u/kjaskiewiczz)\
**Post date:** [February 1, 2023, 9:15am UTC](https://hub.mender.io/t/using-api-to-create-a-deployment-using-artifact-id/5579/2 "2023-02-01T09:15:33Z")

</div>

Hey,

Deployment may contain more than one artifact.  
This is why we’re using artifact\_name instead of artifact\_id when creating deployments.  
Deployments service will look for all the artifacts with given artifact\_name.

Cheers,  
Krzysztof

---

<div class="post-metadata">

**Author:** ![llebris](https://avatars.discourse-cdn.com/v4/letter/l/ce73a5/32.png) [@llebris](https://hub.mender.io/u/llebris)\
**Post date:** [February 1, 2023, 9:41am UTC](https://hub.mender.io/t/using-api-to-create-a-deployment-using-artifact-id/5579/3 "2023-02-01T09:41:23Z")

</div>

Thank you for your reply,

You said the deployment service will look for all the artifacts with the given name.

But through mender API, I cannot upload an artifact with an already given name. (See below)

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/mender/original/2X/d/db4a3002ea16ffc7b142cbafabab665b9fed26ef.png)

Is it a misunderstanding of mine ? Or I just don’t use mender the right way.

My purpose is to send customs update-module artifact to a device. For this I created an artifact with the different files that my device needed and I created a deployment with it.

llebris,
