Force-recompute a materialised view's cache now, ignoring its TTL
POST
/api/v1/admin/kg/views/{name}/refresh
const url = 'http://localhost:11044/api/v1/admin/kg/views/example/refresh';const options = {method: 'POST', headers: {'X-Embabel-Api-Key': '<X-Embabel-Api-Key>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url http://localhost:11044/api/v1/admin/kg/views/example/refresh \ --header 'X-Embabel-Api-Key: <X-Embabel-Api-Key>'Authorizations
Section titled “Authorizations”Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”name
required
string
The view’s name, as GET /views lists it.
Query Parameters
Section titled “Query Parameters”username
string
Optional, and never needed: the call always acts as the signed-in principal. Naming the principal changes nothing; naming anyone else is refused with 403.
Responses
Section titled “Responses”Whether anything was recomputed
Media typeapplication/json
Whether a materialised view’s cache was recomputed.
object
name
required
The view’s name, as given in the path.
string
refreshed
required
False for a regular or unknown view — nothing was recomputed.
boolean
Example generated
{ "name": "example", "refreshed": true}No authenticated principal
Media typeapplication/json
A refusal carrying only a human-readable reason.
object
error
required
What went wrong, in the terms the caller can act on.
string
Example generated
{ "error": "example"}username names someone other than the signed-in principal
Media typeapplication/json
A refusal carrying only a human-readable reason.
object
error
required
What went wrong, in the terms the caller can act on.
string
Example generated
{ "error": "example"}
