---
title: "Create Batch Cache"
method: POST
path: "/data/projects/{projectId}/cache/batch"
tags: ["Data -- Cache"]
---

# Create Batch Cache

`POST /data/projects/{projectId}/cache/batch`

## Request

- Base URL: `https://partner.peaka.studio/api/v1`
- URL: `https://partner.peaka.studio/api/v1/data/projects/{projectId}/cache/batch`
- Auth: HTTP bearer

Creates multiple caches in a single request. Each item in the array follows the same schema as the single create cache endpoint. Caches are created independently; if one fails, the others may still succeed.

The response contains a list of results, one per requested cache, each indicating success or failure. On success, the created cache object is included. On failure, the error message is provided.

This is useful when enabling caching for multiple tables at once (e.g. during initial project setup).

## Path parameters

- `projectId` string, required

## Request body

- CacheRequest[]
  - `catalogId` string: The ID of the catalog for the cache request.
  - `schemaName` string: The name of the schema for the cache request.
  - `tableName` string: The name of the table for the cache request.
  - `incrementalCacheSchedule` Schedule: This class represents a schedule for a cache request. It contains the type and expression of the schedule.
    - `type` string: The type of the schedule. BASIC or NONE.
    - `expression` string: The expression of the schedule. Valid if the type is other than NONE. For BASIC, the expression is a duration in ISO-8601 format. "PT15M" -- parses as "15 minutes" (where a minute is 60 seconds) "PT10H" -- parses as "10 hours" (where an hour is 3600 seconds) "P2D" -- parses as "2 days" (where a day is 24 hours or 86400 seconds)
  - `fullRefreshCacheSchedule` Schedule: This class represents a schedule for a cache request. It contains the type and expression of the schedule.
    - `type` string: The type of the schedule. BASIC or NONE.
    - `expression` string: The expression of the schedule. Valid if the type is other than NONE. For BASIC, the expression is a duration in ISO-8601 format. "PT15M" -- parses as "15 minutes" (where a minute is 60 seconds) "PT10H" -- parses as "10 hours" (where an hour is 3600 seconds) "P2D" -- parses as "2 days" (where a day is 24 hours or 86400 seconds)

## Response `200`

Batch processing completed. Each entry in the response array indicates whether that specific cache was created successfully or failed.

---

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