operationId:ListSamples
List Samples
/v1/functions/{functionId}/samples
Description
Lists Samples for a Function. Supports rich filtering: by annotation / prediction agreement, by capture reason, by sample set, by date range, and by free-text search.
Path parameters
| Name | Type | Required | Description |
|---|---|---|---|
functionId |
string |
yes | — |
Query parameters
| Name | Type | Required | Description |
|---|---|---|---|
externalId |
string |
no | The externalId of the Sample |
startIndex |
integer (int32) |
no | The zero-based index of the first result to return |
count |
integer (int32) |
no | The number of results to return |
annotated |
boolean |
no | Whether the sample is annotated |
predicted |
boolean |
no | Whether the sample is predicted |
annotationLabelId |
string |
no | The label id for the annotation |
predictionLabelId |
string |
no | The label id for the prediction |
predictionAndAnnotationAgree |
boolean |
no | Whether the annotation and the prediction agrees |
captureReason |
CaptureReason |
no | The capture reason of the sample |
origin |
SampleOrigin |
no | The origin of the sample (e.g. |
searchText |
string |
no | Text that should be present in the sample data |
sampleIds |
array<string> |
no | The list of sample ids to return |
sampleSetId |
string |
no | The sample set that the returned samples must belong to |
inTrainSet |
boolean |
no | Whether the returned samples must be in the training set |
createdBefore |
string (date-time) |
no | Date on or before which the sample was created |
createdAfter |
string (date-time) |
no | Date on or after which the sample was created |
sortBy |
SampleSortBy |
no | How the Samples are sorted for paging and returning |
sortOrder |
SortOrder |
no | The order of sorting samples for paging and returning. Only used when sortBy is specified |
includeData |
boolean |
no default true |
Whether to include the sample data in the response. Defaults to |
Responses
| Status | Description | Body |
|---|---|---|
200 |
Success | array<Sample> |
Code samples
curl -X GET \
-H 'Authorization: Bearer <accessToken>' \
'https://www.nyckel.com/v1/functions/<functionId>/samples'
import requests
url = 'https://www.nyckel.com/v1/functions/<functionId>/samples'
headers = {
'Authorization': 'Bearer <accessToken>',
}
response = requests.get(url, headers=headers)
print(response.json())
fetch('https://www.nyckel.com/v1/functions/<functionId>/samples', {
method: 'GET',
headers: {
'Authorization': 'Bearer <accessToken>',
},
})
.then(response => response.json())
.then(data => console.log(data));
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://www.nyckel.com/v1/functions/<functionId>/samples');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET');
$headers = array(
'Authorization: Bearer <accessToken>',
);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Related
Source of truth: /openapi/v1.json