# Automatic and Manual updates from Server

**URL:** <https://hub.mender.io/t/automatic-and-manual-updates-from-server/2802>\
**Category:** General Discussions\
**Created:** [November 9, 2020, 11:42pm UTC](https://hub.mender.io/t/automatic-and-manual-updates-from-server/2802 "2020-11-09T23:42:52Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![avrobot](https://avatars.discourse-cdn.com/v4/letter/a/45deac/32.png) [@avrobot](https://hub.mender.io/u/avrobot)\
**Post date:** [November 9, 2020, 11:42pm UTC](https://hub.mender.io/t/automatic-and-manual-updates-from-server/2802/1 "2020-11-09T23:42:52Z")

</div>

From Mender server we would like to deploy latest software to all devices. But when the update actually occurs will be up to Client. - either automatic (as currently setup), or Manual (Client decides when to enable connection to server to check).

1. Should I simply be disabling and enabling the Mender Daemon when Customer changes mode between Manual and Automatic?  
Or is there a better way?

---

<div class="post-metadata">

**Author:** ![dellgreen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/dellgreen/32/85_2.png) [@dellgreen](https://hub.mender.io/u/dellgreen)\
**Post date:** [November 10, 2020, 2:07am UTC](https://hub.mender.io/t/automatic-and-manual-updates-from-server/2802/2 "2020-11-10T02:07:39Z")

</div>

Some have done it this way, others have written their own client using the rest api and using standalone-mode of mender-client

---

<div class="post-metadata">

**Author:** ![mirzak](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mirzak/32/2056_2.png) [@mirzak](https://hub.mender.io/u/mirzak)\
**Post date:** [November 10, 2020, 10:36am UTC](https://hub.mender.io/t/automatic-and-manual-updates-from-server/2802/3 "2020-11-10T10:36:04Z")

</div>

[State scripts](https://docs.mender.io/artifact-creation/state-scripts) is also one possibility, which can give you more control when the update is actually applied.

Also note that we are actually working on a DBUS API in the Mender client, with the intention of solving the use-case you mention in a better way. But this for the future 🙂

---

<div class="post-metadata">

**Author:** ![avrobot](https://avatars.discourse-cdn.com/v4/letter/a/45deac/32.png) [@avrobot](https://hub.mender.io/u/avrobot)\
**Post date:** [November 10, 2020, 10:25pm UTC](https://hub.mender.io/t/automatic-and-manual-updates-from-server/2802/4 "2020-11-10T22:25:15Z")

</div>

Thanks, I’ll look more at State scripts.

---

<div class="post-metadata">

**Author:** ![mokul](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mokul/32/1286_2.png) [@mokul](https://hub.mender.io/u/mokul)\
**Post date:** [June 21, 2021, 1:11pm UTC](https://hub.mender.io/t/automatic-and-manual-updates-from-server/2802/5 "2021-06-21T13:11:34Z")

</div>

what are DBUS API currently available for mender-client. So far found these

```auto
NAME TYPE SIGNATURE RESULT/VALUE FLAGS
io.mender.Authentication1 interface - - -
.FetchJwtToken method - b -
.GetJwtToken method - ss -
.JwtTokenStateChange signal ss - -

```

Looking for apis so that mender.conf parameters can be modified

---

<div class="post-metadata">

**Author:** ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)\
**Post date:** [June 21, 2021, 1:36pm UTC](https://hub.mender.io/t/automatic-and-manual-updates-from-server/2802/6 "2021-06-21T13:36:57Z")

</div>

@mokul I don’t believe modifying mender.conf is available over dbus. @kacf can you clarify?

Drew

---

<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 22, 2021, 5:59am UTC](https://hub.mender.io/t/automatic-and-manual-updates-from-server/2802/7 "2021-06-22T05:59:10Z")

</div>

Correct, `mender.conf` parameters are not modifiable with the D-Bus API.

---

<div class="post-metadata">

**Author:** ![mokul](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mokul/32/1286_2.png) [@mokul](https://hub.mender.io/u/mokul)\
**Post date:** [June 23, 2021, 6:57pm UTC](https://hub.mender.io/t/automatic-and-manual-updates-from-server/2802/8 "2021-06-23T18:57:49Z")

</div>

Thanks. @kacf .  
we would like to know what are next couple of artifacts available for the current device.  
There is no pre-defined artifact\_name available. artifact\_name is kind of dynamic.  
How could we get that while inside the device. D-BUS api or REST api call, any suggestion is appreciated.

---

<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 24, 2021, 6:19am UTC](https://hub.mender.io/t/automatic-and-manual-updates-from-server/2802/9 "2021-06-24T06:19:25Z")

</div>

There is no such DBus API at the moment, but it is [on the roadmap](https://tracker.mender.io/browse/MEN-4194).

However, it is possible to find out by using the `GetJwtToken` DBus API to get the JWT token and server, and then use that [to call the server manually](https://staging.docs.mender.io/api/2.7/#device-api-deployments-check-update). The response will contain the next update name.

Note that I think the backend will consider the update as having started for that device if you call that endpoint. But this only affects the information in the UI, it doesn’t have any practical effect, as far as I know.

---

<div class="post-metadata">

**Author:** ![mokul](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mokul/32/1286_2.png) [@mokul](https://hub.mender.io/u/mokul)\
**Post date:** [June 24, 2021, 6:36am UTC](https://hub.mender.io/t/automatic-and-manual-updates-from-server/2802/10 "2021-06-24T06:36:08Z")

</div>

but that call `/device/deployments/next` requires query parameter `artifact_name`. in our case we dont have fixed `artifiact_name`

---

<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 24, 2021, 6:48am UTC](https://hub.mender.io/t/automatic-and-manual-updates-from-server/2802/11 "2021-06-24T06:48:37Z")

</div>

You can get the current one by calling `mender show-artifact`.
