curl --request GET \
--url https://api.affinity.co/v2/lists/{listId}/saved-views/{viewId}/list-entries \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.affinity.co/v2/lists/{listId}/saved-views/{viewId}/list-entries"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.affinity.co/v2/lists/{listId}/saved-views/{viewId}/list-entries', 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.affinity.co/v2/lists/{listId}/saved-views/{viewId}/list-entries",
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://api.affinity.co/v2/lists/{listId}/saved-views/{viewId}/list-entries"
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://api.affinity.co/v2/lists/{listId}/saved-views/{viewId}/list-entries")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.affinity.co/v2/lists/{listId}/saved-views/{viewId}/list-entries")
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{
"data": [
{
"id": 1,
"type": "company",
"listId": 1,
"createdAt": "2023-01-01T00:00:00Z",
"creatorId": 1,
"entity": {
"id": 1,
"name": "Horizon Technologies",
"domain": "horizontech.com",
"domains": [
"horizontech.com"
],
"isGlobal": true,
"fields": []
}
}
],
"pagination": {
"prevUrl": "https://api.affinity.co/v2/foo?cursor=ICAgICAgYmVmb3JlOjo6Nw",
"nextUrl": "https://api.affinity.co/v2/foo?cursor=ICAgICAgIGFmdGVyOjo6NA"
}
}{
"errors": [
{
"code": "bad-request",
"message": "<string>"
}
]
}{
"errors": [
{
"code": "authorization",
"message": "<string>"
}
]
}{
"errors": [
{
"code": "not-found",
"message": "<string>"
}
]
}{
"errors": [
{
"code": "authentication",
"message": "<string>"
}
]
}Get all List Entries on a Saved View
Paginate through the List Entries (AKA rows) on a given Saved View. Use this endpoint when you need to filter entities or only want some field data to be returned: This endpoint respects the filters set on a Saved View via web app, and only returns field data corresponding to the columns that have been pulled into the Saved View via web app.
Though this endpoint respects the Saved View’s filters and column/Field selection, it does not yet preserve sort order. This endpoint also only supports sheet-type Saved Views, and not board- or dashboard-type Saved Views.
See the Data Model section for more information about Saved Views.
Requires the “Export data from Lists” permission.
curl --request GET \
--url https://api.affinity.co/v2/lists/{listId}/saved-views/{viewId}/list-entries \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.affinity.co/v2/lists/{listId}/saved-views/{viewId}/list-entries"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.affinity.co/v2/lists/{listId}/saved-views/{viewId}/list-entries', 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.affinity.co/v2/lists/{listId}/saved-views/{viewId}/list-entries",
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://api.affinity.co/v2/lists/{listId}/saved-views/{viewId}/list-entries"
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://api.affinity.co/v2/lists/{listId}/saved-views/{viewId}/list-entries")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.affinity.co/v2/lists/{listId}/saved-views/{viewId}/list-entries")
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{
"data": [
{
"id": 1,
"type": "company",
"listId": 1,
"createdAt": "2023-01-01T00:00:00Z",
"creatorId": 1,
"entity": {
"id": 1,
"name": "Horizon Technologies",
"domain": "horizontech.com",
"domains": [
"horizontech.com"
],
"isGlobal": true,
"fields": []
}
}
],
"pagination": {
"prevUrl": "https://api.affinity.co/v2/foo?cursor=ICAgICAgYmVmb3JlOjo6Nw",
"nextUrl": "https://api.affinity.co/v2/foo?cursor=ICAgICAgIGFmdGVyOjo6NA"
}
}{
"errors": [
{
"code": "bad-request",
"message": "<string>"
}
]
}{
"errors": [
{
"code": "authorization",
"message": "<string>"
}
]
}{
"errors": [
{
"code": "not-found",
"message": "<string>"
}
]
}{
"errors": [
{
"code": "authentication",
"message": "<string>"
}
]
}Authorizations
A static Affinity API key, presented as a bearer token.
Path Parameters
List ID
1 <= x <= 9007199254740991Saved view ID
1 <= x <= 9007199254740991Query Parameters
Cursor for the next or previous page
"ICAgICAgYmVmb3JlOjo6Nw"
Number of items to include in the page
1 <= x <= 100100
Response
OK
ListEntryWithEntityPaged model
A page of ListEntryWithEntity results
100- CompanyListEntry
- OpportunityListEntry
- PersonListEntry
Show child attributes
Show child attributes
{
"id": 1,
"type": "company",
"listId": 1,
"createdAt": "2023-01-01T00:00:00Z",
"creatorId": 1,
"entity": {
"id": 1,
"name": "Horizon Technologies",
"domain": "horizontech.com",
"domains": ["horizontech.com"],
"isGlobal": true,
"fields": []
}
}
Show child attributes
Show child attributes
Was this page helpful?