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_body{
"activity": [
{
"id": "6f1c2a3e-5b7d-4e8f-9a0b-1c2d3e4f5a6b",
"occurred_at": "2026-09-20T08:14:03.512Z",
"website_id": "3b9d1e2f-4a5b-4c6d-8e7f-9a0b1c2d3e4f",
"entity_type": "prompt",
"change_type": "created",
"entity_ids": [
"a1f0b2c3-d4e5-4f60-8172-839405a6b7c8"
],
"actor": {
"type": "user",
"api_key_id": null,
"api_key_name": null,
"user": {
"id": "5e7a0000-0000-4000-8000-000000000001",
"email": "ada@example.com"
}
}
},
{
"id": "7a44b5c6-d7e8-4f90-a1b2-c3d4e5f6a7b8",
"occurred_at": "2026-09-20T08:15:41.007Z",
"website_id": "3b9d1e2f-4a5b-4c6d-8e7f-9a0b1c2d3e4f",
"entity_type": "prompt",
"change_type": "deleted",
"entity_ids": [
"c2d1e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f",
"c2d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f"
],
"actor": {
"type": "user",
"api_key_id": null,
"api_key_name": null,
"user": {
"id": "5e7a0000-0000-4000-8000-000000000001",
"email": "ada@example.com"
}
}
},
{
"id": "8b90c1d2-e3f4-4a5b-9c6d-7e8f9a0b1c2d",
"occurred_at": "2026-09-20T09:02:10.220Z",
"website_id": "9e07f1a2-b3c4-4d5e-8f60-718293a4b5c6",
"entity_type": "topic",
"change_type": "updated",
"entity_ids": [
"d5510000-0000-4000-8000-000000000001"
],
"actor": {
"type": "user",
"api_key_id": null,
"api_key_name": null,
"user": {
"id": "5e7a0000-0000-4000-8000-000000000001",
"email": "ada@example.com"
}
}
},
{
"id": "9c12d3e4-f5a6-4b7c-8d9e-0f1a2b3c4d5e",
"occurred_at": "2026-09-20T11:30:00.918Z",
"website_id": "9e07f1a2-b3c4-4d5e-8f60-718293a4b5c6",
"entity_type": "prompt",
"change_type": "updated",
"entity_ids": null,
"actor": {
"type": "api_key",
"api_key_id": "a8f20000-0000-4000-8000-000000000002",
"api_key_name": "Production integration",
"user": null
}
}
],
"pagination": {
"page_num": 0,
"page_size": 100,
"has_more": true
}
}Listar actividad
Devuelve cambios en consultas, temas y etiquetas de toda tu organización, del más reciente al más antiguo por defecto. Cada entrada identifica sitio web, tipo de entidad y cambio (created, updated, deleted, restored, paused, unpaused), ID afectados y autor. Permite saber qué ha ocurrido sin volver a listar cada sitio.
entity_ids es null si se desconoce el conjunto afectado (p. ej., importación masiva); vuelve a listar las consultas con GET /api/v1/prompts. Una entrada topic o prompt_tag implica que quizá cambiaron topic_name o tags; vuelve a listar también en ese caso. Los cambios por API incluyen ID y nombre de la clave en actor para omitir escrituras propias. Los de la aplicación incluyen ID y correo en actor.user. Las claves limitadas a sitios solo ven identidades de sus miembros; los demás aparecen con user: null. Los sitios aprovisionados por POST /api/v1/websites/provision no aparecen aquí: lístalos una vez después de crearlos.
Para replicar datos, fija una ventana por sincronización: since igual al until anterior, until al momento actual menos un minuto y order=asc. Recorre page_num hasta que pagination.has_more sea false y guarda ese until. since es exclusivo y until inclusivo, sin solapamientos ni saltos. Sin since, recorre todo el historial; order=asc sin límites es una exportación completa. Usa consulta anticipada de page_size + 1, sin total.
Requiere una clave de API de socio. Las limitadas a sitios solo ven esos sitios.
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_body{
"activity": [
{
"id": "6f1c2a3e-5b7d-4e8f-9a0b-1c2d3e4f5a6b",
"occurred_at": "2026-09-20T08:14:03.512Z",
"website_id": "3b9d1e2f-4a5b-4c6d-8e7f-9a0b1c2d3e4f",
"entity_type": "prompt",
"change_type": "created",
"entity_ids": [
"a1f0b2c3-d4e5-4f60-8172-839405a6b7c8"
],
"actor": {
"type": "user",
"api_key_id": null,
"api_key_name": null,
"user": {
"id": "5e7a0000-0000-4000-8000-000000000001",
"email": "ada@example.com"
}
}
},
{
"id": "7a44b5c6-d7e8-4f90-a1b2-c3d4e5f6a7b8",
"occurred_at": "2026-09-20T08:15:41.007Z",
"website_id": "3b9d1e2f-4a5b-4c6d-8e7f-9a0b1c2d3e4f",
"entity_type": "prompt",
"change_type": "deleted",
"entity_ids": [
"c2d1e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f",
"c2d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f"
],
"actor": {
"type": "user",
"api_key_id": null,
"api_key_name": null,
"user": {
"id": "5e7a0000-0000-4000-8000-000000000001",
"email": "ada@example.com"
}
}
},
{
"id": "8b90c1d2-e3f4-4a5b-9c6d-7e8f9a0b1c2d",
"occurred_at": "2026-09-20T09:02:10.220Z",
"website_id": "9e07f1a2-b3c4-4d5e-8f60-718293a4b5c6",
"entity_type": "topic",
"change_type": "updated",
"entity_ids": [
"d5510000-0000-4000-8000-000000000001"
],
"actor": {
"type": "user",
"api_key_id": null,
"api_key_name": null,
"user": {
"id": "5e7a0000-0000-4000-8000-000000000001",
"email": "ada@example.com"
}
}
},
{
"id": "9c12d3e4-f5a6-4b7c-8d9e-0f1a2b3c4d5e",
"occurred_at": "2026-09-20T11:30:00.918Z",
"website_id": "9e07f1a2-b3c4-4d5e-8f60-718293a4b5c6",
"entity_type": "prompt",
"change_type": "updated",
"entity_ids": null,
"actor": {
"type": "api_key",
"api_key_id": "a8f20000-0000-4000-8000-000000000002",
"api_key_name": "Production integration",
"user": null
}
}
],
"pagination": {
"page_num": 0,
"page_size": 100,
"has_more": true
}
}Parámetros de consulta
Marca de tiempo ISO 8601. Solo cambios estrictamente posteriores a este instante. Omítela para empezar desde el principio del historial de la organización.
Marca de tiempo ISO 8601. Solo cambios hasta este instante, incluido. Fíjala en cada ejecución de sincronización para que las páginas no cambien durante la paginación.
desc (predeterminado) muestra primero los cambios más recientes. Usa asc para exportar o sincronizar en el orden en que se han producido.
desc, asc Limita los resultados a un sitio web. Omítelo para incluir toda la organización. Un sitio fuera del alcance o de la organización de tu clave devuelve 403.
Lista de tipos de entidad que se incluirán, separados por comas. Omítela para incluirlos todos.
prompt, topic, prompt_tag Lista de tipos de cambio que se incluirán, separados por comas. Omítela para incluirlos todos.
created, updated, deleted, restored, paused, unpaused Número de página, empezando en cero.
x >= 0Número de entradas por página (1-100).
1 <= x <= 100Respuesta
Respuesta correcta con la página de cambios.
¿Esta página le ayudó?