List decrypted encryption materials
curl --request GET \
--url https://api-dev.narrative.io/encryption-materials/decrypted \
--header 'Authorization: Bearer <token>' \
--header 'X-Narrative-Data-Plane-Secret: <api-key>'import requests
url = "https://api-dev.narrative.io/encryption-materials/decrypted"
headers = {
"Authorization": "Bearer <token>",
"X-Narrative-Data-Plane-Secret": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'X-Narrative-Data-Plane-Secret': '<api-key>'}
};
fetch('https://api-dev.narrative.io/encryption-materials/decrypted', 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-dev.narrative.io/encryption-materials/decrypted",
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: Bearer <token>",
"X-Narrative-Data-Plane-Secret: <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-dev.narrative.io/encryption-materials/decrypted"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("X-Narrative-Data-Plane-Secret", "<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-dev.narrative.io/encryption-materials/decrypted")
.header("Authorization", "Bearer <token>")
.header("X-Narrative-Data-Plane-Secret", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-dev.narrative.io/encryption-materials/decrypted")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["X-Narrative-Data-Plane-Secret"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"records": [
{
"id": "tmh-9w",
"company_id": 1,
"key": "42qM49JKw-ssWntvUKez25ku9xxge6P-h_X3bVlZe5M=",
"salt": "eROwh_ni8r6pbjRNXj3cOZJPMK348NG-zpy6mzuLISk="
}
]
}{
"error": "Unauthorized",
"error_description": "You are not authorized to use this endpoint."
}{
"error": "Unauthorized",
"error_description": "You are not authorized to use this endpoint."
}Encryption Materials
List decrypted encryption materials
List the keys and salts of the active encryption materials your company owns or can use. Data planes call this to encode Narrative IDs. The request needs both a bearer token and the data plane secret header.
Requires read access to data_planes.
GET
/
encryption-materials
/
decrypted
List decrypted encryption materials
curl --request GET \
--url https://api-dev.narrative.io/encryption-materials/decrypted \
--header 'Authorization: Bearer <token>' \
--header 'X-Narrative-Data-Plane-Secret: <api-key>'import requests
url = "https://api-dev.narrative.io/encryption-materials/decrypted"
headers = {
"Authorization": "Bearer <token>",
"X-Narrative-Data-Plane-Secret": "<api-key>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {Authorization: 'Bearer <token>', 'X-Narrative-Data-Plane-Secret': '<api-key>'}
};
fetch('https://api-dev.narrative.io/encryption-materials/decrypted', 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-dev.narrative.io/encryption-materials/decrypted",
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: Bearer <token>",
"X-Narrative-Data-Plane-Secret: <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-dev.narrative.io/encryption-materials/decrypted"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("X-Narrative-Data-Plane-Secret", "<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-dev.narrative.io/encryption-materials/decrypted")
.header("Authorization", "Bearer <token>")
.header("X-Narrative-Data-Plane-Secret", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-dev.narrative.io/encryption-materials/decrypted")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
request["X-Narrative-Data-Plane-Secret"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"records": [
{
"id": "tmh-9w",
"company_id": 1,
"key": "42qM49JKw-ssWntvUKez25ku9xxge6P-h_X3bVlZe5M=",
"salt": "eROwh_ni8r6pbjRNXj3cOZJPMK348NG-zpy6mzuLISk="
}
]
}{
"error": "Unauthorized",
"error_description": "You are not authorized to use this endpoint."
}{
"error": "Unauthorized",
"error_description": "You are not authorized to use this endpoint."
}Was this page helpful?

