# Change to Previous Activity using the REST API

**URL:** <https://forum.flowable.org/t/change-to-previous-activity-using-the-rest-api/6576>\
**Category:** Flowable Engine\
**Created:** [August 21, 2020, 1:19am UTC](https://forum.flowable.org/t/change-to-previous-activity-using-the-rest-api/6576 "2020-08-21T01:19:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![manpreetc](https://avatars.discourse-cdn.com/v4/letter/m/9de0a6/32.png) [@manpreetc](https://forum.flowable.org/u/manpreetc)\
**Post date:** [August 21, 2020, 1:19am UTC](https://forum.flowable.org/t/change-to-previous-activity-using-the-rest-api/6576/1 "2020-08-21T01:19:18Z")

</div>

I was able to get the History of Task and Activity by firing the REST Service as given below

/history/historic-activity-instances?processInstanceId=  
/history/historic-task-instances?processInstanceId=

I am trying to find out if my Task is on Step 5 using the REST API I can move it backward to Task 2 or 3 or any.

I saw a blog “[Going back in workflow](https://forum.flowable.org/t/going-back-in-workflow/3134/3)” but cannot figure the equivalent REST Service I can use

---

<div class="post-metadata">

**Author:** ![deve](https://avatars.discourse-cdn.com/v4/letter/d/73ab20/32.png) [@deve](https://forum.flowable.org/u/deve)\
**Post date:** [June 13, 2025, 10:03am UTC](https://forum.flowable.org/t/change-to-previous-activity-using-the-rest-api/6576/2 "2025-06-13T10:03:28Z")

</div>

You can use this api `/runtime/process-instances/{processInstanceId}/change-state`  
payload

```auto
{
  "cancelActivityIds": ["string"],
  "startActivityIds": ["string"]
}

```

> **[Flowable Process Swagger Documentation](https://documentation.flowable.com/latest/assets/core-swagger/bpmn.html#/Process%20Instances/changeActivityState)**

pass the respected activityId
