# Reset a stream

> ![docs image](https://dev-assets.cms.uipath.com/assets/images/ixp/ixp-docs-image-321839-e2523966.webp)

![docs image](https://dev-assets.cms.uipath.com/assets/images/ixp/ixp-docs-image-321839-e2523966.webp)

```
/api/v1/datasets/<project>/<dataset_name>/streams/<stream_name>/reset
```

Permissions required: **Consume streams, View labels**.

* Bash
  ```
  curl -X POST 'https://<my_api_endpoint>/api/v1/datasets/project1/collateral/streams/dispute/reset' \
      -H "Authorization: Bearer $REINFER_TOKEN" \
      -H "Content-Type: application/json" \
      -d '{
    "to_comment_created_at": "2020-06-03T16:05:00"
  }'
  ```
* Node
  ```
  const request = require("request");

  request.post(
    {
      url: "https://<my_api_endpoint>/api/v1/datasets/project1/collateral/streams/dispute/reset",
      headers: {
        Authorization: "Bearer " + process.env.REINFER_TOKEN,
      },
      json: true,
      body: { to_comment_created_at: "2020-06-03T16:05:00" },
    },
    function (error, response, json) {
      // digest response
      console.log(JSON.stringify(json, null, 2));
    }
  );
  ```
* Python
  ```

  response = requests.post(
      "https://<my_api_endpoint>/api/v1/datasets/project1/collateral/streams/dispute/reset",
      headers={"Authorization": "Bearer " + os.environ["REINFER_TOKEN"]},
      json={"to_comment_created_at": "2020-06-03T16:05:00"},
  )

  print(json.dumps(response.json(), indent=2, sort_keys=True))
  ```
* Response
  ```
  {
    "sequence_id": "4LvtenIBAAA=",
    "status": "ok",
    "stream": {
      "created_at": "2019-08-03T12:30:00.123456Z",
      "dataset_id": "abcdef0123456789",
      "description": "Used by ACME RPA to create tickets for disputes.",
      "id": "0123456789abcdef",
      "model": {
        "version": 8
      },
      "name": "dispute",
      "title": "Collateral Disputes",
      "updated_at": "2019-08-03T12:30:00.123456Z"
    }
  }
  ```

A stream can be reset to move its position backwards or forwards in time, either to repeat previously returned comments or to skip comments. The timestamp used to reset a stream refers to the time the comments were uploaded (i.e. the comment's `created_at` property, rather than its `timestamp` property).

| NAME | TYPE | REQUIRED | DESCRIPTION |
| --- | --- | --- | --- |
| `to_comment_created_at` | string | yes | A ISO-8601 timestamp. |

The response will contain the `sequence_id` corresponding to the new stream position.
