Get Scorecards Summary
curl --request POST \
--url https://api.attention.tech/v2/scorecards/summary \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"scorecardUUID": "sc-uuid-123",
"fromDateTime": "2024-01-01T00:00:00Z",
"toDateTime": "2024-03-31T23:59:59Z",
"teamUUIDs": [
"team-uuid-1",
"team-uuid-2"
],
"userUUIDs": [
"user-uuid-1",
"user-uuid-2"
],
"scorecardsItemsUUIDs": [
"si-uuid-1",
"si-uuid-2"
]
}
'import requests
url = "https://api.attention.tech/v2/scorecards/summary"
payload = {
"scorecardUUID": "sc-uuid-123",
"fromDateTime": "2024-01-01T00:00:00Z",
"toDateTime": "2024-03-31T23:59:59Z",
"teamUUIDs": ["team-uuid-1", "team-uuid-2"],
"userUUIDs": ["user-uuid-1", "user-uuid-2"],
"scorecardsItemsUUIDs": ["si-uuid-1", "si-uuid-2"]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
scorecardUUID: 'sc-uuid-123',
fromDateTime: '2024-01-01T00:00:00Z',
toDateTime: '2024-03-31T23:59:59Z',
teamUUIDs: ['team-uuid-1', 'team-uuid-2'],
userUUIDs: ['user-uuid-1', 'user-uuid-2'],
scorecardsItemsUUIDs: ['si-uuid-1', 'si-uuid-2']
})
};
fetch('https://api.attention.tech/v2/scorecards/summary', 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.attention.tech/v2/scorecards/summary",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'scorecardUUID' => 'sc-uuid-123',
'fromDateTime' => '2024-01-01T00:00:00Z',
'toDateTime' => '2024-03-31T23:59:59Z',
'teamUUIDs' => [
'team-uuid-1',
'team-uuid-2'
],
'userUUIDs' => [
'user-uuid-1',
'user-uuid-2'
],
'scorecardsItemsUUIDs' => [
'si-uuid-1',
'si-uuid-2'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$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.attention.tech/v2/scorecards/summary"
payload := strings.NewReader("{\n \"scorecardUUID\": \"sc-uuid-123\",\n \"fromDateTime\": \"2024-01-01T00:00:00Z\",\n \"toDateTime\": \"2024-03-31T23:59:59Z\",\n \"teamUUIDs\": [\n \"team-uuid-1\",\n \"team-uuid-2\"\n ],\n \"userUUIDs\": [\n \"user-uuid-1\",\n \"user-uuid-2\"\n ],\n \"scorecardsItemsUUIDs\": [\n \"si-uuid-1\",\n \"si-uuid-2\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<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.post("https://api.attention.tech/v2/scorecards/summary")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"scorecardUUID\": \"sc-uuid-123\",\n \"fromDateTime\": \"2024-01-01T00:00:00Z\",\n \"toDateTime\": \"2024-03-31T23:59:59Z\",\n \"teamUUIDs\": [\n \"team-uuid-1\",\n \"team-uuid-2\"\n ],\n \"userUUIDs\": [\n \"user-uuid-1\",\n \"user-uuid-2\"\n ],\n \"scorecardsItemsUUIDs\": [\n \"si-uuid-1\",\n \"si-uuid-2\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.attention.tech/v2/scorecards/summary")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"scorecardUUID\": \"sc-uuid-123\",\n \"fromDateTime\": \"2024-01-01T00:00:00Z\",\n \"toDateTime\": \"2024-03-31T23:59:59Z\",\n \"teamUUIDs\": [\n \"team-uuid-1\",\n \"team-uuid-2\"\n ],\n \"userUUIDs\": [\n \"user-uuid-1\",\n \"user-uuid-2\"\n ],\n \"scorecardsItemsUUIDs\": [\n \"si-uuid-1\",\n \"si-uuid-2\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"userName": "Jane Smith",
"teamName": "Sales Team",
"overallScoreTotals": 85.5,
"metricsCount": 12,
"min": 65,
"max": 98,
"itemAverageTotals": [
{
"scorecardItemUUID": "si-uuid-1",
"title": "Discovery Quality",
"average": 88
}
],
"metrics": []
}
]
}{
"id": "not_found_error",
"status": "404",
"code": "404",
"title": "Not Found Error",
"detail": "The requested resource was not found",
"source": {
"pointer": "/data/attributes/id"
}
}{
"id": "not_found_error",
"status": "404",
"code": "404",
"title": "Not Found Error",
"detail": "The requested resource was not found",
"source": {
"pointer": "/data/attributes/id"
}
}{
"id": "not_found_error",
"status": "404",
"code": "404",
"title": "Not Found Error",
"detail": "The requested resource was not found",
"source": {
"pointer": "/data/attributes/id"
}
}Scorecard
Get Scorecards Summary
Retrieves detailed usage statistics for specified users or teams within a given time period.
POST
/
scorecards
/
summary
Get Scorecards Summary
curl --request POST \
--url https://api.attention.tech/v2/scorecards/summary \
--header 'Authorization: <api-key>' \
--header 'Content-Type: application/json' \
--data '
{
"scorecardUUID": "sc-uuid-123",
"fromDateTime": "2024-01-01T00:00:00Z",
"toDateTime": "2024-03-31T23:59:59Z",
"teamUUIDs": [
"team-uuid-1",
"team-uuid-2"
],
"userUUIDs": [
"user-uuid-1",
"user-uuid-2"
],
"scorecardsItemsUUIDs": [
"si-uuid-1",
"si-uuid-2"
]
}
'import requests
url = "https://api.attention.tech/v2/scorecards/summary"
payload = {
"scorecardUUID": "sc-uuid-123",
"fromDateTime": "2024-01-01T00:00:00Z",
"toDateTime": "2024-03-31T23:59:59Z",
"teamUUIDs": ["team-uuid-1", "team-uuid-2"],
"userUUIDs": ["user-uuid-1", "user-uuid-2"],
"scorecardsItemsUUIDs": ["si-uuid-1", "si-uuid-2"]
}
headers = {
"Authorization": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
scorecardUUID: 'sc-uuid-123',
fromDateTime: '2024-01-01T00:00:00Z',
toDateTime: '2024-03-31T23:59:59Z',
teamUUIDs: ['team-uuid-1', 'team-uuid-2'],
userUUIDs: ['user-uuid-1', 'user-uuid-2'],
scorecardsItemsUUIDs: ['si-uuid-1', 'si-uuid-2']
})
};
fetch('https://api.attention.tech/v2/scorecards/summary', 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.attention.tech/v2/scorecards/summary",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'scorecardUUID' => 'sc-uuid-123',
'fromDateTime' => '2024-01-01T00:00:00Z',
'toDateTime' => '2024-03-31T23:59:59Z',
'teamUUIDs' => [
'team-uuid-1',
'team-uuid-2'
],
'userUUIDs' => [
'user-uuid-1',
'user-uuid-2'
],
'scorecardsItemsUUIDs' => [
'si-uuid-1',
'si-uuid-2'
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: application/json"
],
]);
$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.attention.tech/v2/scorecards/summary"
payload := strings.NewReader("{\n \"scorecardUUID\": \"sc-uuid-123\",\n \"fromDateTime\": \"2024-01-01T00:00:00Z\",\n \"toDateTime\": \"2024-03-31T23:59:59Z\",\n \"teamUUIDs\": [\n \"team-uuid-1\",\n \"team-uuid-2\"\n ],\n \"userUUIDs\": [\n \"user-uuid-1\",\n \"user-uuid-2\"\n ],\n \"scorecardsItemsUUIDs\": [\n \"si-uuid-1\",\n \"si-uuid-2\"\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<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.post("https://api.attention.tech/v2/scorecards/summary")
.header("Authorization", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"scorecardUUID\": \"sc-uuid-123\",\n \"fromDateTime\": \"2024-01-01T00:00:00Z\",\n \"toDateTime\": \"2024-03-31T23:59:59Z\",\n \"teamUUIDs\": [\n \"team-uuid-1\",\n \"team-uuid-2\"\n ],\n \"userUUIDs\": [\n \"user-uuid-1\",\n \"user-uuid-2\"\n ],\n \"scorecardsItemsUUIDs\": [\n \"si-uuid-1\",\n \"si-uuid-2\"\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.attention.tech/v2/scorecards/summary")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"scorecardUUID\": \"sc-uuid-123\",\n \"fromDateTime\": \"2024-01-01T00:00:00Z\",\n \"toDateTime\": \"2024-03-31T23:59:59Z\",\n \"teamUUIDs\": [\n \"team-uuid-1\",\n \"team-uuid-2\"\n ],\n \"userUUIDs\": [\n \"user-uuid-1\",\n \"user-uuid-2\"\n ],\n \"scorecardsItemsUUIDs\": [\n \"si-uuid-1\",\n \"si-uuid-2\"\n ]\n}"
response = http.request(request)
puts response.read_body{
"data": [
{
"userName": "Jane Smith",
"teamName": "Sales Team",
"overallScoreTotals": 85.5,
"metricsCount": 12,
"min": 65,
"max": 98,
"itemAverageTotals": [
{
"scorecardItemUUID": "si-uuid-1",
"title": "Discovery Quality",
"average": 88
}
],
"metrics": []
}
]
}{
"id": "not_found_error",
"status": "404",
"code": "404",
"title": "Not Found Error",
"detail": "The requested resource was not found",
"source": {
"pointer": "/data/attributes/id"
}
}{
"id": "not_found_error",
"status": "404",
"code": "404",
"title": "Not Found Error",
"detail": "The requested resource was not found",
"source": {
"pointer": "/data/attributes/id"
}
}{
"id": "not_found_error",
"status": "404",
"code": "404",
"title": "Not Found Error",
"detail": "The requested resource was not found",
"source": {
"pointer": "/data/attributes/id"
}
}Body
application/jsonapplication/vnd.api+json
Request containing the content to be analyzed and analysis parameters
Was this page helpful?