curl --request GET \
--url https://api.athenahq.ai/api/v1/activity \
--header 'x-api-key: <api-key>'import requests
url = "https://api.athenahq.ai/api/v1/activity"
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/activity', 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/activity",
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/activity"
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/activity")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.athenahq.ai/api/v1/activity")
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_bodyList Activity
Returns the changes made to prompts, topics and prompt tags across your organization, newest first by default. Each entry names the website, the entity type, the kind of change (created, updated, deleted, restored, paused, unpaused), the affected entity ids and who made the change. Use it to find out what happened without re-listing every website.
entity_ids is null when the affected set is not known (for example a bulk import); re-list that website’s prompts with GET /api/v1/prompts. A topic or prompt_tag entry means the topic_name or tags of that website’s prompts may have changed, so re-list the website in that case too. Changes made with an API key carry the key’s id and name in actor, so you can skip your own writes. User emails are never returned. Websites provisioned through POST /api/v1/websites/provision do not appear here; list a website once after provisioning it.
To mirror data, pin a window per sync run: set since to the previous run’s until, set until to now minus one minute, pass order=asc, walk page_num until pagination.has_more is false, then store that until for the next run. since is exclusive and until inclusive, so consecutive windows neither overlap nor skip. With no since the walk covers the whole history, so order=asc with no bounds is a full export. Pagination uses page_size + 1 lookahead: there is no total-count field.
Requires a partner API key. Keys scoped to specific websites see only those websites.
curl --request GET \
--url https://api.athenahq.ai/api/v1/activity \
--header 'x-api-key: <api-key>'import requests
url = "https://api.athenahq.ai/api/v1/activity"
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/activity', 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/activity",
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/activity"
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/activity")
.header("x-api-key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.athenahq.ai/api/v1/activity")
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_bodyQuery Parameters
ISO 8601 timestamp. Only changes strictly after this instant. Omit to start from the beginning of the organization's history.
ISO 8601 timestamp. Only changes up to and including this instant. Pin it per sync run so pages cannot shift while you page.
desc (default) lists the newest changes first. Use asc to export or sync in the order the changes happened.
desc, asc Restrict to one website. Omit for the whole organization. A website outside your key's scope, or outside your organization, returns 403.
Comma-separated list of entity types to include. Omit for all.
prompt, topic, prompt_tag Comma-separated list of change types to include. Omit for all.
created, updated, deleted, restored, paused, unpaused Zero-indexed page number.
x >= 0Number of entries per page (1-100).
1 <= x <= 100Response
Successful response with the page of changes.
Was this page helpful?