---
title: "Get all samples of a patient in a study"
method: GET
path: "/studies/{studyId}/patients/{patientId}/samples"
tags: ["Samples"]
---

# Get all samples of a patient in a study

`GET /studies/{studyId}/patients/{patientId}/samples`

## Request

- Base URL: `https://www.cbioportal.org/api`
- URL: `https://www.cbioportal.org/api/studies/{studyId}/patients/{patientId}/samples`
- Auth: none declared
- TypeScript: <https://skmtc.dev/waldronlab/apis/cbioportal-web-public-api-beta/docs/studies/:studyId/patients/:patientId/samples/get.ts> (a function with typed inputs; its response is checked against the schema)

## Path parameters

- `patientId` string, required
- `studyId` string, required

## Query parameters

- `direction` 'ASC' | 'DESC'
- `pageNumber` integer
- `pageSize` integer
- `projection` 'DETAILED' | 'ID' | 'META' | 'SUMMARY'
- `sortBy` 'sampleId' | 'sampleType'

## Response `200`

OK

- Sample[]
  - `copyNumberSegmentPresent` boolean
  - `patientId` string, required
  - `sampleId` string, required
  - `sampleType` 'BLOOD_NORMAL' | 'METASTATIC' | 'PRIMARY_BLOOD_TUMOR' | 'PRIMARY_SOLID_TUMOR' | 'RECURRENT_BLOOD_TUMOR' | 'RECURRENT_SOLID_TUMOR' | 'SOLID_NORMAL'
  - `sequenced` boolean
  - `studyId` string, required
  - `uniquePatientKey` string
  - `uniqueSampleKey` string

---

[API](https://skmtc.dev/waldronlab/apis/cbioportal-web-public-api-beta.md) - [All operations](https://skmtc.dev/waldronlab/apis/cbioportal-web-public-api-beta/llms.txt) - [OpenAPI document](https://skmtc.dev/waldronlab/apis/cbioportal-web-public-api-beta/revisions/99265965e66b?raw)
