---
title: "Stop history collection"
method: POST
path: "/topics/{topicId}/history/stop"
tags: ["History"]
---

# Stop history collection

`POST /topics/{topicId}/history/stop`

## Request

- Base URL: `https://api.youscan.io/api/external`
- URL: `https://api.youscan.io/api/external/topics/{topicId}/history/stop`
- Auth: one of:
  - API key in header `X-API-KEY`
  - API key in query parameter `apiKey`
- TypeScript: <https://skmtc.dev/youscan/apis/youscan-api/docs/topics/:topicId/history/stop/post.ts> (a function with typed inputs; its response is checked against the schema)

Stop the running historical data collection job.

## Path parameters

- `topicId` integer, required

## Response `200`

History collection stopped.

## Other responses

- `400`: No active history collection job to stop.
- `401`: The API key is missing or invalid.
- `403`: Your permission level for this topic is too low for the action.
- `404`: Topic not found or you don't have access to it.

---

[API](https://skmtc.dev/youscan/apis/youscan-api.md) - [All operations](https://skmtc.dev/youscan/apis/youscan-api/llms.txt) - [OpenAPI document](https://skmtc.dev/youscan/apis/youscan-api/revisions/f5bef260f153?raw)
