Skip to main content
POST
/
v1
/
agents
/
{agentId}
/
refresh-metrics
On-demand metrics refresh for an agent
curl --request POST \
  --url https://{host}/v2/workspaces/slug:agent-factory/webhooks/v1/agents/{agentId}/refresh-metrics \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "period_start": "<string>",
  "period_end": "<string>",
  "granularity": "5m"
}
'
{
  "status": "refreshed",
  "agent_id": "<string>",
  "granularity": "5m",
  "period_start": "<string>",
  "period_end": "<string>",
  "entries_written": 123,
  "error": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.prisme.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

User session JWT or instance API key (iak_*). Send as Authorization: Bearer <token>.

Path Parameters

agentId
string
required
Maximum string length: 64

Query Parameters

hours_back
string

Legacy fallback - number of hours back from now (max 168).

Body

application/json
period_start
string

ISO timestamp - start of the refresh window.

period_end
string

ISO timestamp - end of the refresh window (exclusive).

granularity
enum<string>

Aggregation granularity. Default hourly.

Available options:
5m,
hourly,
daily

Response

Refresh result.

status
string
Example:

"refreshed"

agent_id
string
granularity
enum<string>
Available options:
5m,
hourly,
daily
period_start
string
period_end
string
entries_written
integer
error
string

Set if a partial failure occurred during aggregation.