Get an object view
curl --request GET \
--url https://api.attio.com/v2/objects/{object}/views/{view_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.attio.com/v2/objects/{object}/views/{view_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.attio.com/v2/objects/{object}/views/{view_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.attio.com/v2/objects/{object}/views/{view_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>"
],
]);
$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.attio.com/v2/objects/{object}/views/{view_id}"
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.attio.com/v2/objects/{object}/views/{view_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.attio.com/v2/objects/{object}/views/{view_id}")
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": {
"workspace_id": "14beef7a-99f7-4534-a87e-70b564330a4c",
"object_id": "97052eb9-e65e-443f-a297-f2d9a4a7f795",
"view_id": "cf7aaeb5-7507-4a84-9c26-9d36e34d7b70"
},
"title": "All people",
"created_at": "2022-11-21T13:22:49.061281000Z",
"type": "table",
"sorts": [
{
"attribute": "name",
"field": "last_name",
"direction": "asc"
}
],
"attributes": [
{
"attribute": "name",
"field": "first_name"
}
],
"metadata": {
"41252299-f8c7-4b5e-99c9-4ff8321d2f96": {
"kind": "attribute",
"title": "Name",
"api_slug": "name"
}
},
"filter": {
"attribute": "name",
"op": "contains",
"value": "Ada"
},
"kanban": {
"status_attribute": [
"company",
{
"object": "companies",
"attribute": "name"
}
],
"show_no_status_column": true,
"attribute_label_display": "icon",
"aggregation": {
"attribute": "deal_value",
"type": "sum"
}
}
}
}{
"status_code": 404,
"type": "invalid_request_error",
"code": "not_found",
"message": "The referenced view was not found."
}{
"status_code": 422,
"type": "invalid_request_error",
"code": "view_not_encodable",
"message": "The filter of this view cannot be expressed in the view format of the API.",
"view_part": "filter",
"reason": "PARAMETER_VALUE",
"stored_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}Views
Get an object view
Gets a view of an object with its filter, sorts, shown attributes and kanban settings. Attributes, objects, options, statuses and teams are referenced by ID; metadata has their titles and slugs.
This endpoint is in alpha and may be subject to breaking changes as we gather feedback.
Required scopes: view:read, object_configuration:read.
Supported token levels: workspace, user.
GET
/
v2
/
objects
/
{object}
/
views
/
{view_id}
Get an object view
curl --request GET \
--url https://api.attio.com/v2/objects/{object}/views/{view_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.attio.com/v2/objects/{object}/views/{view_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.attio.com/v2/objects/{object}/views/{view_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.attio.com/v2/objects/{object}/views/{view_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>"
],
]);
$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.attio.com/v2/objects/{object}/views/{view_id}"
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.attio.com/v2/objects/{object}/views/{view_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.attio.com/v2/objects/{object}/views/{view_id}")
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": {
"workspace_id": "14beef7a-99f7-4534-a87e-70b564330a4c",
"object_id": "97052eb9-e65e-443f-a297-f2d9a4a7f795",
"view_id": "cf7aaeb5-7507-4a84-9c26-9d36e34d7b70"
},
"title": "All people",
"created_at": "2022-11-21T13:22:49.061281000Z",
"type": "table",
"sorts": [
{
"attribute": "name",
"field": "last_name",
"direction": "asc"
}
],
"attributes": [
{
"attribute": "name",
"field": "first_name"
}
],
"metadata": {
"41252299-f8c7-4b5e-99c9-4ff8321d2f96": {
"kind": "attribute",
"title": "Name",
"api_slug": "name"
}
},
"filter": {
"attribute": "name",
"op": "contains",
"value": "Ada"
},
"kanban": {
"status_attribute": [
"company",
{
"object": "companies",
"attribute": "name"
}
],
"show_no_status_column": true,
"attribute_label_display": "icon",
"aggregation": {
"attribute": "deal_value",
"type": "sum"
}
}
}
}{
"status_code": 404,
"type": "invalid_request_error",
"code": "not_found",
"message": "The referenced view was not found."
}{
"status_code": 422,
"type": "invalid_request_error",
"code": "view_not_encodable",
"message": "The filter of this view cannot be expressed in the view format of the API.",
"view_part": "filter",
"reason": "PARAMETER_VALUE",
"stored_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}Authorizations
Scopes
Path Parameters
Was this page helpful?