Search AI agent runs
curl --request POST \
--url https://app.hookie.ai/admin/api/projects/{project_id}/search/ai-runs \
--header 'Content-Type: application/json' \
--cookie hookie_session= \
--data '
{
"model": "<string>",
"status": "<string>",
"trigger_id": "<string>",
"since": "<string>",
"limit": 25,
"offset": 0,
"until": "2023-11-07T05:31:56Z"
}
'const options = {
method: 'POST',
headers: {cookie: 'hookie_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: '<string>',
status: '<string>',
trigger_id: '<string>',
since: '<string>',
limit: 25,
offset: 0,
until: '2023-11-07T05:31:56Z'
})
};
fetch('https://app.hookie.ai/admin/api/projects/{project_id}/search/ai-runs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.hookie.ai/admin/api/projects/{project_id}/search/ai-runs"
payload = {
"model": "<string>",
"status": "<string>",
"trigger_id": "<string>",
"since": "<string>",
"limit": 25,
"offset": 0,
"until": "2023-11-07T05:31:56Z"
}
headers = {
"cookie": "hookie_session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"entity": "ai_runs",
"count": 123,
"total": 123,
"limit": 123,
"offset": 123,
"results": [
{
"id": "<string>",
"trigger_id": "<string>",
"event_id": "<string>",
"status": "<string>",
"model": "<string>",
"input_tokens": 123,
"output_tokens": 123,
"error": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z"
}
]
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>",
"scheme": "<string>",
"max_members": 123,
"members": 123,
"customer_id": "<string>",
"customer_name": "<string>",
"account_id": "<string>",
"terms_version": "<string>",
"claim_required": true
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>",
"scheme": "<string>",
"max_members": 123,
"members": 123,
"customer_id": "<string>",
"customer_name": "<string>",
"account_id": "<string>",
"terms_version": "<string>",
"claim_required": true
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>",
"scheme": "<string>",
"max_members": 123,
"members": 123,
"customer_id": "<string>",
"customer_name": "<string>",
"account_id": "<string>",
"terms_version": "<string>",
"claim_required": true
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>",
"scheme": "<string>",
"max_members": 123,
"members": 123,
"customer_id": "<string>",
"customer_name": "<string>",
"account_id": "<string>",
"terms_version": "<string>",
"claim_required": true
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>",
"scheme": "<string>",
"max_members": 123,
"members": 123,
"customer_id": "<string>",
"customer_name": "<string>",
"account_id": "<string>",
"terms_version": "<string>",
"claim_required": true
}Search
Search AI agent runs
Top-level alias: POST /admin/api/search/ai-runs.
POST
/
admin
/
api
/
projects
/
{project_id}
/
search
/
ai-runs
Search AI agent runs
curl --request POST \
--url https://app.hookie.ai/admin/api/projects/{project_id}/search/ai-runs \
--header 'Content-Type: application/json' \
--cookie hookie_session= \
--data '
{
"model": "<string>",
"status": "<string>",
"trigger_id": "<string>",
"since": "<string>",
"limit": 25,
"offset": 0,
"until": "2023-11-07T05:31:56Z"
}
'const options = {
method: 'POST',
headers: {cookie: 'hookie_session=', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: '<string>',
status: '<string>',
trigger_id: '<string>',
since: '<string>',
limit: 25,
offset: 0,
until: '2023-11-07T05:31:56Z'
})
};
fetch('https://app.hookie.ai/admin/api/projects/{project_id}/search/ai-runs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://app.hookie.ai/admin/api/projects/{project_id}/search/ai-runs"
payload = {
"model": "<string>",
"status": "<string>",
"trigger_id": "<string>",
"since": "<string>",
"limit": 25,
"offset": 0,
"until": "2023-11-07T05:31:56Z"
}
headers = {
"cookie": "hookie_session=",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"entity": "ai_runs",
"count": 123,
"total": 123,
"limit": 123,
"offset": 123,
"results": [
{
"id": "<string>",
"trigger_id": "<string>",
"event_id": "<string>",
"status": "<string>",
"model": "<string>",
"input_tokens": 123,
"output_tokens": 123,
"error": "<string>",
"created_at": "2023-11-07T05:31:56Z",
"finished_at": "2023-11-07T05:31:56Z"
}
]
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>",
"scheme": "<string>",
"max_members": 123,
"members": 123,
"customer_id": "<string>",
"customer_name": "<string>",
"account_id": "<string>",
"terms_version": "<string>",
"claim_required": true
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>",
"scheme": "<string>",
"max_members": 123,
"members": 123,
"customer_id": "<string>",
"customer_name": "<string>",
"account_id": "<string>",
"terms_version": "<string>",
"claim_required": true
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>",
"scheme": "<string>",
"max_members": 123,
"members": 123,
"customer_id": "<string>",
"customer_name": "<string>",
"account_id": "<string>",
"terms_version": "<string>",
"claim_required": true
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>",
"scheme": "<string>",
"max_members": 123,
"members": 123,
"customer_id": "<string>",
"customer_name": "<string>",
"account_id": "<string>",
"terms_version": "<string>",
"claim_required": true
}{
"error": "<string>",
"retry_after": 123,
"upgrade_url": "<string>",
"reason": "<string>",
"code": "agent_scope_insufficient",
"required_scope": "hookie:read",
"granted_scopes": [
"<string>"
],
"manage_url": "<string>",
"scheme": "<string>",
"max_members": 123,
"members": 123,
"customer_id": "<string>",
"customer_name": "<string>",
"account_id": "<string>",
"terms_version": "<string>",
"claim_required": true
}Authorizations
sessionbearerAuthapiKey
The console's sealed session cookie, set by WorkOS AuthKit. Mutating requests also require the X-Requested-With CSRF header.
Headers
Makes a POST safe to retry for 24 hours: the same key, credential, path and body returns the stored response (Idempotent-Replayed: true) instead of running again. 422 if the key was used for a different request; 409 while the first is in flight.
Required string length:
1 - 255Path Parameters
Project id (UUID) belonging to the caller workspace.
Body
application/json
All filters optional and ANDed. Reads the agent_runs table.
One status (queued, running, done, failed), or an array of them matched with IN.
ISO timestamp; matches created_at >= since.
Required range:
1 <= x <= 200Required range:
x >= 0Upper bound on created_at (ISO 8601).