Reveal API Key
curl --request GET \
--url https://developer.encrata.com/api/account/keys/reveal \
--header 'Authorization: <api-key>'import requests
url = "https://developer.encrata.com/api/account/keys/reveal"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://developer.encrata.com/api/account/keys/reveal', 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://developer.encrata.com/api/account/keys/reveal",
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;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://developer.encrata.com/api/account/keys/reveal"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<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://developer.encrata.com/api/account/keys/reveal")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://developer.encrata.com/api/account/keys/reveal")
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{
"key": "<string>"
}API Keys
Reveal API Key
Read the full value of a revealable API key.
GET
/
api
/
account
/
keys
/
reveal
Reveal API Key
curl --request GET \
--url https://developer.encrata.com/api/account/keys/reveal \
--header 'Authorization: <api-key>'import requests
url = "https://developer.encrata.com/api/account/keys/reveal"
headers = {"Authorization": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<api-key>'}};
fetch('https://developer.encrata.com/api/account/keys/reveal', 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://developer.encrata.com/api/account/keys/reveal",
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;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://developer.encrata.com/api/account/keys/reveal"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<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://developer.encrata.com/api/account/keys/reveal")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://developer.encrata.com/api/account/keys/reveal")
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{
"key": "<string>"
}Reveal API Key returns the full secret for a key that Encrata stored as revealable.
Authentication
Requires an API key in theAuthorization header. Members with the readonly
role cannot reveal keys.
Authorization: Bearer enc_xxxxxxxxxxxx
Request
string
required
The key’s UUID, as returned by List API Keys.
curl "https://developer.encrata.com/api/account/keys/reveal?id=a1b2c3d4-0000-4000-8000-000000000000" \
-H "Authorization: Bearer enc_xxxxxxxxxxxx"
Response
The response usesCache-Control: no-store.
string
The full API key, including its
enc_ prefix.{
"key": "enc_1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6d"
}
Errors
| Status | Cause |
|---|---|
400 | id is missing or is not a valid UUID |
403 | The caller has the readonly role |
404 | The key does not exist or belongs to a different workspace |
410 | The key can no longer be shown |
405 | The request did not use GET |
500 | The key could not be retrieved |
Anyone who can read this response can use the key. Do not log, cache, or send
the returned value to a client-side application.
Was this page helpful?