Inspect an aggregate (state + event history)
Returns the registry row, live Durable Object state, and R2 event history for a single aggregate. type accepts the canonical aggregate type (e.g. LockAggregate) or its friendly slug (e.g. lock). Requires dual admin auth (X-Admin-API-Key + JWT with an allowed email domain).
curl -X GET "https://api.spkey.co/admin/aggregates/example_string/example_string?limit=42" \
-H "Content-Type: application/json" \
-H "X-API-Key: YOUR_API_KEY" \
-H "Authorization: Bearer YOUR_API_TOKEN"
import requests
import json
url = "https://api.spkey.co/admin/aggregates/example_string/example_string?limit=42"
headers = {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY",
"Authorization": "Bearer YOUR_API_TOKEN"
}
response = requests.get(url, headers=headers)
print(response.json())
const response = await fetch("https://api.spkey.co/admin/aggregates/example_string/example_string?limit=42", {
method: "GET",
headers: {
"Content-Type": "application/json",
"X-API-Key": "YOUR_API_KEY",
"Authorization": "Bearer YOUR_API_TOKEN"
}
});
const data = await response.json();
console.log(data);
package main
import (
"fmt"
"net/http"
)
func main() {
req, err := http.NewRequest("GET", "https://api.spkey.co/admin/aggregates/example_string/example_string?limit=42", nil)
if err != nil {
panic(err)
}
req.Header.Set("Content-Type", "application/json")
req.Header.Set("X-API-Key", "YOUR_API_KEY")
req.Header.Set("Authorization", "Bearer YOUR_API_TOKEN")
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
fmt.Println("Response Status:", resp.Status)
}
require 'net/http'
require 'json'
uri = URI('https://api.spkey.co/admin/aggregates/example_string/example_string?limit=42')
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Get.new(uri)
request['Content-Type'] = 'application/json'
request['X-API-Key'] = 'YOUR_API_KEY'
request['Authorization'] = 'Bearer YOUR_API_TOKEN'
response = http.request(request)
puts response.body
{
"aggregateType": "example_string",
"aggregateId": "example_string",
"doId": "null",
"registry": "null",
"stateFound": true,
"state": "null",
"events": [
{
"version": 3.14,
"type": "example_string",
"timestamp": "example_string",
"orgId": "example_string",
"event": "null"
}
],
"eventCount": 3.14,
"eventsTruncated": true
}
{
"error": "Bad Request",
"message": "The request contains invalid parameters or malformed data",
"code": 400,
"details": [
{
"field": "email",
"message": "Invalid email format"
}
]
}
{
"error": "Unauthorized",
"message": "Authentication required. Please provide a valid API token",
"code": 401
}
{
"error": "Forbidden",
"message": "You don't have permission to access this resource",
"code": 403
}
GET
/admin/aggregates/{type}/{id}GET
Base URLstring
Target server for requests. Edit to use your own host.
⚠️Authentication configuration error - security schemes not found
path
typestring
RequiredAggregate type or slug, e.g. "lock" or "LockAggregate"
path
idstring
RequiredAggregate id (== state.id used for DO routing)
query
limitinteger
Max events to return (default 200).
Min: 1 • Max: 500
Request Preview
Response
Response will appear here after sending the request
Path Parameters
typestring
RequiredAggregate type or slug, e.g. "lock" or "LockAggregate"
idstring
RequiredAggregate id (== state.id used for DO routing)
Query Parameters
limitinteger
Max events to return (default 200).
Responses
aggregateTypestring
RequiredaggregateIdstring
RequireddoIdstring,null
Requiredregistryobject,null
RequiredstateFoundboolean
Requiredstatestring
eventsarray
RequiredeventCountnumber
RequiredeventsTruncatedboolean
RequiredWas this page helpful?