curl --request GET \
--url https://app.surfacd.com/api/v1/reports/{entity}/schema \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.surfacd.com/api/v1/reports/{entity}/schema"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.surfacd.com/api/v1/reports/{entity}/schema', 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://app.surfacd.com/api/v1/reports/{entity}/schema",
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://app.surfacd.com/api/v1/reports/{entity}/schema"
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://app.surfacd.com/api/v1/reports/{entity}/schema")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.surfacd.com/api/v1/reports/{entity}/schema")
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{
"entity": "visibility",
"title": "<string>",
"requires_dimensions": true,
"entity_columns": [
{
"id": "<string>",
"title": "<string>",
"type": "dimension",
"format": "number",
"decimals": 123,
"prefix": "<string>",
"suffix": "<string>",
"lower_is_better": true
}
],
"dimensions": [
{
"id": "<string>",
"title": "<string>",
"type": "dimension",
"format": "number",
"decimals": 123,
"prefix": "<string>",
"suffix": "<string>",
"lower_is_better": true
}
],
"measures": [
{
"id": "<string>",
"title": "<string>",
"type": "dimension",
"format": "number",
"decimals": 123,
"prefix": "<string>",
"suffix": "<string>",
"lower_is_better": true
}
],
"filter_fields": [
{
"field": "<string>",
"role": "population",
"operators": [
"in"
]
}
],
"order_fields": [
"<string>"
],
"related": {}
}Report Entity Schema
The dimensions, measures, filter fields (with their role and operators) and related blocks one report entity accepts. Use it to build or validate a query body before calling POST /api/v1/projects/{project}/reports/{entity}. The schema is the same for every project.
curl --request GET \
--url https://app.surfacd.com/api/v1/reports/{entity}/schema \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.surfacd.com/api/v1/reports/{entity}/schema"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://app.surfacd.com/api/v1/reports/{entity}/schema', 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://app.surfacd.com/api/v1/reports/{entity}/schema",
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://app.surfacd.com/api/v1/reports/{entity}/schema"
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://app.surfacd.com/api/v1/reports/{entity}/schema")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.surfacd.com/api/v1/reports/{entity}/schema")
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{
"entity": "visibility",
"title": "<string>",
"requires_dimensions": true,
"entity_columns": [
{
"id": "<string>",
"title": "<string>",
"type": "dimension",
"format": "number",
"decimals": 123,
"prefix": "<string>",
"suffix": "<string>",
"lower_is_better": true
}
],
"dimensions": [
{
"id": "<string>",
"title": "<string>",
"type": "dimension",
"format": "number",
"decimals": 123,
"prefix": "<string>",
"suffix": "<string>",
"lower_is_better": true
}
],
"measures": [
{
"id": "<string>",
"title": "<string>",
"type": "dimension",
"format": "number",
"decimals": 123,
"prefix": "<string>",
"suffix": "<string>",
"lower_is_better": true
}
],
"filter_fields": [
{
"field": "<string>",
"role": "population",
"operators": [
"in"
]
}
],
"order_fields": [
"<string>"
],
"related": {}
}Authorizations
Team API key created in Team Settings. Use it with URLs for the same team.
Path Parameters
The report entity.
A report entity. visibility: brand visibility, mentions, position, sentiment and rank; with the answer dimension, one row per AI answer (a list, no compare window). sources: cited domains, hostnames, URLs and pages. narratives: reputation narratives, themes and sentiment (needs the Reputation capability).
visibility, sources, narratives Response
The entity schema.
What one entity accepts: its dimensions, measures, filter fields with roles and operators, and related blocks.
A report entity. visibility: brand visibility, mentions, position, sentiment and rank; with the answer dimension, one row per AI answer (a list, no compare window). sources: cited domains, hostnames, URLs and pages. narratives: reputation narratives, themes and sentiment (needs the Reputation capability).
visibility, sources, narratives Columns every row carries before the dimension columns. Empty on every current entity.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Every field order_by accepts: dimensions, measures with their compare columns, and extra sort fields such as answered_at on visibility.
Related block id to a one-line description.
Show child attributes
Show child attributes