curl --request GET \
--url https://api-dev.narrative.io/encryption-materials/{encryption_material_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-dev.narrative.io/encryption-materials/{encryption_material_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-dev.narrative.io/encryption-materials/{encryption_material_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://api-dev.narrative.io/encryption-materials/{encryption_material_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: Bearer <token>"
],
]);
$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/{encryption_material_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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/{encryption_material_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-dev.narrative.io/encryption-materials/{encryption_material_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"type": "owned",
"id": "YGA7xw",
"collaborators": {
"encode": {
"type": "none"
}
},
"company_id": 1,
"created_at": "2025-04-15T21:18:07.731902Z",
"description": "Some kind of description",
"display_name": "My encryption material",
"tags": [
"use-case-1"
],
"updated_at": "2025-04-15T21:18:07.731902Z",
"updated_by": 1
}{
"error": "Unauthorized",
"error_description": "You are not authorized to use this endpoint."
}{
"error": "Unauthorized",
"error_description": "You are not authorized to use this endpoint."
}Not foundGet an encryption material
Get one encryption material your company owns or that another company shares with it. The response does not contain the key itself.
Requires read access to data_planes.
curl --request GET \
--url https://api-dev.narrative.io/encryption-materials/{encryption_material_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api-dev.narrative.io/encryption-materials/{encryption_material_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api-dev.narrative.io/encryption-materials/{encryption_material_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://api-dev.narrative.io/encryption-materials/{encryption_material_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: Bearer <token>"
],
]);
$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/{encryption_material_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
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/{encryption_material_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-dev.narrative.io/encryption-materials/{encryption_material_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"type": "owned",
"id": "YGA7xw",
"collaborators": {
"encode": {
"type": "none"
}
},
"company_id": 1,
"created_at": "2025-04-15T21:18:07.731902Z",
"description": "Some kind of description",
"display_name": "My encryption material",
"tags": [
"use-case-1"
],
"updated_at": "2025-04-15T21:18:07.731902Z",
"updated_by": 1
}{
"error": "Unauthorized",
"error_description": "You are not authorized to use this endpoint."
}{
"error": "Unauthorized",
"error_description": "You are not authorized to use this endpoint."
}Not foundAuthorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Unique identifier for an encryption material The id of the encryption material. Six characters of URL-safe base64.
"YGA7xw"
Response
OK
- Option 1
- Option 2
An encryption material. type says whether the calling company owns it (owned) or another company shared it
with the caller (shared). Only the owner sees collaborators and updated_by.
owned The id of the encryption material. Six characters of URL-safe base64.
"YGA7xw"
Which other companies can use the encryption material.
Show child attributes
Show child attributes
{
"encode": {
"type": "inclusion",
"company_ids": [1, 2, 4]
}
}
The id of an existing company
345
The name of the encryption material. Must not be blank, and must be shorter than 1024 characters.
1 - 1023"My encryption material"
1The id of an existing user
20
Must not be blank, and must be shorter than 8192 characters.
1 - 8191"Some kind of description"
Was this page helpful?

