AnalysisCache

Trigger a stats refresh for a cache scope

Enqueues an AI_ANALYSIS_CACHE_REFRESH task for the given scope; the queue-consumer worker recomputes stats and regenerates the LLM narrative asynchronously. Requires the ai_analysis write scope. Because it triggers a downstream LLM call, the workspace must have generative_ai enabled and not excluded; otherwise the endpoint returns 403. Supports test scope (scope_key = test invariant id) and workspace scope (scope_key = *:*); other scope types, and any other workspace scope_key, return 400.

post/workspaces/{workspace_id}/analysisCache/refresh

Request

  • Base URL: https://api.mabl.com
  • URL: https://api.mabl.com/workspaces/{workspace_id}/analysisCache/refresh
  • Auth: one of:
    • HTTP basic
    • API key in header Authorization

Path parameters

workspace_idstring required

ID of the workspace

Request body

scope_type'test' | 'plan' | 'workspace' required

Cache scope level

scope_keystring required

Scope identifier. For test scope, the test invariant id with the -j suffix (e.g. abc123-j). For workspace scope, the composite {app_id or '*'}:{env_id or '*'} — v1 accepts *:* only.

initiating_request_idstring

Optional idempotency key. The dataflow trigger generates a UUID per debounced refresh and sends it here; a Beam retry of the HTTP step replays the same key. Server-side dedup on this key is a follow-up; today the field is accepted by the contract but not yet acted on.

Response

Refresh task accepted and enqueued for asynchronous processing.

Changes

No recorded changes to this operation across all 37 revisions of this API.