Poll certificate status
curl --request GET \
--url https://myorg.tribalhabits.com/papi/certificates/status/{job_id} \
--header 'Authorization: <api-key>'import requests
url = "https://myorg.tribalhabits.com/papi/certificates/status/{job_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/certificates/status/{job_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/certificates/status/{job_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/certificates/status/{job_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/certificates/status/{job_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{
"job_id": "cert_abc123xyz",
"status": "complete",
"url": "https://s3.ap-southeast-2.amazonaws.com/bucket/tenants/org/certificates/cert_abc123xyz.pdf?X-Amz-..."
}Certificates
Poll certificate status
This endpoint checks the status of a certificate generation job. Jobs expire 24 hours after they are requested, after which this endpoint returns 404.
This is step 2 of 3. Once complete, download the PDF from url. See Certificates for the full process.
GET
https://myorg.tribalhabits.com/papi
/
certificates
/
status
/
{job_id}
Poll certificate status
curl --request GET \
--url https://myorg.tribalhabits.com/papi/certificates/status/{job_id} \
--header 'Authorization: <api-key>'import requests
url = "https://myorg.tribalhabits.com/papi/certificates/status/{job_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/certificates/status/{job_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/certificates/status/{job_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/certificates/status/{job_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/certificates/status/{job_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{
"job_id": "cert_abc123xyz",
"status": "complete",
"url": "https://s3.ap-southeast-2.amazonaws.com/bucket/tenants/org/certificates/cert_abc123xyz.pdf?X-Amz-..."
}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 certificate job identifier returned from GET /papi/certificates
Response
OK - Job finished (status complete with url, or status failed with error)
The certificate job identifier
Available options:
pending, complete, failed Present when status is complete. Temporary pre-signed URL of the certificate PDF. It expires after 15 minutes. See Download certificate PDF
Present when status is failed

