artifacts

Save a table or chart from an Ask Stuut answer as an artifact

Copies the result and the chart spec or columns from the given message part. The query behind it is not known here and is found later, so saving never refuses for want of it. Saving a part again returns the existing artifact with 200 instead of a duplicate. Returns 404 if the part is not a table or chart in one of the caller's chats, and 409 at the per-user cap. An omitted or blank title falls back to the question that produced the part.

post/v2/artifacts

Request

  • Base URL
    https://api.stuut.ai (the document declares no server; this is the origin it was published from)
  • Auth
    HTTP bearer

Request body

chatIdstring uuid required
messageIdstring uuid required
partOrderinteger required
titlestring nullable

Response

This part was already saved.

idstring uuid required
titlestring required
kind'table' | 'chart' required

What an Ask Stuut artifact renders as.

status'resolving' | 'fresh' | 'refreshing' | 'failed' | 'needs_reask' required

Refresh state of an Ask Stuut artifact.

RESOLVING: just saved; a background job is looking up the SQL behind it, so whether this artifact can ever refresh is not known yet. FRESH: snapshot reflects the last successful run. REFRESHING: a rerun is in flight. FAILED: the last rerun errored for a transient reason; snapshot kept. NEEDS_REASK: no SQL could be found, or the saved SQL no longer runs (e.g. a model was renamed); the snapshot is kept and the user re-asks the question in a new chat. Refresh is offered only for FRESH, FAILED and REFRESHING.

questionstring required
totalRowsinteger nullable required
createdAtstring date-time required
updatedAtstring date-time required
lastRefreshedAtstring date-time nullable required
lastErrorstring nullable required
sourceChatIdstring uuid nullable required
sourceMessageIdstring uuid nullable required
sourcePartOrderinteger nullable required
snapshotobject required

Changes

No recorded changes to this operation across all 1 revision of this API.