# Is there An API that triggers the upgrade of the OneAgent to a specific version for a given hostName?

**URL:** <https://community.dynatrace.com/t/is-there-an-api-that-triggers-the-upgrade-of-the-oneagent-to-a-specific-version-for-a-given-hostname/19260>\
**Category:** Dynatrace API\
**Tags:** updates, oneagent, dynatrace-api\
**Created:** [May 6, 2020, 5:38pm UTC](https://community.dynatrace.com/t/is-there-an-api-that-triggers-the-upgrade-of-the-oneagent-to-a-specific-version-for-a-given-hostname/19260 "2020-05-06T17:38:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![morsi\_tlili](https://avatars.discourse-cdn.com/v4/letter/m/ee59a6/32.png) [@morsi\_tlili](https://community.dynatrace.com/u/morsi_tlili)\
**Post date:** [May 6, 2020, 5:38pm UTC](https://community.dynatrace.com/t/is-there-an-api-that-triggers-the-upgrade-of-the-oneagent-to-a-specific-version-for-a-given-hostname/19260/1 "2020-05-06T17:38:59Z")

</div>

Is there any API that can trigger the upgrade of the OneAgent to a specific version for a given hostName?

---

<div class="post-metadata">

**Author:** ![DavorinKrivak](https://avatars.discourse-cdn.com/v4/letter/d/6bbea6/32.png) [@DavorinKrivak](https://community.dynatrace.com/u/DavorinKrivak)\
**Post date:** [May 20, 2020, 4:46am UTC](https://community.dynatrace.com/t/is-there-an-api-that-triggers-the-upgrade-of-the-oneagent-to-a-specific-version-for-a-given-hostname/19260/2 "2020-05-20T04:46:47Z")

</div>

Hi Morsi,

You can use the Version element of the HostAutoUpdate object to specify the agent version for a particular host id: [OneAgent auto-update API - PUT configuration — Dynatrace Docs](https://www.dynatrace.com/support/help/shortlink/api-config-oneagent-on-host-auto-update-put#hostsidautoupdate-put-parameter-hostautoupdateconfig)

DJ
