curl --request PUT \
--url https://myorg.tribalhabits.com/papi/external_knowledges/{id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "title1",
"provider": "prov1",
"knowledge_type": 1,
"date_obtained": "1/6/2021"
}
'import requests
url = "https://myorg.tribalhabits.com/papi/external_knowledges/{id}"
payload = {
"title": "title1",
"provider": "prov1",
"knowledge_type": 1,
"date_obtained": "1/6/2021"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: 'title1',
provider: 'prov1',
knowledge_type: 1,
date_obtained: '1/6/2021'
})
};
fetch('https://myorg.tribalhabits.com/papi/external_knowledges/{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/external_knowledges/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'title' => 'title1',
'provider' => 'prov1',
'knowledge_type' => 1,
'date_obtained' => '1/6/2021'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$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/external_knowledges/{id}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "<api-key>");
request.AddJsonBody("{\n \"title\": \"title1\",\n \"provider\": \"prov1\",\n \"knowledge_type\": 1,\n \"date_obtained\": \"1/6/2021\"\n}", false);
var response = await client.PutAsync(request);
Console.WriteLine("{0}", response.Content);
require 'uri'
require 'net/http'
url = URI("https://myorg.tribalhabits.com/papi/external_knowledges/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"title1\",\n \"provider\": \"prov1\",\n \"knowledge_type\": 1,\n \"date_obtained\": \"1/6/2021\"\n}"
response = http.request(request)
puts response.read_body{
"id": 12345,
"knowledge_type": 1,
"title": "title1",
"code": "code1",
"provider": "prov1",
"date_obtained": "2021-06-01",
"certificate_number": "CI1",
"country_obtained": "AU",
"state_obtained": "NSW",
"expires": null,
"qualification_level": null,
"assessment_score": 1,
"total_time": 2,
"notes": "Notes",
"klass": "ClassA",
"created_at": "2019-08-08T15:51:31.424+10:00",
"updated_at": "2020-01-22T14:38:39.099+11:00",
"development_focus": null
}"<string>""not found"{
"error": "Rate limit exceeded. Please slow down.",
"retry_after_seconds": 23
}Update an external knowledge
This endpoint updates an existing external knowledge record. Only fields that are supplied will be updated. The user cannot be changed with this endpoint. Skills and categories are only changed when the request includes them. To clear an optional field, send an empty string, eg "notes": "". Returns 404 if the record does not exist.
id is the unique identifier of an external knowledge record.
The country and region codes can be found in this site: https://github.com/country-regions/country-region-data/blob/master/data.json
curl --request PUT \
--url https://myorg.tribalhabits.com/papi/external_knowledges/{id} \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"title": "title1",
"provider": "prov1",
"knowledge_type": 1,
"date_obtained": "1/6/2021"
}
'import requests
url = "https://myorg.tribalhabits.com/papi/external_knowledges/{id}"
payload = {
"title": "title1",
"provider": "prov1",
"knowledge_type": 1,
"date_obtained": "1/6/2021"
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
title: 'title1',
provider: 'prov1',
knowledge_type: 1,
date_obtained: '1/6/2021'
})
};
fetch('https://myorg.tribalhabits.com/papi/external_knowledges/{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/external_knowledges/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'title' => 'title1',
'provider' => 'prov1',
'knowledge_type' => 1,
'date_obtained' => '1/6/2021'
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$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/external_knowledges/{id}");
var client = new RestClient(options);
var request = new RestRequest("");
request.AddHeader("Authorization", "<api-key>");
request.AddJsonBody("{\n \"title\": \"title1\",\n \"provider\": \"prov1\",\n \"knowledge_type\": 1,\n \"date_obtained\": \"1/6/2021\"\n}", false);
var response = await client.PutAsync(request);
Console.WriteLine("{0}", response.Content);
require 'uri'
require 'net/http'
url = URI("https://myorg.tribalhabits.com/papi/external_knowledges/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"title\": \"title1\",\n \"provider\": \"prov1\",\n \"knowledge_type\": 1,\n \"date_obtained\": \"1/6/2021\"\n}"
response = http.request(request)
puts response.read_body{
"id": 12345,
"knowledge_type": 1,
"title": "title1",
"code": "code1",
"provider": "prov1",
"date_obtained": "2021-06-01",
"certificate_number": "CI1",
"country_obtained": "AU",
"state_obtained": "NSW",
"expires": null,
"qualification_level": null,
"assessment_score": 1,
"total_time": 2,
"notes": "Notes",
"klass": "ClassA",
"created_at": "2019-08-08T15:51:31.424+10:00",
"updated_at": "2020-01-22T14:38:39.099+11:00",
"development_focus": null
}"<string>""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
Body
Identifies whose skills to update. Only needed with skills_attained when the record belongs to more than one user; otherwise 400 is returned
1 = Training, 2 = Certificate, 3 = Qualification, 4 = License, 5 = Document, 6 = Development Plan. Can also be sent as a string, eg "1"
1, 2, 3, 4, 5, 6 Alternative to knowledge_type, as text: Training, Certificate, Qualification, License, Document or Development Plan (case-insensitive). Required to use document_type or the Development Plan fields
For type Document only. The type of Document, eg General, Employment, Financial, Medical, Performance, Policy, Travel, Registration, Membership. Stored in code
Title of external knowledge. Set automatically to Development Plan for Development Plans
Optional code for the external knowledge
Provider
The date you obtained this knowledge. Formats: 'yyyy-mm-dd', 'dd/mm/yyyy' or 'dd/mm/yy'. date is accepted as an alternative name
Certificate Number
Country in code form (eg 'AU' for Australia)
State or Region in code form (eg 'NSW'). region_obtained is accepted as an alternative name
Date the knowledge expires. Same formats as date_obtained
Qualification level, eg Certificate IV, Diploma, Bachelor Degree
Assessment score as a decimal, eg 1.2
Time in minutes, as a whole number
Notes
Class of knowledge. class is accepted as an alternative name
For type Development Plan only. Stored in provider
For type Development Plan only. Stored in date_obtained
For type Development Plan only. Stored in expires
For type Development Plan only. Initial, Mid Review or End Review. Stored in code
Initial, Mid Review, End Review For Development Plans: At Level, Transition or Progression
At Level, Transition, Progression Skill names attained by this knowledge. Separate multiple skills with ;. Replaces the current skills; send an empty value to remove them. Unknown skills are ignored
Category name attained in the knowledge. The categories sent replace the current ones; if no category fields are sent, the categories are unchanged. Unknown categories return 400
Points for category 1, eg 10 or 12.5. Stored to 2 decimal places. Can also be sent as a numeric string, eg "10"
Time in minutes for category 1, eg 60 or 90.5. Can also be sent as a numeric string, eg "60"
Category name attained in the knowledge. The categories sent replace the current ones; if no category fields are sent, the categories are unchanged. Unknown categories return 400
Points for category 2, eg 10 or 12.5. Stored to 2 decimal places. Can also be sent as a numeric string, eg "10"
Time in minutes for category 2, eg 60 or 90.5. Can also be sent as a numeric string, eg "60"
Category name attained in the knowledge. The categories sent replace the current ones; if no category fields are sent, the categories are unchanged. Unknown categories return 400
Points for category 3, eg 10 or 12.5. Stored to 2 decimal places. Can also be sent as a numeric string, eg "10"
Time in minutes for category 3, eg 60 or 90.5. Can also be sent as a numeric string, eg "60"
Response
The updated external knowledge record
Unique identifier of the external knowledge record, used with show and update
1 = Training, 2 = Certificate, 3 = Qualification, 4 = License, 5 = Document, 6 = Development Plan
1, 2, 3, 4, 5, 6 Code for the knowledge. For Documents this holds the document type, and for Development Plans the stage
Date in the form 'yyyy-mm-dd'
State or region code
Date in the form 'yyyy-mm-dd'
Class of knowledge

