curl --request PUT \
--url https://api.syntage.com/reports/{id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "Credit review",
"insights": [
{
"name": "sales-revenue",
"insight": "sales-revenue",
"visible": true,
"children": "<array>"
}
],
"organizational": false
}
'import requests
url = "https://api.syntage.com/reports/{id}"
payload = {
"name": "Credit review",
"insights": [
{
"name": "sales-revenue",
"insight": "sales-revenue",
"visible": True,
"children": "<array>"
}
],
"organizational": False
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Credit review',
insights: [
{
name: 'sales-revenue',
insight: 'sales-revenue',
visible: true,
children: '<array>'
}
],
organizational: false
})
};
fetch('https://api.syntage.com/reports/{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://api.syntage.com/reports/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Credit review',
'insights' => [
[
'name' => 'sales-revenue',
'insight' => 'sales-revenue',
'visible' => true,
'children' => '<array>'
]
],
'organizational' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.syntage.com/reports/{id}"
payload := strings.NewReader("{\n \"name\": \"Credit review\",\n \"insights\": [\n {\n \"name\": \"sales-revenue\",\n \"insight\": \"sales-revenue\",\n \"visible\": true,\n \"children\": \"<array>\"\n }\n ],\n \"organizational\": false\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.syntage.com/reports/{id}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Credit review\",\n \"insights\": [\n {\n \"name\": \"sales-revenue\",\n \"insight\": \"sales-revenue\",\n \"visible\": true,\n \"children\": \"<array>\"\n }\n ],\n \"organizational\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.syntage.com/reports/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Credit review\",\n \"insights\": [\n {\n \"name\": \"sales-revenue\",\n \"insight\": \"sales-revenue\",\n \"visible\": true,\n \"children\": \"<array>\"\n }\n ],\n \"organizational\": false\n}"
response = http.request(request)
puts response.read_body{
"@context": "/contexts/InsightReport",
"@id": "/reports/91106968-1abd-4d64-85c1-4e73d96fb997",
"@type": "InsightReport",
"id": "91106968-1abd-4d64-85c1-4e73d96fb997",
"name": "Credit review",
"builtIn": false,
"organizational": false,
"insights": [
{
"name": "sales-revenue",
"type": "insight",
"insight": "sales-revenue",
"visible": true,
"children": "<array>",
"builtIn": true
}
],
"createdBy": {
"id": "91106968-1abd-4d64-85c1-4e73d96fb997",
"firstName": "John",
"lastName": "Doe",
"fullName": "John Doe"
},
"createdAt": "2020-01-01T12:15:00.000Z",
"updatedAt": "2020-01-01T12:15:00.000Z"
}{
"message": "<string>"
}{
"@context": "/contexts/Error",
"@type": "hydra:Error",
"hydra:title": "An error occurred",
"hydra:description": "Access Denied."
}{
"message": "<string>"
}{
"@context": "/contexts/Error",
"@type": "hydra:Error",
"hydra:title": "An error occurred",
"hydra:description": "exampleField: Syntage score already exists."
}Update a report
Update a custom report’s name, insight layout, or organizational visibility.
Built-in reports cannot be updated. Personal reports can only be updated by their owner; organizational reports can only be updated by an admin.
curl --request PUT \
--url https://api.syntage.com/reports/{id} \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "Credit review",
"insights": [
{
"name": "sales-revenue",
"insight": "sales-revenue",
"visible": true,
"children": "<array>"
}
],
"organizational": false
}
'import requests
url = "https://api.syntage.com/reports/{id}"
payload = {
"name": "Credit review",
"insights": [
{
"name": "sales-revenue",
"insight": "sales-revenue",
"visible": True,
"children": "<array>"
}
],
"organizational": False
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'Credit review',
insights: [
{
name: 'sales-revenue',
insight: 'sales-revenue',
visible: true,
children: '<array>'
}
],
organizational: false
})
};
fetch('https://api.syntage.com/reports/{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://api.syntage.com/reports/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'Credit review',
'insights' => [
[
'name' => 'sales-revenue',
'insight' => 'sales-revenue',
'visible' => true,
'children' => '<array>'
]
],
'organizational' => false
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.syntage.com/reports/{id}"
payload := strings.NewReader("{\n \"name\": \"Credit review\",\n \"insights\": [\n {\n \"name\": \"sales-revenue\",\n \"insight\": \"sales-revenue\",\n \"visible\": true,\n \"children\": \"<array>\"\n }\n ],\n \"organizational\": false\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.syntage.com/reports/{id}")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"Credit review\",\n \"insights\": [\n {\n \"name\": \"sales-revenue\",\n \"insight\": \"sales-revenue\",\n \"visible\": true,\n \"children\": \"<array>\"\n }\n ],\n \"organizational\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.syntage.com/reports/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"Credit review\",\n \"insights\": [\n {\n \"name\": \"sales-revenue\",\n \"insight\": \"sales-revenue\",\n \"visible\": true,\n \"children\": \"<array>\"\n }\n ],\n \"organizational\": false\n}"
response = http.request(request)
puts response.read_body{
"@context": "/contexts/InsightReport",
"@id": "/reports/91106968-1abd-4d64-85c1-4e73d96fb997",
"@type": "InsightReport",
"id": "91106968-1abd-4d64-85c1-4e73d96fb997",
"name": "Credit review",
"builtIn": false,
"organizational": false,
"insights": [
{
"name": "sales-revenue",
"type": "insight",
"insight": "sales-revenue",
"visible": true,
"children": "<array>",
"builtIn": true
}
],
"createdBy": {
"id": "91106968-1abd-4d64-85c1-4e73d96fb997",
"firstName": "John",
"lastName": "Doe",
"fullName": "John Doe"
},
"createdAt": "2020-01-01T12:15:00.000Z",
"updatedAt": "2020-01-01T12:15:00.000Z"
}{
"message": "<string>"
}{
"@context": "/contexts/Error",
"@type": "hydra:Error",
"hydra:title": "An error occurred",
"hydra:description": "Access Denied."
}{
"message": "<string>"
}{
"@context": "/contexts/Error",
"@type": "hydra:Error",
"hydra:title": "An error occurred",
"hydra:description": "exampleField: Syntage score already exists."
}Authorizations
Your API key is available in the Production and Sandbox dashboards.
Path Parameters
Body
Report name shown in the dashboard's report selector
"Credit review"
Ordered layout of insight entries and groups rendered by the report
Show child attributes
Show child attributes
Share the report with every user in the organization instead of keeping it personal
Response
Report resource response
Report IRI reference
"/reports/91106968-1abd-4d64-85c1-4e73d96fb997"
JSON-LD resource type
Unique report ID
"91106968-1abd-4d64-85c1-4e73d96fb997"
Report name shown in the dashboard's report selector; built-in reports use stable names such as full_report
"Credit review"
Whether the report is managed by Syntage; built-in reports are kept up to date automatically and cannot be modified or deleted
false
Whether the report is shared with every user in the organization; personal reports are only visible to their owner
false
Ordered layout of insight entries and groups rendered by the report
Show child attributes
Show child attributes
Profile of the user who created the report; omitted for built-in reports
Show child attributes
Show child attributes
Date and time the resource was created
"2020-01-01T12:15:00.000Z"
Date and time the resource was last updated
"2020-01-01T12:15:00.000Z"
Was this page helpful?