---
title: "Search files in cache, error and archive folders"
method: GET
path: "/api/history/{historyId}/cache/search"
tags: ["History Queries"]
---

# Search files in cache, error and archive folders

`GET /api/history/{historyId}/cache/search`

Searches for files in the history query cache

## Path parameters

- `historyId` string, required

## Query parameters

- `nameContains` string, required
- `start` string, required
- `end` string, required
- `maxNumberOfFilesReturned` number, double, required

## Response `200`

The cache search result

- CacheSearchResult
  - `searchDate` string, required — Represents an instant in time as an ISO 8601 string.
  - `metrics` object, required
    - `currentArchiveSize` number, double, required — The current size of the archive.
    - `currentErrorSize` number, double, required — The current size of errors.
    - `currentCacheSize` number, double, required — The current size of the cache.
    - `lastRunDuration` number, double, nullable, required — The duration of the last run in milliseconds.
    - `lastRunStart` string, required — Represents an instant in time as an ISO 8601 string.
    - `lastConnection` string, required — Represents an instant in time as an ISO 8601 string.
  - `error` object[], required
    - `metadata` CacheMetadata, required — Metadata for cached content.
      - `contentFile` string, required — The path to the content file.
      - `contentSize` number, double, required — The size of the content in bytes.
      - `numberOfElement` number, double, required — The number of elements in the content.
      - `createdAt` string, required — Represents an instant in time as an ISO 8601 string.
      - `contentType` string, required — The type of the content.
    - `filename` string, required
  - `archive` object[], required
    - `metadata` CacheMetadata, required — Metadata for cached content.
      - `contentFile` string, required — The path to the content file.
      - `contentSize` number, double, required — The size of the content in bytes.
      - `numberOfElement` number, double, required — The number of elements in the content.
      - `createdAt` string, required — Represents an instant in time as an ISO 8601 string.
      - `contentType` string, required — The type of the content.
    - `filename` string, required
  - `cache` object[], required
    - `metadata` CacheMetadata, required — Metadata for cached content.
      - `contentFile` string, required — The path to the content file.
      - `contentSize` number, double, required — The size of the content in bytes.
      - `numberOfElement` number, double, required — The number of elements in the content.
      - `createdAt` string, required — Represents an instant in time as an ISO 8601 string.
      - `contentType` string, required — The type of the content.
    - `filename` string, required

---

[API](https://skmtc.net/optimistiksas/apis/oibus-api.md) · [All operations](https://skmtc.net/optimistiksas/apis/oibus-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/optimistiksas/oibus-api/versions/743d1b62f042/schema)
