curl --request GET \
--url https://api.baselayer.com/issuance/credentials/events/export \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.baselayer.com/issuance/credentials/events/export"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.baselayer.com/issuance/credentials/events/export', 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://api.baselayer.com/issuance/credentials/events/export",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.baselayer.com/issuance/credentials/events/export"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.baselayer.com/issuance/credentials/events/export")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.baselayer.com/issuance/credentials/events/export")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"type": "validation_failed",
"code": 7112,
"message": "The request is invalid.",
"metadata": {}
}Export your organization's credential events
Every event the same filters list, as CSV in the list’s order, streamed with no row cap.
curl --request GET \
--url https://api.baselayer.com/issuance/credentials/events/export \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.baselayer.com/issuance/credentials/events/export"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.baselayer.com/issuance/credentials/events/export', 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://api.baselayer.com/issuance/credentials/events/export",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-API-Key: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.baselayer.com/issuance/credentials/events/export"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.baselayer.com/issuance/credentials/events/export")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.baselayer.com/issuance/credentials/events/export")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"type": "validation_failed",
"code": 7112,
"message": "The request is invalid.",
"metadata": {}
}Authorizations
Query Parameters
occurred_at: when the credential was issued or revoked; ties break on the credential's created_at, then its id, then the event (ISSUED before REVOKED ascending). Defaults to occurred_at desc.
What a credential event list sorts by.
occurred_at asc or desc, for every key of the sort. Defaults to the field's own: occurred_at desc.
asc, desc Only credentials of these levels; repeat for more than one. Default all.
The credential layer a subject mint request selects (KYA).
Deliberately narrower than IssuedCredentialType: the individual
and business mint routes issue only the two subject layers.
Counterparty credentials have their own route and request shape, so
a level of COUNTERPARTY must stay an edge-level payload refusal
— this enum is what keeps issuance-record vocabulary growth from
widening the mint requests.
L2, L3 Only events of credentials in this state now. A credential's effective state as an issuance-log reader sees it.
Derived, never stored: IssuedCredentialStatus deliberately keeps
expiry out of the persisted status (verifiers check exp), but the
console and API consumers filter the log by what a credential is
right now — still presentable, aged out, or killed.
ACTIVE, EXPIRED, REVOKED Only credentials minted for this individual or by them for a business.
1 - 255Only credentials minted for this business.
1 - 255Every word must match the person's or business's name as the credential minted it, the audience or the credential id; a individual_ref or business_ref your organization holds matches exactly.
255Only these events; repeat for several.
What happened to a credential, as one row of its event stream.
ISSUED, REVOKED Filter records created on or after this date (format: YYYY-MM-DD).
Filter records created on or before this date (format: YYYY-MM-DD).
IANA timezone identifier used to interpret start_date and end_date (defaults to UTC).
"UTC"
"America/Los_Angeles"
"Europe/London"
Response
Every event matching the filters, as CSV.