curl --request GET \
--url https://{tenant}.earnie.dev/v1/policies/fields \
--header 'Authorization: Bearer <token>'import requests
url = "https://{tenant}.earnie.dev/v1/policies/fields"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{tenant}.earnie.dev/v1/policies/fields', 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://{tenant}.earnie.dev/v1/policies/fields",
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://{tenant}.earnie.dev/v1/policies/fields"
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://{tenant}.earnie.dev/v1/policies/fields")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}.earnie.dev/v1/policies/fields")
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{
"version": "<string>",
"domains": [
{
"domain": "license",
"fields": [
{
"path": "<string>",
"domain": "license",
"label": "<string>",
"type": "string",
"cardinality": "one",
"operators": [
"<string>"
],
"values": {
"source": "inline",
"options": [
"<string>"
],
"format": "<string>"
},
"requires": [
"<string>"
],
"optional": true,
"element_domain": "license",
"unavailable": "<string>"
}
]
}
]
}Get the field catalog visible to the caller
Returns the boot-validated field catalog grouped by domain, filtered to the scanners the caller’s organization has enabled: a scanner-gated domain and any carrier reaching into it are omitted entirely rather than returned and hidden by the client.
The response carries a strong ETag header over the schema, the embedded value lists AND the withheld scanner set, so the validator differs between two organisations on the same schema; repeat requests with a matching If-None-Match receive 304 Not Modified with an empty body. A fully entitled caller gets the unfiltered validator unchanged.
curl --request GET \
--url https://{tenant}.earnie.dev/v1/policies/fields \
--header 'Authorization: Bearer <token>'import requests
url = "https://{tenant}.earnie.dev/v1/policies/fields"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://{tenant}.earnie.dev/v1/policies/fields', 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://{tenant}.earnie.dev/v1/policies/fields",
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://{tenant}.earnie.dev/v1/policies/fields"
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://{tenant}.earnie.dev/v1/policies/fields")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://{tenant}.earnie.dev/v1/policies/fields")
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{
"version": "<string>",
"domains": [
{
"domain": "license",
"fields": [
{
"path": "<string>",
"domain": "license",
"label": "<string>",
"type": "string",
"cardinality": "one",
"operators": [
"<string>"
],
"values": {
"source": "inline",
"options": [
"<string>"
],
"format": "<string>"
},
"requires": [
"<string>"
],
"optional": true,
"element_domain": "license",
"unavailable": "<string>"
}
]
}
]
}Authorizations
An Earnie API key, sent as Authorization: Bearer sk_earnie_.... Create one under Settings > API keys. The key's scopes decide which operations it may call.
Headers
Response
Full catalog