---
title: "List Samples for a Function"
method: GET
path: "/v1/functions/{functionId}/samples"
tags: ["Samples"]
---

# List Samples for a Function

`GET /v1/functions/{functionId}/samples`

## Path parameters

- `functionId` string, required

## Query parameters

- `externalId` string
- `startIndex` integer
- `count` integer
- `cursor` string
- `maxItems` integer
- `batchSize` integer
- `lastItemIndex` integer
- `annotated` boolean
- `predicted` boolean
- `annotationLabelId` string
- `predictionLabelId` string
- `predictionAndAnnotationAgree` boolean
- `captureReason` 'Random' | 'Uncertain' | 'RareClass' | 'LowAccuracyClass' | 'CaptureAll'
- `origin` 'Unspecified' | 'InvokeCapture'
- `searchText` string
- `sampleIds` string[]
- `sampleSetId` string
- `inTrainSet` boolean
- `createdBefore` string, date-time
- `createdAfter` string, date-time
- `sortBy` 'Default' | 'Annotation' | 'Creation' | 'Confidence' | 'Agreement'
- `sortOrder` 'Ascending' | 'Descending'
- `includeData` boolean

## Response `200`

Success

- Sample[]
  - `annotation` Annotation
    - `labelId` string, nullable
    - `labelName` string, nullable
  - `data` IFunctionInput
    - `size` integer
  - `externalId` string, nullable
  - `sampleSets` SampleSetRelationship[], nullable
    - `sampleSetId` string, nullable
    - `weight` integer, nullable
  - `id` string, nullable
  - `prediction` Prediction
    - `labelId` string, nullable
    - `confidence` number, double

---

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