Query History

Record a query history entry

Records a query the caller ran. A run with the same source and query_key as an existing entry of the caller merges into it: the run count goes up and the latest run time, context and status replace the old ones. Stores nothing and answers 204 when ZO_QUERY_HISTORY_ENABLED is false.

post/api/{org_id}/query_history

Request

Path parameters

org_idstring required

Organization name

Request body

contextunknown required
querystring required

The query text, at most 16 KB and not blank.

query_keystring nullable

Runs with the same source and key merge into one entry; defaults to the query text.

sourcestring nullable

logs, traces, metrics, dbm or profiles; defaults to metrics.

statusstring nullable

ok or error; defaults to ok.

streamsstring[]

Streams the query ran on, at most 50; each name non-empty and without a comma.

Response

Success

contextunknown required
created_atinteger required

First run, in microseconds since the epoch; the last run on entries recorded by v1.1.x.

idstring required

Entry id.

querystring required

The query text.

query_keystring nullable

Hex sha256 of the merge key; null on entries recorded before keys existed.

run_countinteger required

How many runs merged into this entry; 1 on entries recorded by v1.1.x.

sourcestring required

Page the query ran on.

starredboolean required

Starred entries are kept until deleted.

statusstring required

ok or error, from the latest run; ok on entries recorded by v1.1.x.

streamsstring[] required

Streams the query ran on.

updated_atinteger required

Latest run, in microseconds since the epoch.

Changes

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