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

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

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/training-demands', 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/training-demands",
  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/training-demands"

	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/training-demands")
  .header("Authorization", "<authorization>")
  .asString();
require 'uri'
require 'net/http'

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

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": 410,
      "training": {
        "id": 15,
        "title": "Angular (advanced)",
        "level": "Middle"
      },
      "provider": {
        "id": 9,
        "name": "Google",
        "url": "https://google.com"
      },
      "author": {
        "id": 416,
        "firstName": "John",
        "lastName": "Doe",
        "type": "Owner"
      },
      "owner": {
        "id": 416,
        "firstName": "John",
        "lastName": "Doe",
        "establishmentId": 1,
        "departmentId": 12,
        "picture": {
          "id": "a41832b8-9734-493c-9185-b5ccf50ec42b",
          "href": "https://example.ilucca.net/getFile.ashx?id=a41832b8-9734-493c-9185-b5ccf50ec42b"
        },
        "manager": {
          "id": 521,
          "firstName": "Matt",
          "lastName": "Bawss"
        }
      },
      "plan": {
        "id": 2,
        "name": "2024 Plan",
        "startOn": "2024-01-01"
      },
      "createdAt": "2023-01-01T09:34:43.6529455+00:00",
      "session": {
        "id": 169,
        "durationInHours": 21,
        "location": {
          "isOnSite": false,
          "isRemote": false,
          "address": ""
        }
      },
      "prioritization": {
        "id": 2,
        "name": "High",
        "level": "High",
        "lastModifiedAt": "2023-04-19T08:17:29.4241633+00:00"
      },
      "state": "Requested",
      "status": "PendingRegistration"
    }
  ],
  "count": 234,
  "prev": "~SGlnaA|LYJ77Z9Zqz|q6",
  "next": "!SGlnaA|A1kVrwDKrz|th"
}
{
  "Status": 401,
  "Message": "Unauthorized"
}
{
  "Status": 401,
  "Message": "Unauthorized"
}
{
  "Status": 401,
  "Message": "Unauthorized"
}

Headers

Authorization
string
required

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

Query Parameters

ownerId
integer<int32>

Identifier of the employee that should attend this training session.

Required range: x >= 1
sessionId
integer<int32>

Identifier of the training session

Required range: x >= 1
states
enum<string>[]

Only retrieve training-demands at one of the given states.

Required array length: 1 - 4 elements

State the training-demand is in.

  • Invalid: Training-demand is invalid.
  • Requested: Training-demand was made, is valid and registration pending.
  • Registered: Employee was registered on a training-session for this training.
  • Realized: Employee attended the training-session he was registered on.
Available options:
Invalid,
Requested,
Registered,
Realized
trainingId
integer<int32>

Identifier of the training.

hasSession
boolean

A session is planned for this training. Omit this parameter in order to retrieve all training demands, whether a session is planned or not.

ownerDepartmentId
integer<int32>[]

Only retrieve training-demands for employeesthat currently belong to one of the liste of departments IDs.

Required range: x >= 0
ownerEstablishmentId
integer<int32>[]

Only retrieve training-demands for employeesthat currently have a work-contract with one of the listed establishment IDs.

Required range: x >= 0
priorizationLevel
integer<int32>[]

Only retrieve training-demands that were given one of the listed priority levels.

Required array length: 1 - 5 elements
Required range: 0 <= x <= 4
limit
integer
default:20

Pagination: number of items per page.

Required range: 0 <= x <= 100
page

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

Required range: x >= 0
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
sort
enum<string>[]

Sort items by one of their property. Syntax is:

<sort>                  ::= '-|+'? <property> ( ',' <property> )*
<property>              ::= <strictString> ( '.' <strictString> )*
<strictString>          ::= ( <char> | <digit> | '_' | '-' )+            
Available options:
prioritization.level,
-prioritization.level,
createdAt,
-createdAt
Example:
["-prioritization.level"]

Response

OK

count
integer<int32> | null

Total number of items across all pages. You need to include ?fields.root=count to your request to retrieve this.

Required range: x >= 0
prev
string | null

Cursor to the previous page. You need to include ?fields.root=prev in order to retrieve this.

next
string | null

Cursor to the next page. You need to include ?fields.root=next in order to retrieve this.

items
The training-demand resource · object[]