Functions · operationId:GetFunction, GetFunctionSummary

Get a Function

Two views of a Function are available: its configuration (name, modality, project, etc.) and a summary of its current state (sample counts, label counts, training progress).

There are two ways to call this operation:

Configuration

operationId: GetFunction
GET /v1/functions/{functionId}

Description

Returns the Function’s static configuration — the properties set at creation time plus any subsequent updates via PUT.

Path parameters

NameTypeRequiredDescription
functionId string yes

Responses

StatusDescriptionBody
200 Success Function

Code samples

curl
curl -X GET \
  -H 'Authorization: Bearer <accessToken>' \
  'https://www.nyckel.com/v1/functions/<functionId>'
Python
import requests

url = 'https://www.nyckel.com/v1/functions/<functionId>'
headers = {
    'Authorization': 'Bearer <accessToken>',
}

response = requests.get(url, headers=headers)
print(response.json())
JavaScript
fetch('https://www.nyckel.com/v1/functions/<functionId>', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer <accessToken>',
  },
})
  .then(response => response.json())
  .then(data => console.log(data));
PHP
<?php
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://www.nyckel.com/v1/functions/<functionId>');
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;

Summary

operationId: GetFunctionSummary
GET /v1/functions/{functionId}/summary

Description

Returns aggregate counts for a Function — total samples, annotated samples, and per-Label counts. Useful for dashboards and training-progress checks.

Path parameters

NameTypeRequiredDescription
functionId string yes

Responses

StatusDescriptionBody
200 Success FunctionSummary

Code samples

curl
curl -X GET \
  -H 'Authorization: Bearer <accessToken>' \
  'https://www.nyckel.com/v1/functions/<functionId>/summary'
Python
import requests

url = 'https://www.nyckel.com/v1/functions/<functionId>/summary'
headers = {
    'Authorization': 'Bearer <accessToken>',
}

response = requests.get(url, headers=headers)
print(response.json())
JavaScript
fetch('https://www.nyckel.com/v1/functions/<functionId>/summary', {
  method: 'GET',
  headers: {
    'Authorization': 'Bearer <accessToken>',
  },
})
  .then(response => response.json())
  .then(data => console.log(data));
PHP
<?php
$ch = curl_init();

curl_setopt($ch, CURLOPT_URL, 'https://www.nyckel.com/v1/functions/<functionId>/summary');
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;