# Redeploy a deployment via API

**URL:** <https://forums.suse.com/t/redeploy-a-deployment-via-api/37982>\
**Category:** General\
**Created:** [May 23, 2022, 1:56pm UTC](https://forums.suse.com/t/redeploy-a-deployment-via-api/37982 "2022-05-23T13:56:33Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![someusername](https://avatars.discourse-cdn.com/v4/letter/s/e480ec/32.png) [@someusername](https://forums.suse.com/u/someusername)\
**Post date:** [May 23, 2022, 1:56pm UTC](https://forums.suse.com/t/redeploy-a-deployment-via-api/37982/1 "2022-05-23T13:56:33Z")

</div>

I have been trying to find a way to redeploy a deployment using the Rancher API. Our Rancher version is 2.6.3. I have been able to find the way for deployments that are part of a Rancher project. Seems this call does the trick:

POST  
https://${RANCHER\_URL}/v3/project/${PROJECT\_ID}/workloads/deployment:${NAMESPACE}:${DEPLOYMENTNAME}?action=redeploy

But how should it be done when the workload is not part of a project?

I tried to use the projectid from the https://${RANCHER\_URL}/v3/clusters/${CLUSTER\_ID}/projects but I get “invalid workload type” response when using this project id.
