---
title: "POST /datasources/{dataSourceUID}/cache/clean"
method: POST
path: "/datasources/{dataSourceUID}/cache/clean"
tags: ["enterprise"]
---

# POST /datasources/{dataSourceUID}/cache/clean

`POST /datasources/{dataSourceUID}/cache/clean`

clean cache for a single data source

## Path parameters

- `dataSourceUID` string, required

## Response `200`

CacheConfigResponse

- CacheConfigResponse
  - `created` string, date-time
  - `dataSourceID` integer — Fields that can be set by the API caller - read/write
  - `dataSourceUID` string
  - `defaultTTLMs` integer — These are returned by the HTTP API, but are managed internally - read-only Note: 'created' and 'updated' are special properties managed automatically by xorm, but we are setting them manually
  - `enabled` boolean
  - `message` string
  - `ttlQueriesMs` integer — TTL MS, or "time to live", is how long a cached item will stay in the cache before it is removed (in milliseconds)
  - `ttlResourcesMs` integer
  - `updated` string, date-time
  - `useDefaultTTL` boolean — If UseDefaultTTL is enabled, then the TTLQueriesMS and TTLResourcesMS in this object is always sent as the default TTL located in grafana.ini

## Other responses

- `500` — InternalServerError is a general error indicating something went wrong internally.

---

[API](https://skmtc.net/grafana/apis/http-api.md) · [All operations](https://skmtc.net/grafana/apis/http-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/grafana/http-api/revisions/df55ba1718ba/schema)
