Skip to main content
GET
/
talent-training
/
api
/
v2
/
realized-trainings
List realized-trainings (v2)
curl --request GET \
  --url https://{host}/talent-training/api/v2/realized-trainings \
  --header 'Authorization: <authorization>'
import requests

url = "https://{host}/talent-training/api/v2/realized-trainings"

headers = {"Authorization": "<authorization>"}

response = requests.get(url, headers=headers)

print(response.text)
const options = {method: 'GET', headers: {Authorization: '<authorization>'}};

fetch('https://{host}/talent-training/api/v2/realized-trainings', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://{host}/talent-training/api/v2/realized-trainings",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://{host}/talent-training/api/v2/realized-trainings"

req, _ := http.NewRequest("GET", url, nil)

req.Header.Add("Authorization", "<authorization>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.get("https://{host}/talent-training/api/v2/realized-trainings")
.header("Authorization", "<authorization>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://{host}/talent-training/api/v2/realized-trainings")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'

response = http.request(request)
puts response.read_body
{
  "items": [
    {
      "id": 235,
      "ownerId": 416,
      "training": {
        "type": "object",
        "readonly": true,
        "properties": {
          "id": {
            "type": "integer",
            "format": "int32",
            "readOnly": true
          },
          "title": {
            "type": "string",
            "readonly": true
          },
          "categoryId": {
            "type": "integer",
            "readOnly": true
          },
          "providerUrl": {
            "type": "string",
            "format": "uri",
            "readOnly": true
          },
          "level": {
            "type": "string",
            "enum": [
              "Beginner",
              "Middle",
              "Expert"
            ],
            "readOnly": true
          }
        }
      },
      "trainingDemandId": 4356,
      "sessionId": 12,
      "sessionStartsOn": "2025-01-04",
      "sessionEndsOn": "2025-01-04",
      "hasAttended": true,
      "durationInHours": 14
    }
  ],
  "prev": null,
  "next": "~f",
  "count": 1234
}

Headers

Authorization
string
required

API key. Value must be formatted like so: lucca application={api_key}.

Query Parameters

ownerIds
integer<int32>[]

Filter out realized-trainings by employee ID.

Required range: x >= 1
Example:
[416, 23]
hasAttended
boolean

Filter out realized-trainings on whether their employee actually attended. When omitted, all realized-trainings are returned.

sessionEndOnBefore
string<date>

Filter out realized-trainings on their end date (lower).

sessionEndOnAfter
string<date>

Filter out realized-trainings on their end date (greater).

trainingId
integer<int32>[]

Filter out realized-trainings based on the corresponding training.

Required range: x >= 1
fields.root
enum<string>[]

Include the total number of items across all pages, as well as pointers to the previous and next pages.

Available options:
prev,
next,
count
page

Page to retrieve. Either the page index or the page cursor .

Required range: x >= 0
limit
integer
default:20

Pagination: number of items per page.

Required range: 0 <= x <= 100

Response

200 - application/json

OK

items
A new realized-training must refer to a training that is at ready state. Please note that you cannot create two realized-trainings for the same employee with the same trainingId and sessionEndOn · object[]
prev
string | null
next
string | null
count
integer<int32> | null
Required range: x >= 0