curl --request GET \
--url https://{tenant_name}.{region}.techwolf.ai/organisational_units/export \
--header 'Authorization: Bearer <token>'import requests
url = "https://{tenant_name}.{region}.techwolf.ai/organisational_units/export"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{tenant_name}.{region}.techwolf.ai/organisational_units/export', 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://{tenant_name}.{region}.techwolf.ai/organisational_units/export",
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: Bearer <token>"
],
]);
$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://{tenant_name}.{region}.techwolf.ai/organisational_units/export"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{tenant_name}.{region}.techwolf.ai/organisational_units/export")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant_name}.{region}.techwolf.ai/organisational_units/export")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"organisational_structure": [
{
"external_id": "c3903505-eb84-42dc-a79f-5d8b1fe897b7",
"name": "Engineering",
"total_nr_of_employees": 16,
"children": [
{
"external_id": "d3903505-eb84-42dc-a79f-5d8b1fe897b7",
"name": "Frontend Engineering",
"total_nr_of_employees": 9,
"children": [
{}
],
"low_data_availability": 123
}
],
"low_data_availability": 123
}
]
}[
{
"title": "400 Bad Request",
"description": "The request body was not structured correctly."
}
][
{
"title": "401 Unauthorized",
"description": "OAuth access token is missing, invalid or expired."
}
][
{
"title": "403 Forbidden",
"description": "You don't have access to this resource."
}
][
{
"title": "405 Method Not Allowed",
"description": "This method is not allowed for the requested URL."
}
]max connections reached: <limit>[
{
"title": "503 Service Unavailable",
"description": "The Skill Engine API is currently not available. Please contact TechWolf or try again later."
}
]Export Organisational Structure hierarchy
Export the Organisational Structure as a hierarchy. Each Organisational Unit can have at most one parent unit, with no limit on the number of levels.
curl --request GET \
--url https://{tenant_name}.{region}.techwolf.ai/organisational_units/export \
--header 'Authorization: Bearer <token>'import requests
url = "https://{tenant_name}.{region}.techwolf.ai/organisational_units/export"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{tenant_name}.{region}.techwolf.ai/organisational_units/export', 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://{tenant_name}.{region}.techwolf.ai/organisational_units/export",
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: Bearer <token>"
],
]);
$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://{tenant_name}.{region}.techwolf.ai/organisational_units/export"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://{tenant_name}.{region}.techwolf.ai/organisational_units/export")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant_name}.{region}.techwolf.ai/organisational_units/export")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"organisational_structure": [
{
"external_id": "c3903505-eb84-42dc-a79f-5d8b1fe897b7",
"name": "Engineering",
"total_nr_of_employees": 16,
"children": [
{
"external_id": "d3903505-eb84-42dc-a79f-5d8b1fe897b7",
"name": "Frontend Engineering",
"total_nr_of_employees": 9,
"children": [
{}
],
"low_data_availability": 123
}
],
"low_data_availability": 123
}
]
}[
{
"title": "400 Bad Request",
"description": "The request body was not structured correctly."
}
][
{
"title": "401 Unauthorized",
"description": "OAuth access token is missing, invalid or expired."
}
][
{
"title": "403 Forbidden",
"description": "You don't have access to this resource."
}
][
{
"title": "405 Method Not Allowed",
"description": "This method is not allowed for the requested URL."
}
]max connections reached: <limit>[
{
"title": "503 Service Unavailable",
"description": "The Skill Engine API is currently not available. Please contact TechWolf or try again later."
}
]Authorizations
Query Parameters
The unique ID of a Skill, consisting of alphanumeric characters and hyphens. Setting this parameter will include only Organisational Units with Employees that have this Skill in their Skill Profile, and per Organisational Unit only count the number of Employees with this Skill.
1 - 100"a3903505-eb84-42dc-a79f-5e7b1fe897b7"
When set to low_data_availability_flag, the response will include information about the total number of Employees with low data availability within each Organisational Unit. For Employees, this field is equal to 1 or 0 depending on whether the Employee has low data availability.
low_data_availability_flag ["low_data_availability_flag"]
Was this page helpful?