# Replaying from the UI

## Updating a Request by Replaying

1. Navigate to the requests list page at [http://localhost:4200/agent/requests](http://localhost:4201/agent/requests)
2. Click on the request that we want to update. In the screenshot, we see a request that returned a 200 status code and a healthy json body in the response. For our example, this is a HTTP request to an application running on `localhost` that then calls the Spotify's API to return details about a song.

<figure><img src="https://3980092275-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MLvhXOE-py5MDUOXDKD%2Fuploads%2Fgit-blob-f3e6f37bba1cb0e9d771d4fdc30f457a71e35c2f%2FScreenshot%202023-05-03%20141009.png?alt=media" alt=""><figcaption><p>Request details</p></figcaption></figure>

3. Now go to the Replay History by clicking on the following tab

<figure><img src="https://3980092275-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MLvhXOE-py5MDUOXDKD%2Fuploads%2Fgit-blob-65ab057fbcd3be99224f639b04a0ff3e929e9922%2FScreenshot%202023-05-03%20143454%20-%20Copy%20(2).png?alt=media" alt=""><figcaption><p>Replay History tab</p></figcaption></figure>

4. Pick one of the requests to overwrite the current HTTP response with and click on "Activate"

<figure><img src="https://3980092275-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MLvhXOE-py5MDUOXDKD%2Fuploads%2Fgit-blob-b9a51d2ea7102909b9c193e3413414bf3ec5adee%2FScreenshot%202023-05-03%20144826.png?alt=media" alt=""><figcaption><p>Activate button</p></figcaption></figure>

5. A prompt should pop up asking you to confirm. Click on "CONFIRM"

<figure><img src="https://3980092275-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MLvhXOE-py5MDUOXDKD%2Fuploads%2Fgit-blob-e034bc7158ec8d7dfb7b54b3a7f6b81b03040755%2FScreenshot%202023-05-03%20144845.png?alt=media" alt=""><figcaption><p>Confirm</p></figcaption></figure>

6. The response for the request has now been updated successfully!

<figure><img src="https://3980092275-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MLvhXOE-py5MDUOXDKD%2Fuploads%2Fgit-blob-d7db6c81d308bc5c17e225e8111ee839f1777dcc%2FScreenshot%202023-05-03%20144901.png?alt=media" alt=""><figcaption><p>Success!</p></figcaption></figure>

7. Finally, run the Agent in Mock mode and send a HTTP request to that endpoint. After sending a request, Stoobly will return the new response instead of the old one. Please note that you can change the response back to its original one or any of the re-recordings by using the [Replay History](https://docs.stoobly.com/core-concepts/mock-api/requests/replay-history).
