Skip to main content

Nova API — /api/saved-queries

The operations Nova tags public under /api/saved-queries. Generated from reference-src/nova-openapi.json.

GET /api/saved-queries​

Operation id saved_queries_list: in Python client.call("saved_queries_list", …), on the command line stardelt api saved_queries_list.

GET /api/saved-queries — the caller's own, newest first.

The caller's own saved queries, most recently changed first. Times are epoch milliseconds.

Responses

CodeDescription
200The caller's saved queries
401Not signed in
503The state store is not configured

POST /api/saved-queries​

Operation id saved_queries_create: in Python client.call("saved_queries_create", …), on the command line stardelt api saved_queries_create.

POST /api/saved-queries — 201 with the stored row.

Save a query for the caller. The title is at most 200 characters and the SQL at most 100 000.

Request body

FieldTypeRequiredDefaultDescriptionConstraints
sqlstringYes
titlestringYes
warehousestringNoThe warehouse the query was written for; free text, may be empty.

Responses

CodeDescription
201The stored row
400The title or the SQL is empty or too long
401Not signed in
503The state store is not configured

DELETE /api/saved-queries/{id}​

Operation id saved_queries_remove: in Python client.call("saved_queries_remove", …), on the command line stardelt api saved_queries_remove.

DELETE /api/saved-queries/{id} — 204; 404 when the id is not the caller's.

Delete one of the caller's saved queries.

Parameters

NameInTypeRequiredDescription
idpathintegerYesThe saved query's id

Responses

CodeDescription
204Deleted
401Not signed in
404No such saved query, or it is not the caller's
503The state store is not configured

POST /api/saved-queries/{id}/share​

Operation id saved_queries_share: in Python client.call("saved_queries_share", …), on the command line stardelt api saved_queries_share.

POST /api/saved-queries/{id}/share — 204, whether the share is new, a repeat or the id is not the caller's.

Share one of the caller's saved queries with a group. Members of the group see it in the list.

Parameters

NameInTypeRequiredDescription
idpathintegerYesThe saved query's id

Request body

FieldTypeRequiredDefaultDescriptionConstraints
groupstringYes

Responses

CodeDescription
204Shared, already shared, or not the caller's
400The group name is not valid
401Not signed in
404The id is not a number
503The state store is not configured

DELETE /api/saved-queries/{id}/share/{group}​

Operation id saved_queries_unshare: in Python client.call("saved_queries_unshare", …), on the command line stardelt api saved_queries_unshare.

DELETE /api/saved-queries/{id}/share/{group} — 204 when a share was removed; 404 when there was none, or the query is not the caller's.

Stop sharing one of the caller's saved queries with a group.

Parameters

NameInTypeRequiredDescription
grouppathstringYesThe group name
idpathintegerYesThe saved query's id

Responses

CodeDescription
204The share is gone
401Not signed in
404No such share, or the query is not the caller's
503The state store is not configured