# Mender Server updating device configure by API

**URL:** <https://hub.mender.io/t/mender-server-updating-device-configure-by-api/7379>\
**Category:** General Discussions\
**Tags:** mender-server\
**Created:** [December 10, 2024, 12:59pm UTC](https://hub.mender.io/t/mender-server-updating-device-configure-by-api/7379 "2024-12-10T12:59:30Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tactmaster](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/tactmaster/32/1709_2.png) [@tactmaster](https://hub.mender.io/u/tactmaster)\
**Post date:** [December 10, 2024, 12:59pm UTC](https://hub.mender.io/t/mender-server-updating-device-configure-by-api/7379/1 "2024-12-10T12:59:30Z")

</div>

Hello,

TL;DR How to change mender device configure using API ?

I am trying to write a script to post a device configuation update via a script.  
Chaining config in the UI works

So I do this (with JWT headers etc)  
PUT https://{menderserver}/api/management/v1//configurations/device/{device\_id}  
body : { a:b }  
That works server end  
When I pull  
GET https://{menderserver}/api/management/v1/deviceconfig/configurations/device/{device\_id}  
It return something like:  
{  
“id”: “{device\_id}”,  
“configured”: { “a”:“b” }  
“reported”: {“old”:“config”}  
“deployment\_id”: {old depolyment id from UI}",  
“updated\_ts”: “2024-12-10T11:45:41.655Z”,  
“reported\_ts”: “2024-12-10T11:45:45.559Z”  
}

But I doesn’t create a new deployment.

Should I be trying to make PUT [https://mender.cellink.dev/api/management/v1/deployments/deployments](https://mender.cellink.dev/api/management/v1/deployments/deployments)  
whenever I try this is seem to be annoyed with me for no artffacts  
here  
However this seems to be another internal API for the UI  
[deployments/tests/tests/test\_configuration\_deployments.py at 167e338b9004cf824b5c982092ee279cf6c616e3 · mendersoftware/deployments · GitHub](https://github.com/mendersoftware/deployments/blob/167e338b9004cf824b5c982092ee279cf6c616e3/tests/tests/test_configuration_deployments.py)

What should I do?

Thanks

---

<div class="post-metadata">

**Author:** ![tactmaster](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/tactmaster/32/1709_2.png) [@tactmaster](https://hub.mender.io/u/tactmaster)\
**Post date:** [December 10, 2024, 1:40pm UTC](https://hub.mender.io/t/mender-server-updating-device-configure-by-api/7379/2 "2024-12-10T13:40:52Z")

</div>

I would like to thank you rubber 🦆s

I found in the documenation in the end  
[https://docs.mender.io/api/?python#management-api-device-configure-deploy-device-configuration](https://docs.mender.io/api/?python#management-api-device-configure-deploy-device-configuration)

https://{{menderserver}}//api/management/v1/deviceconfig/configurations/device/{{device\_id}}/deploy  
body  
{  
“retries”: 0,  
“update\_control\_map”: {}  
}

This works great.

---

<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:** [December 10, 2024, 3:18pm UTC](https://hub.mender.io/t/mender-server-updating-device-configure-by-api/7379/3 "2024-12-10T15:18:11Z")

</div>

Happy to 🦆!
