curl --request GET \
--url https://myorg.tribalhabits.com/papi/topics/{id} \
--header 'Authorization: <api-key>'import requests
url = "https://myorg.tribalhabits.com/papi/topics/{id}"
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/{id}', 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/{id}",
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/{id}");
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/{id}")
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{
"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
}"not found"{
"error": "Rate limit exceeded. Please slow down.",
"retry_after_seconds": 23
}Get a specific topic
This endpoint retrieves a specific topic.
Returns 404 if the topic does not exist.
curl --request GET \
--url https://myorg.tribalhabits.com/papi/topics/{id} \
--header 'Authorization: <api-key>'import requests
url = "https://myorg.tribalhabits.com/papi/topics/{id}"
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/{id}', 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/{id}",
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/{id}");
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/{id}")
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{
"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
}"not found"{
"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.
Path Parameters
The unique identifier of a topic
Response
The topic
none, fixed_date (due by due_date) or fixed_time (due due_in_days after enrolment)
none, fixed_date, fixed_time private (draft), public (active) or archived
private, public, archived 0 = standard topic, 1 = short topic
0, 1 none (certificate always valid), fixed_date (valid until certified_date) or fixed_time (valid for certified_days)
none, fixed_date, fixed_time When certified_mode is fixed_time: 0 = days counted from completion, 1 = days counted from enrolment
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Current published version. Omitted if the topic has never been published
Show child attributes
Show child attributes
Enrolment code for this topic, used in enrolment requests

