Saved searches
A search pipeline is sent with every request. To share a search, bookmark it or reuse it from different clients, store the pipeline in a saved search: an ordinary element of the type SavedSearch which is run with .
A saved search runs as the person who runs it, with their permissions and their access filter, never the ones of the author. Who may run it is decided by its own access type, HAS_EXECUTE_ACCESS, which is independent of who may read it.
Creating a saved search
The pipeline is stored in the property query: an object with the list of steps, which are the same as the ones of a normal search request, and optional default parameters. Every other property is free user data, e.g. a name.
{ "type": "SavedSearch", "data": { "name": "Reports by name", "query": { "steps": [ { "type": "elasticsearch-query-dsl-mixin", "query": { "match": { "name": "{{term}}" } }, "parameters": { "nodeTypes": [ "Data" ] } }, { "type": "element-hydration" } ], "parameters": { "term": "quarterly" } } }}Saved searches are managed through the element and the usual access model, so they can be read, changed, deleted and shared like any other element. The answer points to the new element:
Access-Control-Allow-Headers: Authorization, Content-TypeAccess-Control-Allow-Methods: GET, HEAD, OPTIONS, POSTAccess-Control-Allow-Origin: *Access-Control-Expose-Headers: LocationAllow: GET, HEAD, OPTIONS, POSTCache-Control: no-cache, privateContent-Length: 0Content-Type: text/html; charset=UTF-8Date: Sun, 29 Nov 2026 15:44:39 GMTLocation: /02IiNr0GPCzvqvxLbJxRo826EEZAayOPVb2BvX-Powered-By: Ember Nexus APIThe query is validated every time query is written, and again before every run: unknown properties and step types, queries of the wrong shape, Cypher queries which can not be parsed and unsupported Elasticsearch features are refused with 400. A saved search without a query can be stored, but not run.
The query is not indexed
The query of a saved search is not part of the search index: it can neither be searched nor highlighted, as it may be hidden from people who are allowed to search the element.
Running a saved search
The request is optional. It can only contain parameters and debug, the steps are the ones which are stored. Parameters of the request override the stored defaults, while parameters which are set on a step stay fixed:
curl -X POST \ -H 'Authorization: Bearer secret-token:0FRdQiGVBRB3eoUl42crKA' \ -H 'Content-Type: application/json' \ -d '{ "debug": true, "parameters": { "term": "beta" } }' \ https://api.example.com/search/02IiNr0GPCxzIN6hmvSLRX0Rd8SeJCE6GcOJwThe response is the same as the one of a normal search:
[ { "input": { "type": "elasticsearch-query-dsl-mixin", "query": { "match": { "name": "{{term}}" } }, "parameters": { "term": "beta", "nodeTypes": [ "Data" ], "stepResults": [] } }, "step-handler": "elasticsearch-query-dsl-mixin (App\\EventSystem\\SearchStep\\EventListener\\ElasticsearchQueryDslMixinSearchStepEventListener)", "start": 1796473120.904066, "indices": "node_data", "combinedQuery": { "_source": [ "_id" ], "from": 0, "size": 25, "query": { "bool": { "must": [ { "match": { "name": "beta" } } ], "filter": [ { "bool": { "should": [ { "terms": { "_groupsWithSearchAccess.keyword": [] } }, { "term": { "_usersWithSearchAccess.keyword": { "value": "02IiNr0GPCxzIMazG2zjDm9W91ZRqkVtsJfT8" } } } ], "minimum_should_match": 1 } } ] } } }, "end": 1796473120.994841, "duration": 0.090775 }, { "input": { "type": "element-hydration", "query": null, "parameters": { "term": "beta", "stepResults": [ { "elements": [ { "id": "02IiNr0GPCxzIN7fcgG5BuqZJi30Pcu4LtxB5", "type": "Data", "metadata": { "score": 5.290415 } } ], "totalHits": 1, "maxScore": 5.290415 } ] } }, "step-handler": "element-hydration (App\\EventSystem\\SearchStep\\EventListener\\ElementHydrationSearchStepEventListener)", "start": 1796473120.995141, "accessibleElementIds": [ "02IiNr0GPCxzIN7fcgG5BuqZJi30Pcu4LtxB5" ], "end": 1796473121.001303, "duration": 0.006162 }]{ "type": "_SearchResultResponse", "results": [ { "type": "Data", "id": "02IiNr0GPCxzIN7fcgG5BuqZJi30Pcu4LtxB5", "data": { "name": "Quarterly report beta", "scenario": "endpoint.search.postSavedSearch", "createdAt": "2026-12-05T12:15:19+00:00", "updatedAt": "2026-12-05T12:15:19+00:00" }, "metadata": { "score": 5.290415 } } ], "debug": [ { "input": { "type": "elasticsearch-query-dsl-mixin", "query": { "match": { "name": "{{term}}" } }, "parameters": { "term": "beta", "nodeTypes": [ "Data" ], "stepResults": [] } }, "step-handler": "elasticsearch-query-dsl-mixin (App\\EventSystem\\SearchStep\\EventListener\\ElasticsearchQueryDslMixinSearchStepEventListener)", "start": 1796473120.904066, "indices": "node_data", "combinedQuery": { "_source": [ "_id" ], "from": 0, "size": 25, "query": { "bool": { "must": [ { "match": { "name": "beta" } } ], "filter": [ { "bool": { "should": [ { "terms": { "_groupsWithSearchAccess.keyword": [] } }, { "term": { "_usersWithSearchAccess.keyword": { "value": "02IiNr0GPCxzIMazG2zjDm9W91ZRqkVtsJfT8" } } } ], "minimum_should_match": 1 } } ] } } }, "end": 1796473120.994841, "duration": 0.090775 }, { "input": { "type": "element-hydration", "query": null, "parameters": { "term": "beta", "stepResults": [ { "elements": [ { "id": "02IiNr0GPCxzIN7fcgG5BuqZJi30Pcu4LtxB5", "type": "Data", "metadata": { "score": 5.290415 } } ], "totalHits": 1, "maxScore": 5.290415 } ] } }, "step-handler": "element-hydration (App\\EventSystem\\SearchStep\\EventListener\\ElementHydrationSearchStepEventListener)", "start": 1796473120.995141, "accessibleElementIds": [ "02IiNr0GPCxzIN7fcgG5BuqZJi30Pcu4LtxB5" ], "end": 1796473121.001303, "duration": 0.006162 } ]}Access-Control-Allow-Headers: Authorization, Content-Type, PreferAccess-Control-Allow-Methods: OPTIONS, POSTAccess-Control-Allow-Origin: *Access-Control-Expose-Headers: Preference-AppliedAllow: OPTIONS, POSTCache-Control: no-cache, privateContent-Type: application/json; charset=utf-8Date: Thu, 03 Dec 2026 12:24:53 GMTTransfer-Encoding: chunkedVary: Prefer, Accept-EncodingX-Powered-By: Ember Nexus APIWho may run a saved search
HAS_EXECUTE_ACCESS is an access like the others: it is inherited through ownership and groups, can carry conditions, and OWNS includes it. Users and groups are given it with a relation to the saved search, see sharing and managing :
{ "type": "HAS_EXECUTE_ACCESS", "start": "02IiNr0GPCxzIN6P6HyyHLXSpBnMGoAbxIhFL", "end": "02IiNr0GPCzFieWU2rTfKsjYiT2yK4AKikSZF"}Access-Control-Allow-Headers: Authorization, Content-TypeAccess-Control-Allow-Methods: GET, HEAD, OPTIONS, POSTAccess-Control-Allow-Origin: *Access-Control-Expose-Headers: LocationAllow: GET, HEAD, OPTIONS, POSTCache-Control: no-cache, privateContent-Length: 0Content-Type: text/html; charset=UTF-8Date: Sun, 29 Nov 2026 15:44:39 GMTLocation: /02IiNr0GPCzvwyboBosjw0GIdu1Evd7bP5TtMX-Powered-By: Ember Nexus APIExecute access and read access do not imply each other:
| Read | Execute | What happens |
|---|---|---|
| no | yes | The search runs. The query can not be read, and debug is disabled as it would reveal it. |
| yes | no | The query can be read, but the search does not run: 403. |
| yes | yes | The search runs and debug is available. |
| no | no | The saved search does not exist for the caller: 404. |
Giving execute access to a group, or to the anonymous user, makes a search available to many without making its definition public. This is the answer for a user who may run a saved search, but not read it; it only contains what the user may search themselves:
{ "type": "_SearchResultResponse", "results": [ { "type": "Data", "id": "02IiNr0GPCxzIN70epBm17I5DESJInjrq8kap", "data": { "name": "Quarterly report alpha", "scenario": "endpoint.search.postSavedSearch", "createdAt": "2026-12-03T12:05:16+00:00", "updatedAt": "2026-12-03T12:05:16+00:00" }, "metadata": { "score": 4.372641 } } ]}If the caller can read the saved search, but has no execute access, the answer is:
{ "type": "http://api/error/403/forbidden", "title": "Forbidden", "status": 403, "instance": "urn:uuid:02IiNrOdaupnPqXMB75MHeqgDjQ19kRzTIVGA", "detail": "Running a saved search requires execute access to it."}HAS_EXECUTE_ACCESS only has an effect on executable elements, currently saved searches. It is only checked by the endpoints which execute something, and, as it can not change what can be found, is not part of the search index.