Get all pathway enrolments by user
curl --request GET \
--url https://myorg.tribalhabits.com/papi/pathway_assignments/user/{user_name} \
--header 'Authorization: <api-key>'import requests
url = "https://myorg.tribalhabits.com/papi/pathway_assignments/user/{user_name}"
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/user/{user_name}', 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/user/{user_name}",
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/user/{user_name}");
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/user/{user_name}")
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"
}
}
]
}"not found"{
"error": "Rate limit exceeded. Please slow down.",
"retry_after_seconds": 23
}Enrolments
Get all pathway enrolments by user
This endpoint retrieves all pathway enrolments for a user (paginated), oldest first. user_name is case-insensitive. Returns 404 if the user does not exist.
Results are paginated. For example, GET /papi/pathway_assignments/user/12345?page=2 returns the second page.
GET
https://myorg.tribalhabits.com/papi
/
pathway_assignments
/
user
/
{user_name}
Get all pathway enrolments by user
curl --request GET \
--url https://myorg.tribalhabits.com/papi/pathway_assignments/user/{user_name} \
--header 'Authorization: <api-key>'import requests
url = "https://myorg.tribalhabits.com/papi/pathway_assignments/user/{user_name}"
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/user/{user_name}', 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/user/{user_name}",
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/user/{user_name}");
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/user/{user_name}")
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"
}
}
]
}"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 user's user_name (case-insensitive)
Query Parameters
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
Example:
"2023-02-01T15:12:13"

