curl --request GET \
--url https://app.surfacd.com/api/v1/projects/{project}/reports/values/{field} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.surfacd.com/api/v1/projects/{project}/reports/values/{field}"
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/projects/{project}/reports/values/{field}', 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/projects/{project}/reports/values/{field}",
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/projects/{project}/reports/values/{field}"
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/projects/{project}/reports/values/{field}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.surfacd.com/api/v1/projects/{project}/reports/values/{field}")
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{
"field": "brand_uuid",
"search": "",
"total": 26,
"values": [
{
"value": "competitors",
"label": "Competitors",
"description": "brands marked as competitors"
},
{
"value": "4e1f77d6-35d8-4a29-9fb6-d83e51469b35",
"label": "Apple",
"description": "primary brand"
},
{
"value": "bb908fbe-ad42-4a75-8555-648b5298a159",
"label": "Anker",
"description": null
}
]
}List Report Field Values
The values one scope or filter field accepts for the project, so a condition can be filled without guessing. A key field lists its keys with their names as labels: brand UUIDs (brand_uuid; primary brand first; brand_uuid and mentions_brand start with competitors, the brands marked as competitors), narrative, theme, prompt, topic (no_topic first) and tag (untagged first) UUIDs, platform slugs (service_provider) and country codes (country_code), so a client never maps codes to names itself. A name field (brand, topic, tag, prompt, service, country, narrative, theme) lists the names. Also listed: the domains the project’s answers cite (most cited first) and the fixed vocabularies (page_type, category, brand_on_page, mention_sentiment, page_sentiment, narrative_sentiment, carries_sentiment).
Put the returned value in the condition; label and description are for people. search matches the label case-insensitively (prompts, domains and narratives search in the database). total counts the matches before limit. The narrative and theme fields need the Reputation capability.
curl --request GET \
--url https://app.surfacd.com/api/v1/projects/{project}/reports/values/{field} \
--header 'Authorization: Bearer <token>'import requests
url = "https://app.surfacd.com/api/v1/projects/{project}/reports/values/{field}"
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/projects/{project}/reports/values/{field}', 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/projects/{project}/reports/values/{field}",
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/projects/{project}/reports/values/{field}"
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/projects/{project}/reports/values/{field}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.surfacd.com/api/v1/projects/{project}/reports/values/{field}")
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{
"field": "brand_uuid",
"search": "",
"total": 26,
"values": [
{
"value": "competitors",
"label": "Competitors",
"description": "brands marked as competitors"
},
{
"value": "4e1f77d6-35d8-4a29-9fb6-d83e51469b35",
"label": "Apple",
"description": "primary brand"
},
{
"value": "bb908fbe-ad42-4a75-8555-648b5298a159",
"label": "Anker",
"description": null
}
]
}Authorizations
Path Parameters
A scope or filter field with a value list. A key field lists its keys with their names as labels, and the reserved values first (competitors, untagged, no_topic, no_persona); a name field lists each name once, as both value and label.
brand_uuid, brand, mentions_brand, page_brand, answer_brand, narrative_uuid, narrative, carries_narrative, theme_uuid, theme, carries_theme, prompt_uuid, prompt, topic_uuid, topic, persona_uuid, persona, tag_uuid, tag, branded, buying_stage, service_provider, service, country_code, country, domain, cites_domain, page_type, category, brand_on_page, mention_sentiment, page_sentiment, narrative_sentiment, carries_sentiment