curl --request GET \
--url https://myorg.tribalhabits.com/papi/topics \
--header 'Authorization: <api-key>'import requests
url = "https://myorg.tribalhabits.com/papi/topics"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://myorg.tribalhabits.com/papi/topics', 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://myorg.tribalhabits.com/papi/topics",
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: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}using RestSharp;
var options = new RestClientOptions("https://myorg.tribalhabits.com/papi/topics");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "<api-key>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
require 'uri'
require 'net/http'
url = URI("https://myorg.tribalhabits.com/papi/topics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"total_records": 47,
"max_per_page": 25,
"current_page": 1,
"total_pages": 2,
"records": [
{
"id": 16,
"title": "A topic title",
"knowledge_code": "SALES-101",
"structure": "parts",
"assessment": true,
"num_assessment_questions_to_ask": 3,
"num_assessment_questions_to_pass": 1,
"num_assessment_resets_permitted": 3,
"duration_in_minutes": 12,
"free": false,
"restricted": false,
"due_mode": "none",
"due_date": null,
"due_in_days": null,
"visibility": "public",
"allow_public_signup": false,
"show_accessibility_section_headers": false,
"show_narration_scripts": false,
"hide_system_oeq_responses": false,
"knowledge_type": 0,
"manager_enrol": false,
"manager_unenrol": false,
"certified_mode": "none",
"certified_days": null,
"certified_date": null,
"show_certificate": true,
"certificate_expire_event": 0,
"recertify": false,
"recertification_days": 0,
"hide_results_until_admin_approval": false,
"created_at": "2019-07-01T15:22:05.752+10:00",
"updated_at": "2020-01-22T14:38:39.099+11:00",
"completion_certificate_id": null,
"external_id": "123",
"categories": [
{
"id": 1,
"name": "Sales",
"show_explorers": true,
"time_allocation": null,
"points_allocation": null
}
],
"topic_categories": [
{
"id": 34,
"category_id": 6,
"time_allocation": 70,
"points_allocation": 0
}
],
"skills": [
{
"id": 13,
"name": "First Aid",
"show_explorers": true
}
],
"links": {
"standard": "https://myorg.tribalhabits.com/topics/16/explore",
"internal_enrol": "https://myorg.tribalhabits.com/internals/437fafd440cdde8a4cb13955217f96ac",
"enrol_links": [
{
"id": 35,
"entity_type": 0,
"link_type": 0,
"url": "https://myorg.tribalhabits.com/internals/437fafd440cdde8a4cb13955217f96ac",
"reference": "testInt",
"active": true,
"enrolments_count": 0,
"enrolment_limit": 0,
"user_type": null,
"expires": null
}
]
},
"saved_searches": [
{
"id": 47,
"q": [
{
"op": "in",
"attr": "category",
"name": "Type",
"values": [
"staff"
],
"description": " Type is Staff"
}
]
}
],
"version": {
"major": 1,
"minor": 0,
"created_at": "2019-07-01T15:23:56.815+10:00"
},
"code": "TH-4-16",
"scorm_file_count": 0
}
]
}{
"error": "Rate limit exceeded. Please slow down.",
"retry_after_seconds": 23
}Get all topics
This endpoint retrieves all topics (paginated), ordered by title. Draft and archived topics are included; use visibility to tell them apart.
knowledge_type can be either 0 or 1. Where 0 = standard topic, 1 = short topic.
Results are paginated. For example, GET /papi/topics?page=2 returns the second page.
curl --request GET \
--url https://myorg.tribalhabits.com/papi/topics \
--header 'Authorization: <api-key>'import requests
url = "https://myorg.tribalhabits.com/papi/topics"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://myorg.tribalhabits.com/papi/topics', 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://myorg.tribalhabits.com/papi/topics",
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: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}using RestSharp;
var options = new RestClientOptions("https://myorg.tribalhabits.com/papi/topics");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "<api-key>");
var response = await client.GetAsync(request);
Console.WriteLine("{0}", response.Content);
require 'uri'
require 'net/http'
url = URI("https://myorg.tribalhabits.com/papi/topics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"total_records": 47,
"max_per_page": 25,
"current_page": 1,
"total_pages": 2,
"records": [
{
"id": 16,
"title": "A topic title",
"knowledge_code": "SALES-101",
"structure": "parts",
"assessment": true,
"num_assessment_questions_to_ask": 3,
"num_assessment_questions_to_pass": 1,
"num_assessment_resets_permitted": 3,
"duration_in_minutes": 12,
"free": false,
"restricted": false,
"due_mode": "none",
"due_date": null,
"due_in_days": null,
"visibility": "public",
"allow_public_signup": false,
"show_accessibility_section_headers": false,
"show_narration_scripts": false,
"hide_system_oeq_responses": false,
"knowledge_type": 0,
"manager_enrol": false,
"manager_unenrol": false,
"certified_mode": "none",
"certified_days": null,
"certified_date": null,
"show_certificate": true,
"certificate_expire_event": 0,
"recertify": false,
"recertification_days": 0,
"hide_results_until_admin_approval": false,
"created_at": "2019-07-01T15:22:05.752+10:00",
"updated_at": "2020-01-22T14:38:39.099+11:00",
"completion_certificate_id": null,
"external_id": "123",
"categories": [
{
"id": 1,
"name": "Sales",
"show_explorers": true,
"time_allocation": null,
"points_allocation": null
}
],
"topic_categories": [
{
"id": 34,
"category_id": 6,
"time_allocation": 70,
"points_allocation": 0
}
],
"skills": [
{
"id": 13,
"name": "First Aid",
"show_explorers": true
}
],
"links": {
"standard": "https://myorg.tribalhabits.com/topics/16/explore",
"internal_enrol": "https://myorg.tribalhabits.com/internals/437fafd440cdde8a4cb13955217f96ac",
"enrol_links": [
{
"id": 35,
"entity_type": 0,
"link_type": 0,
"url": "https://myorg.tribalhabits.com/internals/437fafd440cdde8a4cb13955217f96ac",
"reference": "testInt",
"active": true,
"enrolments_count": 0,
"enrolment_limit": 0,
"user_type": null,
"expires": null
}
]
},
"saved_searches": [
{
"id": 47,
"q": [
{
"op": "in",
"attr": "category",
"name": "Type",
"values": [
"staff"
],
"description": " Type is Staff"
}
]
}
],
"version": {
"major": 1,
"minor": 0,
"created_at": "2019-07-01T15:23:56.815+10:00"
},
"code": "TH-4-16",
"scorm_file_count": 0
}
]
}{
"error": "Rate limit exceeded. Please slow down.",
"retry_after_seconds": 23
}Authorizations
Your organisation's API key, sent as Authorization: my_api_key. The key can also be passed as an api_key query parameter. See Authentication.
Query Parameters
Results page to return
Maximum number of results per page. Maximum permitted page size is 100. Larger values are reduced to 100.
0 returns only standard topics, 1 returns only short topics. If omitted, both are returned
0, 1 Only records updated after this time, in UTC. Use the ISO 8601 form "yyyy-mm-ddThh:mm:ss", eg "2023-02-01T15:12:13". Do not include a time zone offset
"2023-02-01T15:12:13"

