# Deployments v2 API does not take dependencies into account

**URL:** https://hub.mender.io/t/deployments-v2-api-does-not-take-dependencies-into-account/5049
**Category:** General Discussions
**Tags:** api
**Created:** [June 22, 2022, 8:50pm UTC](https://hub.mender.io/t/deployments-v2-api-does-not-take-dependencies-into-account/5049 "2022-06-22T20:50:51Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![ro-main](https://avatars.discourse-cdn.com/v4/letter/r/a88e57/32.png) [@ro-main](https://hub.mender.io/u/ro-main)
#### Post date: [June 22, 2022, 8:50pm UTC](https://hub.mender.io/t/deployments-v2-api-does-not-take-dependencies-into-account/5049/1 "2022-06-22T20:50:52Z")

</div>

Hi,  
According to [Deployment v2 API](https://docs.mender.io/api/#device-api-deployments-v2), it should return **next update satisfying dependencies** , but it seems to fail doing so.

I created a deployment targeting a specific device with an artifact that declares a dependency:

```auto
...
Updates:
    0:
    Type: test2
    Provides:
	rootfs-image.test2.version: genarti_depends_v13zc8pb
    Depends:
	rootfs-image.test2.version: genarti_fails_install_5n1cuuoo
    Clears Provides: ["rootfs-image.test2.*"]
    Metadata: Nothing
...

```

If I query the api with the following json data:

```auto
{
    "device_provides": {
        "artifact_name": "genarti_approval_install_jk8bvfz_",
        "rootfs-image.test2.version": "genarti_approval_install_jk8bvfz_",
        "device_type": "jetson-xavier-nx-devkit"
    },
    "update_control_map": false
}

```

I receive the deployment information while I would expect a 204 response indicating that there is no deployments that satisfy dependencies.

Note: Using mender client `mender check-update` will not install the deployment, but still, should I expect the Deployments v2 API to return a deployment with the request body showed above?

Thanks for your help,

François Lefebvre

---

<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 23, 2022, 6:35am UTC](https://hub.mender.io/t/deployments-v2-api-does-not-take-dependencies-into-account/5049/2 "2022-06-23T06:35:05Z")

</div>

Are you using Mender Enterprise? Automatic dependency resolution is a feature which is exclusive to Mender Enterprise. It is equivalent to “Automatic assignment of delta updates” on Mender’s [feature page](https://mender.io/product/features).

---

<div class="post-metadata">

### Author: ![francois.lefebvre](https://avatars.discourse-cdn.com/v4/letter/f/9de053/32.png) [@francois.lefebvre](https://hub.mender.io/u/francois.lefebvre)
#### Post date: [June 23, 2022, 5:09pm UTC](https://hub.mender.io/t/deployments-v2-api-does-not-take-dependencies-into-account/5049/3 "2022-06-23T17:09:15Z")

</div>

No, only Basic for now.

Thanks for the info.
