Notes API
Batch get note summaries
Returns note summaries for many entities in one round trip. Designed for list/grid pages that show a notes-count column. Entities with zero notes are omitted from the response.
POST
/
v1
/
notes
/
batch-get-summaries
Batch get note summaries
curl --request POST \
--url https://api.linda.cedarai.com/v1/notes/batch-get-summaries \
--header 'Carrier: <carrier>' \
--header 'Content-Type: application/json' \
--header 'x-arms-api-key: <api-key>' \
--header 'x-arms-assume-user: <api-key>' \
--data '
{
"entities": [
{
"entity_id": "<string>",
"entity_type": "<string>"
}
]
}
'import requests
url = "https://api.linda.cedarai.com/v1/notes/batch-get-summaries"
payload = { "entities": [
{
"entity_id": "<string>",
"entity_type": "<string>"
}
] }
headers = {
"Carrier": "<carrier>",
"x-arms-api-key": "<api-key>",
"x-arms-assume-user": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Carrier: '<carrier>',
'x-arms-api-key': '<api-key>',
'x-arms-assume-user': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({entities: [{entity_id: '<string>', entity_type: '<string>'}]})
};
fetch('https://api.linda.cedarai.com/v1/notes/batch-get-summaries', 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.linda.cedarai.com/v1/notes/batch-get-summaries",
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([
'entities' => [
[
'entity_id' => '<string>',
'entity_type' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Carrier: <carrier>",
"Content-Type: application/json",
"x-arms-api-key: <api-key>",
"x-arms-assume-user: <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.linda.cedarai.com/v1/notes/batch-get-summaries"
payload := strings.NewReader("{\n \"entities\": [\n {\n \"entity_id\": \"<string>\",\n \"entity_type\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Carrier", "<carrier>")
req.Header.Add("x-arms-api-key", "<api-key>")
req.Header.Add("x-arms-assume-user", "<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.linda.cedarai.com/v1/notes/batch-get-summaries")
.header("Carrier", "<carrier>")
.header("x-arms-api-key", "<api-key>")
.header("x-arms-assume-user", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"entities\": [\n {\n \"entity_id\": \"<string>\",\n \"entity_type\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.linda.cedarai.com/v1/notes/batch-get-summaries")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Carrier"] = '<carrier>'
request["x-arms-api-key"] = '<api-key>'
request["x-arms-assume-user"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"entities\": [\n {\n \"entity_id\": \"<string>\",\n \"entity_type\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"summaries": [
{
"entity_id": "<string>",
"entity_type": "<string>",
"latest_note": {
"attachments": [
{
"attachment_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"file_name": "<string>",
"media_type": "<string>",
"note_id": "<string>",
"size_bytes": "<string>",
"url": "<string>"
}
],
"content": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_by_name": "<string>",
"created_by_uuid": "<string>",
"entity_id": "<string>",
"entity_type": "<string>",
"note_id": "<string>",
"references": [
{
"display_text": "<string>",
"entity_id": "<string>",
"entity_type": "<string>",
"is_stale": true,
"url": "<string>"
}
],
"updated_at": "2023-11-07T05:31:56Z"
},
"total_count": 123
}
]
}{
"code": 123,
"details": [
{
"@type": "<string>"
}
],
"message": "<string>"
}Headers
Carrier ID the request is scoped to.
Body
application/json
Entities to fetch summaries for. The server groups by entity type internally and runs one SQL query per type. No hard cap on the number of entries, but practical limits apply (page sizes of a few hundred entities per request are typical).
Show child attributes
Show child attributes
Response
A successful response.
One summary per entity that has at least one note. Entities with zero notes are omitted from the response — clients should default missing entries to "0 notes" rather than expecting one row per requested entity.
Show child attributes
Show child attributes
Was this page helpful?
⌘I
Batch get note summaries
curl --request POST \
--url https://api.linda.cedarai.com/v1/notes/batch-get-summaries \
--header 'Carrier: <carrier>' \
--header 'Content-Type: application/json' \
--header 'x-arms-api-key: <api-key>' \
--header 'x-arms-assume-user: <api-key>' \
--data '
{
"entities": [
{
"entity_id": "<string>",
"entity_type": "<string>"
}
]
}
'import requests
url = "https://api.linda.cedarai.com/v1/notes/batch-get-summaries"
payload = { "entities": [
{
"entity_id": "<string>",
"entity_type": "<string>"
}
] }
headers = {
"Carrier": "<carrier>",
"x-arms-api-key": "<api-key>",
"x-arms-assume-user": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {
Carrier: '<carrier>',
'x-arms-api-key': '<api-key>',
'x-arms-assume-user': '<api-key>',
'Content-Type': 'application/json'
},
body: JSON.stringify({entities: [{entity_id: '<string>', entity_type: '<string>'}]})
};
fetch('https://api.linda.cedarai.com/v1/notes/batch-get-summaries', 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.linda.cedarai.com/v1/notes/batch-get-summaries",
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([
'entities' => [
[
'entity_id' => '<string>',
'entity_type' => '<string>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Carrier: <carrier>",
"Content-Type: application/json",
"x-arms-api-key: <api-key>",
"x-arms-assume-user: <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.linda.cedarai.com/v1/notes/batch-get-summaries"
payload := strings.NewReader("{\n \"entities\": [\n {\n \"entity_id\": \"<string>\",\n \"entity_type\": \"<string>\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Carrier", "<carrier>")
req.Header.Add("x-arms-api-key", "<api-key>")
req.Header.Add("x-arms-assume-user", "<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.linda.cedarai.com/v1/notes/batch-get-summaries")
.header("Carrier", "<carrier>")
.header("x-arms-api-key", "<api-key>")
.header("x-arms-assume-user", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"entities\": [\n {\n \"entity_id\": \"<string>\",\n \"entity_type\": \"<string>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.linda.cedarai.com/v1/notes/batch-get-summaries")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Carrier"] = '<carrier>'
request["x-arms-api-key"] = '<api-key>'
request["x-arms-assume-user"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"entities\": [\n {\n \"entity_id\": \"<string>\",\n \"entity_type\": \"<string>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"summaries": [
{
"entity_id": "<string>",
"entity_type": "<string>",
"latest_note": {
"attachments": [
{
"attachment_id": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"file_name": "<string>",
"media_type": "<string>",
"note_id": "<string>",
"size_bytes": "<string>",
"url": "<string>"
}
],
"content": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"created_by_name": "<string>",
"created_by_uuid": "<string>",
"entity_id": "<string>",
"entity_type": "<string>",
"note_id": "<string>",
"references": [
{
"display_text": "<string>",
"entity_id": "<string>",
"entity_type": "<string>",
"is_stale": true,
"url": "<string>"
}
],
"updated_at": "2023-11-07T05:31:56Z"
},
"total_count": 123
}
]
}{
"code": 123,
"details": [
{
"@type": "<string>"
}
],
"message": "<string>"
}