curl --request GET \
--url https://myorg.tribalhabits.com/papi/pathway_assignments \
--header 'Authorization: <api-key>'import requests
url = "https://myorg.tribalhabits.com/papi/pathway_assignments"
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/pathway_assignments', 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/pathway_assignments",
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/pathway_assignments");
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/pathway_assignments")
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": 371,
"max_per_page": 25,
"current_page": 1,
"total_pages": 15,
"records": [
{
"id": 2,
"created_at": "2019-08-08T15:51:31.424+10:00",
"updated_at": "2020-01-22T14:38:39.099+11:00",
"conquered_at": null,
"status": "Unexplored",
"due_date": "2019-12-03T10:54:00.000+11:00",
"enrolled_by": "PAPI",
"certified_date": null,
"recertification_allowed": true,
"skills_attained": [
{
"id": 13,
"name": "First Aid"
}
],
"person": {
"id": 4,
"name": "UserB",
"user_name": "12345",
"link": "/people/users/6"
},
"pathway": {
"id": 1,
"title": "Test Pathway ABC",
"link": "/knowledge/pathways/1/overview",
"show_certificate": true,
"external_id": "123"
}
}
]
}{
"error": "Rate limit exceeded. Please slow down.",
"retry_after_seconds": 23
}Get all pathway enrolments
This endpoint retrieves all pathway enrolments (paginated), oldest first.
The same list, filtered to one pathway or one user, is also available at GET /papi/pathway_assignments/by_pathway/PATHWAY_ID and GET /papi/pathway_assignments/by_user/USER_ID, where USER_ID is the internal user ID (person.id).
If a pathway_id, user_name or user_id filter does not match a pathway or user, no records are returned.
Results are paginated. For example, GET /papi/pathway_assignments?page=2 returns the second page.
To create or update pathway enrolments, use Create or update topic or pathway enrolments.
curl --request GET \
--url https://myorg.tribalhabits.com/papi/pathway_assignments \
--header 'Authorization: <api-key>'import requests
url = "https://myorg.tribalhabits.com/papi/pathway_assignments"
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/pathway_assignments', 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/pathway_assignments",
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/pathway_assignments");
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/pathway_assignments")
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": 371,
"max_per_page": 25,
"current_page": 1,
"total_pages": 15,
"records": [
{
"id": 2,
"created_at": "2019-08-08T15:51:31.424+10:00",
"updated_at": "2020-01-22T14:38:39.099+11:00",
"conquered_at": null,
"status": "Unexplored",
"due_date": "2019-12-03T10:54:00.000+11:00",
"enrolled_by": "PAPI",
"certified_date": null,
"recertification_allowed": true,
"skills_attained": [
{
"id": 13,
"name": "First Aid"
}
],
"person": {
"id": 4,
"name": "UserB",
"user_name": "12345",
"link": "/people/users/6"
},
"pathway": {
"id": 1,
"title": "Test Pathway ABC",
"link": "/knowledge/pathways/1/overview",
"show_certificate": true,
"external_id": "123"
}
}
]
}{
"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
Comma separated list of pathway ids, eg 1,17
A single pathway id
Only enrolments for this user (case-insensitive)
Only enrolments for this internal user ID (person.id)
Results page to return
Maximum number of results per page. Maximum permitted page size is 100. Larger values are reduced to 100.
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"

