Rename an insight, change its description, or choose what a click on its events opens
/insights/{insight_id}- Base URL
https://api.chartnaut.com/v1- Auth
- Bearer key
- Operation ID
updateInsight
To change its numbers, run the study again and POST /insights with the same name. show is what a click on one of its events opens on the chart: card (its numbers), outlook (the study's outlook.js draws the projection) or both. outlook and both need the study to have an outlook, and a horizon no longer than the bars the chart keeps ahead and the bars the study measured after its events; a refusal says which.
Path parameters#
insight_idstringRequiredRequest bodyapplication/json#
namestringdescriptionstringshowstringoutlook_max_barsintegerBars ahead the outlook draws on this insight; 0 goes back to the outlook's maxBars.
outlook_labelstringThe outlook's name on the charts; empty goes back to the outlook's label.
Responses#
200OKapplication/json
The updated insight.
idstringRequirednamestringRequireddescriptionstringRequireddefinitionstringRequiredThe definition slug whose events show the card.
studystringRequiredThe study slug.
study_versionintegerRequiredNullableinstrumentstringRequiredprofilestringRequiredNullableThe definition profile of the run. The card shows on charts using this profile.
Exactly one of {from,to}, last or bars. Warmup is fetched before
the window automatically and never counted in results. Clamped to the
plan's historical depth.
Show fields
fromstring (date-time)tostring (date-time)Defaults to now.
laststringbarsintegerscope_dimensionsarray of stringRequiredpin_cell's indexedBy. Empty for one global card.
is_ownerbooleanRequiredfalse for someone else's shared insight you added in the app (read-only).
authorstringThe username of whoever shared it. Only when is_owner is false.
app_urlstringRequiredOpens the insight's study run in the app. Empty when is_owner is false.
created_atstring (date-time)Requiredupdated_atstring (date-time)Requiredproblemsarray of objectWhat stops this insight working for you: a dependency of its study that is not in your library, or no longer shared with you. Empty when it works.
Show item fields
codestringRequiredkindstringRequirednamestringRequiredaddstringreasonstringactivebooleanRequiredIt shows on your charts of its definition, instrument and timeframe (POST /insights/{insight_id}/activate).
active_statestringNullableOnly when active: live, or paused when the account is over its plan's Forward Insights on charts (after a downgrade).
valid_fromstring (date-time)RequiredNullableThe first moment its numbers know nothing about (the run's end, plus how far the study read past an event, to the next bar). Setups from then on are out of sample. Null when unknown.
headlineobjectRequiredNullableThe one number its label shows, across every setup. Null when it has none, or an older insight's is not worked out yet.
Show fields
valuestringRequiredlabelstringRequiredbasisstringRequired400Bad requestapplication/json
invalid_request.
errorobjectRequiredShow fields
codestringRequiredStable. Branch on this, never on message.
messagestringRequireddetailsobjectdocs_urlstring (uri)request_idstring404Not foundapplication/json
not_found.
errorobjectRequiredShow fields
codestringRequiredStable. Branch on this, never on message.
messagestringRequireddetailsobjectdocs_urlstring (uri)request_idstringErrorAny other statusapplication/json
Error.
errorobjectRequiredShow fields
codestringRequiredStable. Branch on this, never on message.
messagestringRequireddetailsobjectdocs_urlstring (uri)request_idstring