---
title: "PUT /cohort-cache"
method: PUT
path: "/cohort-cache"
---

# PUT /cohort-cache

`PUT /cohort-cache`

## Request

- Base URL: `/analytics-svc/api/services/` (relative, and the document was published on a file host, not at the API’s origin)
- URL: `/analytics-svc/api/services/cohort-cache`
- Auth: none declared

Upserts cached per-bookmark materialized cohorts for a dataset. An entry with no materializedCohort is stored as a negative cache entry. Fails if the dataset's PA config cannot be resolved server side, since the cache key cannot then be built.

## Request body

- object
  - `datasetId` string, required: Id of dataset
  - `entries` object[], required: Entries to upsert, one per bookmark
    - `bookmarkId` string, required: Id of bookmark
    - `materializedCohort` CohortCacheMaterializedCohort: Cached materialized cohort. Mirrors analytics-svc CohortType without patientIds, which is never stored in the cache.
      - `id` number: Cohort definition id
      - `name` string: Name of cohort
      - `description` string: Description of cohort
      - `creationTimestamp` string: Indicates when the cohort was created
      - `definitionTypeConceptId` string: Cohort Definition Type Concept Id
      - `subjectConceptId` number: Cohort Definition Subject Concept Id
      - `syntax` string: Cohort definition syntax
      - `patientCount` number: Number of patients in the cohort

## Response `204`

Success

## Other responses

- `default`: Error

## Changes

- **2026-09-22** `38d466ba2495`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/ohdsi/apis/health-for-clinical-research/changes/cohort-cache/put.md)

---

[API](https://skmtc.dev/ohdsi/apis/health-for-clinical-research.md) - [All operations](https://skmtc.dev/ohdsi/apis/health-for-clinical-research/llms.txt) - [OpenAPI document](https://skmtc.dev/ohdsi/apis/health-for-clinical-research/revisions/5655f01517bc?raw)
