List select options
curl --request GET \
--url https://api.attio.com/v2/{target}/{identifier}/attributes/{attribute}/options \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.attio.com/v2/{target}/{identifier}/attributes/{attribute}/options"
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/{target}/{identifier}/attributes/{attribute}/options', 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/{target}/{identifier}/attributes/{attribute}/options",
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/{target}/{identifier}/attributes/{attribute}/options"
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/{target}/{identifier}/attributes/{attribute}/options")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.attio.com/v2/{target}/{identifier}/attributes/{attribute}/options")
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",
"attribute_id": "41252299-f8c7-4b5e-99c9-4ff8321d2f96",
"option_id": "08c2c59a-c18e-40c6-8dc4-95415313b2ea"
},
"title": "Medium",
"is_archived": false
}
]
}{
"status_code": 404,
"type": "invalid_request_error",
"code": "not_found",
"message": "Attribute with slug/ID \"my-attribute\" not found."
}Attributes
List select options
Lists all select options for a particular attribute on either an object or a list.
When target is objects, the required scopes are object_configuration:read. When target is lists, the required scopes are list_configuration:read.
GET
/
v2
/
{target}
/
{identifier}
/
attributes
/
{attribute}
/
options
List select options
curl --request GET \
--url https://api.attio.com/v2/{target}/{identifier}/attributes/{attribute}/options \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.attio.com/v2/{target}/{identifier}/attributes/{attribute}/options"
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/{target}/{identifier}/attributes/{attribute}/options', 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/{target}/{identifier}/attributes/{attribute}/options",
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/{target}/{identifier}/attributes/{attribute}/options"
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/{target}/{identifier}/attributes/{attribute}/options")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.attio.com/v2/{target}/{identifier}/attributes/{attribute}/options")
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",
"attribute_id": "41252299-f8c7-4b5e-99c9-4ff8321d2f96",
"option_id": "08c2c59a-c18e-40c6-8dc4-95415313b2ea"
},
"title": "Medium",
"is_archived": false
}
]
}{
"status_code": 404,
"type": "invalid_request_error",
"code": "not_found",
"message": "Attribute with slug/ID \"my-attribute\" not found."
}Authorizations
This API uses OAuth 2.0 with the authorization code grant flow.
Path Parameters
Whether the attribute is on an object or a list.
Available options:
objects, lists Example:
"lists"
A UUID or slug to identify the object or list the select attribute belongs to.
Example:
"33ebdbe9-e529-47c9-b894-0ba25e9c15c0"
A UUID or slug to identify the attribute you want to list select options on.
Example:
"41252299-f8c7-4b5e-99c9-4ff8321d2f96"
Query Parameters
true if you want the results to include archived select options.
Example:
true
Response
Success
Success
Show child attributes
Show child attributes
Was this page helpful?
⌘I