Get Group Saved Views
curl --request GET \
--url https://api.athenahq.ai/api/v1/group-saved-views \
--header 'x-api-key: <api-key>'import requests
url = "https://api.athenahq.ai/api/v1/group-saved-views"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.athenahq.ai/api/v1/group-saved-views', 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.athenahq.ai/api/v1/group-saved-views",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <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"
"net/http"
"io"
)
func main() {
url := "https://api.athenahq.ai/api/v1/group-saved-views"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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.athenahq.ai/api/v1/group-saved-views")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.athenahq.ai/api/v1/group-saved-views")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"group_saved_views": [
{
"id": "<string>",
"name": "<string>",
"icon": "<string>",
"website_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"group_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "<string>",
"filters": {},
"created_at": "2023-11-07T05:31:56Z",
"created_by": {
"id": "<string>",
"email": "jsmith@example.com",
"first_name": "<string>",
"last_name": "<string>",
"display_name": "<string>"
},
"updated_at": "2023-11-07T05:31:56Z"
}
]
}{
"error": "Unauthorized"
}{
"error": "Unauthorized"
}{
"error": "Unauthorized"
}{
"error": "Unauthorized"
}Saved Views
Get Group Saved Views
Returns all group-level saved views (filter presets) for the websites in a group. Group saved views capture filter state shared across the group rather than scoped to a single website.
GET
/
api
/
v1
/
group-saved-views
Get Group Saved Views
curl --request GET \
--url https://api.athenahq.ai/api/v1/group-saved-views \
--header 'x-api-key: <api-key>'import requests
url = "https://api.athenahq.ai/api/v1/group-saved-views"
headers = {"x-api-key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'x-api-key': '<api-key>'}};
fetch('https://api.athenahq.ai/api/v1/group-saved-views', 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.athenahq.ai/api/v1/group-saved-views",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"x-api-key: <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"
"net/http"
"io"
)
func main() {
url := "https://api.athenahq.ai/api/v1/group-saved-views"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("x-api-key", "<api-key>")
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.athenahq.ai/api/v1/group-saved-views")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.athenahq.ai/api/v1/group-saved-views")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["x-api-key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"group_saved_views": [
{
"id": "<string>",
"name": "<string>",
"icon": "<string>",
"website_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"group_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"user_id": "<string>",
"filters": {},
"created_at": "2023-11-07T05:31:56Z",
"created_by": {
"id": "<string>",
"email": "jsmith@example.com",
"first_name": "<string>",
"last_name": "<string>",
"display_name": "<string>"
},
"updated_at": "2023-11-07T05:31:56Z"
}
]
}{
"error": "Unauthorized"
}{
"error": "Unauthorized"
}{
"error": "Unauthorized"
}{
"error": "Unauthorized"
}Query Parameters
ID of the group to retrieve saved views for. Authorization runs against this group's org.
Response
Successful response with list of group saved views
Show child attributes
Show child attributes
Was this page helpful?
⌘I