post /search/<uuid>
Post saved search
Runs the pipeline of a saved , i.e. an element of the type SavedSearch, as the current user. Saved searches are created, changed and shared with the ordinary element ; this endpoint only runs them.
Access
Running a saved search requires execute access to it (HAS_EXECUTE_ACCESS, see the access ), which is independent of read access:
- With execute access the search runs, whether the caller can read it or not.
- Without execute access, the answer is
403if the caller can read the saved search, and404if not. Elements which do not exist and elements which are not saved searches are answered with404as well.
The saved search always runs with the permissions and the access filter of the caller, never the ones of its author. Two callers can therefore get different results from the same saved search.
Request
The request is optional and only accepts parameters and debug. The steps are the ones of the saved search, so sending steps is refused with 400.
parametersare added to the parameters which are stored in the saved search, and override them if they have the same name. Parameters which are set on a single step of the saved search stay fixed.debugreturns debug data of every step, like . The debug data contains the query, so it is disabled for callers who are not allowed to read the saved search.
Response
Responses and errors are the same as the ones of POST /search, see understanding search . If the caller can not read the saved search, failing steps are answered with a short 400 without details, as they would reveal parts of the query.
The query of the saved search is validated again before every run, as the rules for queries can change between versions of the API. A saved search without a valid query is answered with 400.
Request
curl \ -H 'Authorization: Bearer secret-token:0FRdQiGVBRB3eoUl42crKA' \ -H 'Content-Type: application/json' \ -d '{ "debug": true, "parameters": { "term": "beta" } }' \ https://api.example.com/search/02IiNr0GPCxzIN6hmvSLRX0Rd8SeJCE6GcOJwimport requests
url = "https://api.example.com/search/02IiNr0GPCxzIN6hmvSLRX0Rd8SeJCE6GcOJw"
payload = { "debug": True, "parameters": { "term": "beta" }}headers = { "Authorization": "Bearer secret-token:0FRdQiGVBRB3eoUl42crKA", "Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())const url = 'https://api.example.com/search/02IiNr0GPCxzIN6hmvSLRX0Rd8SeJCE6GcOJw';const options = { method: 'POST', headers: { Authorization: 'Bearer secret-token:0FRdQiGVBRB3eoUl42crKA', 'Content-Type': 'application/json' }, body: '{"debug":true,"parameters":{"term":"beta"}}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}<?php
$client = new \GuzzleHttp\Client();
$response = $client->request('POST', 'https://api.example.com/search/02IiNr0GPCxzIN6hmvSLRX0Rd8SeJCE6GcOJw', [ 'body' => '{"debug":true,"parameters":{"term":"beta"}}', 'headers' => [ 'Authorization' => 'Bearer secret-token:0FRdQiGVBRB3eoUl42crKA', 'Content-Type' => 'application/json', ],]);
echo $response->getBody();Response
200 · OK
Saved search of a quarterly report, run with a different parameter than the stored default.
400 · Bad Request
The request body is invalid, e.g. steps was sent (the pipeline is the one of the saved search), debug is not a boolean, parameters is not an object, or the stored query is not valid anymore. If a step fails while running, the response explains the failure like the one of POST /search, unless the caller is not allowed to read the saved search.
403 · Forbidden
The saved search exists and can be read by the current user, but the user has no execute access to it.
404 · Not Found
The element does not exist, is not a saved search, or the current user can neither run nor read it.
{ "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, If-Match, If-None-MatchAccess-Control-Allow-Methods: OPTIONS, POSTAccess-Control-Allow-Origin: *Access-Control-Expose-Headers: ETagAllow: OPTIONS, POSTCache-Control: no-cache, privatePreference-Applied: geometry=wktVary: PreferX-Powered-By: Ember Nexus API{ "type": "object", "required": [ "type", "results" ], "properties": { "type": { "type": "string", "enum": [ "_SearchResultResponse" ] }, "results": { "description": "The result of the last executed search step. If the last step is an `element-hydration` step, this is a plain array of hydrated elements. Otherwise, its shape depends on the last step's type (e.g. `{ elements, totalHits, maxScore }` for `elasticsearch-query-dsl-mixin`, or `{ paths }` for `cypher-path-subset`).", "oneOf": [ { "type": "array", "items": { "type": "object", "required": [ "type", "id", "data" ], "properties": { "type": { "type": "string", "example": "Data" }, "id": { "type": "string", "pattern": "^(?:[0-9A-Za-z]{37}|[0-9A-Fa-f]{8}-[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}-[0-9A-Fa-f]{14})$", "example": "02IiNr0G8viOVKjLCfR4NIEdgVrLpaxVcZ7BI", "description": "Global unique identifier for any element: a UUIDsv2a7 (draft-davis-uuidrev-uuid-long-00) of 27 bytes, made of a 4 byte encoding block, a 6 byte millisecond timestamp and a 16 byte random part (including the version and variant markers). The canonical form is base62sort, 37 characters of 0-9, A-Z and a-z. The same 27 bytes in base16 with dashes (60 characters in the groups 8-8-4-4-4-12-14, case-insensitive) are accepted as input as well." }, "data": { "type": "object", "additionalProperties": true, "example": { "createdAt": "2025-09-27T10:39:51+00:00", "updatedAt": "2025-09-27T10:39:51+00:00", "name": "some name" } }, "file": { "type": "object", "additionalProperties": true, "readOnly": true, "example": { "contentLength": 63933, "extension": "jpg", "mimeType": "image/jpeg" } }, "start": { "description": "UUID of the start node. Required if end is present.", "type": "string", "pattern": "^(?:[0-9A-Za-z]{37}|[0-9A-Fa-f]{8}-[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}-[0-9A-Fa-f]{14})$", "example": "02IiNr0G8viOVKjLCfR4NIEdgVrLpaxVcZ7BI" }, "end": { "description": "UUID of the end node. Required if start is present.", "type": "string", "pattern": "^(?:[0-9A-Za-z]{37}|[0-9A-Fa-f]{8}-[0-9A-Fa-f]{8}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{4}-[0-9A-Fa-f]{12}-[0-9A-Fa-f]{14})$", "example": "02IiNr0G8viOVKjLCfR4NIEdgVrLpaxVcZ7BI" } } } }, { "type": "object", "additionalProperties": true } ] }, "debug": { "type": "array", "description": "Only present if the request body's `debug` property was set to true. Contains one entry per executed search step, with step-specific timing and query information.", "items": { "type": "object", "additionalProperties": true } } }}{ "type": "https://api.example.com/error/400/missing-property", "title": "Missing property", "status": 400, "instance": "urn:uuid:02IiNr0G8viOVKjLCfR4NIEdgVrLpaxVcZ7BI", "detail": "Endpoint requires that the request contains property 'type' to be set to a valid type."}Access-Control-Allow-Headers: Authorization, Content-Type, If-Match, If-None-MatchAccess-Control-Allow-Methods: OPTIONS, POSTAccess-Control-Allow-Origin: *Access-Control-Expose-Headers: ETagAllow: OPTIONS, POSTCache-Control: no-cache, privateX-Powered-By: Ember Nexus API{ "type": "object", "description": "Problem Details object, see RFC 9457.", "properties": { "type": { "type": "string", "format": "uri" }, "title": { "type": "string" }, "status": { "type": "integer" }, "detail": { "type": "string" }, "instance": { "type": "string", "format": "uri", "description": "URN uniquely identifying the request that produced this problem, as `urn:uuid:<uuid>`." } }}{ "type": "https://api.example.com/error/401/unauthorized", "title": "Unauthorized", "status": 401, "instance": "urn:uuid:02IiNr0G8viOVKjLCfR4NIEdgVrLpaxVcZ7BI", "detail": "Authorization for the request failed due to possible problems with the token (incorrect or expired), password (incorrect or changed), the user's unique identifier, or the user's status (e.g., missing, blocked, or deleted)."}Access-Control-Allow-Headers: Authorization, Content-Type, If-Match, If-None-MatchAccess-Control-Allow-Methods: OPTIONS, POSTAccess-Control-Allow-Origin: *Access-Control-Expose-Headers: ETagAllow: OPTIONS, POSTCache-Control: no-cache, privateX-Powered-By: Ember Nexus API{ "type": "object", "description": "Problem Details object, see RFC 9457.", "properties": { "type": { "type": "string", "format": "uri" }, "title": { "type": "string" }, "status": { "type": "integer" }, "detail": { "type": "string" }, "instance": { "type": "string", "format": "uri", "description": "URN uniquely identifying the request that produced this problem, as `urn:uuid:<uuid>`." } }}{ "type": "https://api.example.com/error/403/forbidden", "title": "Forbidden", "status": 403, "instance": "urn:uuid:02IiNr0G8viOVKjLCfR4NIEdgVrLpaxVcZ7BI", "detail": "Requested endpoint, element or action is forbidden."}Access-Control-Allow-Headers: Authorization, Content-Type, If-Match, If-None-MatchAccess-Control-Allow-Methods: OPTIONS, POSTAccess-Control-Allow-Origin: *Access-Control-Expose-Headers: ETagAllow: OPTIONS, POSTCache-Control: no-cache, privateX-Powered-By: Ember Nexus API{ "type": "object", "description": "Problem Details object, see RFC 9457.", "properties": { "type": { "type": "string", "format": "uri" }, "title": { "type": "string" }, "status": { "type": "integer" }, "detail": { "type": "string" }, "instance": { "type": "string", "format": "uri", "description": "URN uniquely identifying the request that produced this problem, as `urn:uuid:<uuid>`." } }}{ "type": "https://api.example.com/error/404/not-found", "title": "Not found", "status": 404, "instance": "urn:uuid:02IiNr0G8viOVKjLCfR4NIEdgVrLpaxVcZ7BI", "detail": "Requested element was not found."}Access-Control-Allow-Headers: Authorization, Content-Type, If-Match, If-None-MatchAccess-Control-Allow-Methods: OPTIONS, POSTAccess-Control-Allow-Origin: *Access-Control-Expose-Headers: ETagAllow: OPTIONS, POSTCache-Control: no-cache, privateX-Powered-By: Ember Nexus API{ "type": "object", "description": "Problem Details object, see RFC 9457.", "properties": { "type": { "type": "string", "format": "uri" }, "title": { "type": "string" }, "status": { "type": "integer" }, "detail": { "type": "string" }, "instance": { "type": "string", "format": "uri", "description": "URN uniquely identifying the request that produced this problem, as `urn:uuid:<uuid>`." } }}Request Parameters
uuid
required
Id of the saved search: a UUIDsv2a7 (draft-davis-uuidrev-uuid-long-00) of 27 bytes, 37 characters in base62sort; the same id in base16 with dashes (60 characters) is accepted as well.
Request Header
Authorization
optional
Bearer token for user authentication. If omitted, the request is processed as an anonymous user; if provided, the associated user account is used.
Prefer
optional
Preferences of RFC 7240. geometry=wkt returns geo values as WKT strings instead of GeoJSON objects, geometry=geojson is the default. Unknown preferences are ignored.
Request Body
{ "parameters": { "term": "beta" }, "debug": true}{ "type": "object", "properties": { "parameters": { "type": "object", "description": "Arbitrary data, injected as global parameters to the search steps; overrides the parameters which are stored in the saved search. Parameters which are set on a step of the saved search stay fixed.", "additionalProperties": true, "example": { "term": "beta" } }, "debug": { "type": "boolean", "description": "If true, the search response includes additional debug and meta data. Ignored if the current user can not read the saved search, as the debug data would reveal the query.", "example": true } }}Response Header
Access-Control-Allow-Headers
always
Lists the request headers which the endpoint reads and which browsers may send in cross-origin requests. Headers are listed explicitly, as the wildcard does not cover Authorization; resumable upload headers, for example, are only listed by upload endpoints.
Access-Control-Allow-Methods
always
Indicates which HTTP methods are permitted for cross-origin requests, typically returned in preflight responses.
Access-Control-Allow-Origin
always
Specifies which origin may access the resource: the origin of the request (default), or * if cors.allowedOrigins is set to the wildcard. Not sent to origins which are not part of a configured list of cors.allowedOrigins.
Access-Control-Expose-Headers
optional
Lists the response headers which the endpoint can send and which browsers may access from JavaScript beyond the default restricted set. Only headers of the endpoint are listed; the header is omitted if the endpoint has none.
Allow
always
Lists the HTTP methods supported by the endpoint; returned alongside a Method Not Allowed response.
Cache-Control
always
Directives controlling caching behavior for the response.
Preference-Applied
optional
The preferences of the Prefer request header which were applied, e.g. geometry=wkt. Only present if the request contained a supported preference.
Vary
optional
The request headers which change the response, Prefer for endpoints which return geo values in the preferred format.
Access-Control-Allow-Methods
always
Indicates which HTTP methods are permitted for cross-origin requests, typically returned in preflight responses.
Allow
always
Lists the HTTP methods supported by the endpoint; returned alongside a Method Not Allowed response.
Access-Control-Allow-Methods
always
Indicates which HTTP methods are permitted for cross-origin requests, typically returned in preflight responses.
Allow
always
Lists the HTTP methods supported by the endpoint; returned alongside a Method Not Allowed response.
Access-Control-Allow-Methods
always
Indicates which HTTP methods are permitted for cross-origin requests, typically returned in preflight responses.
Allow
always
Lists the HTTP methods supported by the endpoint; returned alongside a Method Not Allowed response.
Access-Control-Allow-Methods
always
Indicates which HTTP methods are permitted for cross-origin requests, typically returned in preflight responses.
Allow
always
Lists the HTTP methods supported by the endpoint; returned alongside a Method Not Allowed response.