Get an action with its evidence
curl --request GET \
--url https://www.getsurfaced.ai/api/v1/actions/{id} \
--header 'Authorization: Bearer <token>' \
--header 'X-Workspace-Id: <x-workspace-id>'import requests
url = "https://www.getsurfaced.ai/api/v1/actions/{id}"
headers = {
"X-Workspace-Id": "<x-workspace-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-Workspace-Id': '<x-workspace-id>', Authorization: 'Bearer <token>'}
};
fetch('https://www.getsurfaced.ai/api/v1/actions/{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://www.getsurfaced.ai/api/v1/actions/{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>",
"X-Workspace-Id: <x-workspace-id>"
],
]);
$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://www.getsurfaced.ai/api/v1/actions/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Workspace-Id", "<x-workspace-id>")
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://www.getsurfaced.ai/api/v1/actions/{id}")
.header("X-Workspace-Id", "<x-workspace-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.getsurfaced.ai/api/v1/actions/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Workspace-Id"] = '<x-workspace-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"description": "<string>",
"status": "new",
"category": "content",
"source": "content_gap",
"version": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"evidence": {
"freshness": "fresh",
"impactLevel": 123,
"priorityScore": 123,
"targetUrl": "<string>",
"gapEntityId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"auditCheckId": "<string>",
"hasEvidence": true,
"briefAccepted": true
},
"evidenceVersion": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": 123,
"evidence": {},
"proposedBrief": {},
"proposedSteps": [
"<string>"
],
"createdAt": "2023-11-07T05:31:56Z"
},
"acceptedBrief": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": 123,
"brief": {},
"acceptedAt": "2023-11-07T05:31:56Z"
},
"checklist": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "<string>",
"position": 123,
"completed": true,
"completedAt": "2023-11-07T05:31:56Z"
}
],
"links": [
{
"kind": "content_run",
"recordId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"url": "<string>"
}
],
"gap": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"promptText": "<string>",
"state": "<string>",
"absenceRate14d": 123,
"answers14d": 123,
"measuredThrough": "<string>"
},
"auditFinding": {
"checkId": "<string>",
"severity": "pass",
"title": "<string>",
"description": "<string>",
"fixCopy": "<string>",
"affectedPages": [
"<string>"
],
"auditedAt": "2023-11-07T05:31:56Z"
}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}Improve
Get an action with its evidence
Returns one action with the evidence behind it. evidenceVersion is the immutable machine proposal (evidence, proposed brief and steps). For content_gap actions gap is the live measurement of the gap; for website_check actions auditFinding is the finding. Both are null when that source is gone, and the stored evidenceVersion is still returned. Use version as expectedVersion on a command to detect concurrent changes.
GET
/
actions
/
{id}
Get an action with its evidence
curl --request GET \
--url https://www.getsurfaced.ai/api/v1/actions/{id} \
--header 'Authorization: Bearer <token>' \
--header 'X-Workspace-Id: <x-workspace-id>'import requests
url = "https://www.getsurfaced.ai/api/v1/actions/{id}"
headers = {
"X-Workspace-Id": "<x-workspace-id>",
"Authorization": "Bearer <token>"
}
response = requests.get(url, headers=headers)
print(response.text)const options = {
method: 'GET',
headers: {'X-Workspace-Id': '<x-workspace-id>', Authorization: 'Bearer <token>'}
};
fetch('https://www.getsurfaced.ai/api/v1/actions/{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://www.getsurfaced.ai/api/v1/actions/{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>",
"X-Workspace-Id: <x-workspace-id>"
],
]);
$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://www.getsurfaced.ai/api/v1/actions/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Workspace-Id", "<x-workspace-id>")
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://www.getsurfaced.ai/api/v1/actions/{id}")
.header("X-Workspace-Id", "<x-workspace-id>")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://www.getsurfaced.ai/api/v1/actions/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Workspace-Id"] = '<x-workspace-id>'
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"projectId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"title": "<string>",
"description": "<string>",
"status": "new",
"category": "content",
"source": "content_gap",
"version": 123,
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z",
"evidence": {
"freshness": "fresh",
"impactLevel": 123,
"priorityScore": 123,
"targetUrl": "<string>",
"gapEntityId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"auditCheckId": "<string>",
"hasEvidence": true,
"briefAccepted": true
},
"evidenceVersion": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": 123,
"evidence": {},
"proposedBrief": {},
"proposedSteps": [
"<string>"
],
"createdAt": "2023-11-07T05:31:56Z"
},
"acceptedBrief": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"version": 123,
"brief": {},
"acceptedAt": "2023-11-07T05:31:56Z"
},
"checklist": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"label": "<string>",
"position": 123,
"completed": true,
"completedAt": "2023-11-07T05:31:56Z"
}
],
"links": [
{
"kind": "content_run",
"recordId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"status": "<string>",
"url": "<string>"
}
],
"gap": {
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"promptText": "<string>",
"state": "<string>",
"absenceRate14d": 123,
"answers14d": 123,
"measuredThrough": "<string>"
},
"auditFinding": {
"checkId": "<string>",
"severity": "pass",
"title": "<string>",
"description": "<string>",
"fixCopy": "<string>",
"affectedPages": [
"<string>"
],
"auditedAt": "2023-11-07T05:31:56Z"
}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}{
"error": {
"code": "UNAUTHORIZED",
"message": "<string>",
"details": {}
}
}Authorizations
API key (sk_live_...) created at https://www.getsurfaced.ai/app/settings/account/api-keys