# Run an ad-hoc topology scan

Canonical: https://docs.shumoku.dev/en/server/next/api/postDatasourcesByIdScan
Language: en
Server documentation version: next
Product version: 0.1.6-beta.4
Channel: development

This documentation describes the Server currently in development.

Shumoku Server API · 0.1.6-beta.4 · Data Sources

# Run an ad-hoc topology scan

[OpenAPI source](https://github.com/konoe-akitoshi/shumoku/blob/73ebc72ba0bc0d1caf74e1ed34c89a6debcb0e6a/apps/server/api/openapi.json)

```
POST /api/datasources/{id}/scan
```

## Authentication

sessionCookie / bearerAuth

## Request body

`DataSourceScanRequest` · application/json

## Responses

| Status | Description | Schema |
| --- | --- | --- |
| `200` | Scan snapshot and optional persisted observation | `DataSourceScanResult` |
| `400` | The request did not match the API contract | `Error` |
| `401` | Authentication is required | `Error` |
| `404` | The data source does not exist | `Error` |
| `500` | The scan failed | `Error` |

[`apps/server/api/openapi.json`](https://github.com/konoe-akitoshi/shumoku/blob/73ebc72ba0bc0d1caf74e1ed34c89a6debcb0e6a/apps/server/api/openapi.json)
