API version: 0.3.0

---

# POST /search/\<uuid> — Post saved search

Runs the pipeline of a [saved search](/guide/search/saved-searches.md), i.e. an element of the type `SavedSearch`, as the
current user. Saved searches are created, changed and shared with the ordinary [element endpoints](/api/post-index.md);
this endpoint only runs them.

## Access

Running a saved search requires execute access to it (`HAS_EXECUTE_ACCESS`, see the
[access model](/reference/access-model.md)), 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 `403` if the caller can read the saved search, and `404` if not. Elements which
  do not exist and elements which are not saved searches are answered with `404` as 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`.

- `parameters` are 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.
- `debug` returns debug data of every step, like [`POST /search`](/api/post-search.md). 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 errors](/guide/search/understanding-search-errors.md). 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

```bash
curl \
  -H 'Authorization: Bearer secret-token:0FRdQiGVBRB3eoUl42crKA' \
  -H 'Content-Type: application/json' \
  -d '{
        "debug": true,
        "parameters": {
          "term": "beta"
        }
      }' \
  https://api.example.com/search/02IiNr0GPCxzIN6hmvSLRX0Rd8SeJCE6GcOJw
```

## Response

### 200 · OK

Saved search of a quarterly report, run with a different parameter than the stored default.

#### Body

```json
{
  "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
    }
  ]
}
```

#### Headers

```http
Access-Control-Allow-Headers: Authorization, Content-Type, If-Match, If-None-Match
Access-Control-Allow-Methods: OPTIONS, POST
Access-Control-Allow-Origin: *
Access-Control-Expose-Headers: ETag
Allow: OPTIONS, POST
Cache-Control: no-cache, private
Preference-Applied: geometry=wkt
Vary: Prefer
X-Powered-By: Ember Nexus API
```

#### Schema

```json
{
  "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
      }
    }
  }
}
```

[MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/200) · [HTTP.dev](https://http.dev/200)

### 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.

#### Body

```json
{
  "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."
}
```

#### Headers

`Access-Control-Allow-Headers`, `Access-Control-Allow-Methods`, `Access-Control-Allow-Origin`, `Access-Control-Expose-Headers`, `Allow`, `Cache-Control`, `X-Powered-By`. Descriptions and example values are in the Response Header section below.

#### Schema

Same as `Problem` — see the Response Schema section below.

[MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/400) · [HTTP.dev](https://http.dev/400)

### 401 · Unauthorized

The token is invalid or expired.

#### Body

```json
{
  "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)."
}
```

#### Headers

`Access-Control-Allow-Headers`, `Access-Control-Allow-Methods`, `Access-Control-Allow-Origin`, `Access-Control-Expose-Headers`, `Allow`, `Cache-Control`, `X-Powered-By`. Descriptions and example values are in the Response Header section below.

#### Schema

Same as `Problem` — see the Response Schema section below.

[MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/401) · [HTTP.dev](https://http.dev/401)

### 403 · Forbidden

The saved search exists and can be read by the current user, but the user has no execute access to it.

#### Body

```json
{
  "type": "https://api.example.com/error/403/forbidden",
  "title": "Forbidden",
  "status": 403,
  "instance": "urn:uuid:02IiNr0G8viOVKjLCfR4NIEdgVrLpaxVcZ7BI",
  "detail": "Requested endpoint, element or action is forbidden."
}
```

#### Headers

`Access-Control-Allow-Headers`, `Access-Control-Allow-Methods`, `Access-Control-Allow-Origin`, `Access-Control-Expose-Headers`, `Allow`, `Cache-Control`, `X-Powered-By`. Descriptions and example values are in the Response Header section below.

#### Schema

Same as `Problem` — see the Response Schema section below.

[MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/403) · [HTTP.dev](https://http.dev/403)

### 404 · Not Found

The element does not exist, is not a saved search, or the current user can neither run nor read it.

#### Body

```json
{
  "type": "https://api.example.com/error/404/not-found",
  "title": "Not found",
  "status": 404,
  "instance": "urn:uuid:02IiNr0G8viOVKjLCfR4NIEdgVrLpaxVcZ7BI",
  "detail": "Requested element was not found."
}
```

#### Headers

`Access-Control-Allow-Headers`, `Access-Control-Allow-Methods`, `Access-Control-Allow-Origin`, `Access-Control-Expose-Headers`, `Allow`, `Cache-Control`, `X-Powered-By`. Descriptions and example values are in the Response Header section below.

#### Schema

Same as `Problem` — see the Response Schema section below.

[MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Status/404) · [HTTP.dev](https://http.dev/404)

## Request Parameters

### `uuid` (required)

`path · 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})$`

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.

[MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Authorization) · [HTTP.dev](https://http.dev/authorization) · [Authentication guide](/guide/authentication.md)

### `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.

[MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Prefer) · [Response format](/reference/formats-and-languages/geojson.md#response-format)

## Request Body (optional)

#### Example

```json
{
  "parameters": {
    "term": "beta"
  },
  "debug": true
}
```

#### Schema

```json
{
  "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 Schema

### `Problem`

Problem Details object, see RFC 9457.

```json
{
  "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>`."
    }
  }
}
```

## Response Header

### Other Headers

#### `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.

Example: `Authorization, Content-Type, If-Match, If-None-Match`

[MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Access-Control-Allow-Headers) · [HTTP.dev](https://http.dev/access-control-allow-headers)

#### `Access-Control-Allow-Methods` (always)

Indicates which HTTP methods are permitted for cross-origin requests, typically returned in preflight responses.

Example: `OPTIONS, POST`

[MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Access-Control-Allow-Methods) · [HTTP.dev](https://http.dev/access-control-allow-methods)

#### `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`.

Example: `*`

[MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Access-Control-Allow-Origin) · [HTTP.dev](https://http.dev/access-control-allow-origin)

#### `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.

Example: `ETag`

[MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Access-Control-Expose-Headers) · [HTTP.dev](https://http.dev/access-control-expose-headers)

#### `Allow` (always)

Lists the HTTP methods supported by the endpoint; returned alongside a `Method Not Allowed` response.

Example: `OPTIONS, POST`

[MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Allow) · [HTTP.dev](https://http.dev/allow)

#### `Cache-Control` (always)

Directives controlling caching behavior for the response.

Example: `no-cache, private`

[MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Cache-Control) · [HTTP.dev](https://http.dev/cache-control)

#### `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.

Example: `geometry=wkt`

[MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Preference-Applied) · [Response format](/reference/formats-and-languages/geojson.md#response-format)

#### `Vary` (optional)

The request headers which change the response, `Prefer` for endpoints which return geo values in the preferred format.

Example: `Prefer`

[MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Vary) · [HTTP.dev](https://http.dev/vary)

#### `X-Powered-By` (always)

Identifies the underlying API implementation.

Example: `Ember Nexus API`

[MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/X-Powered-By) · [HTTP.dev](https://http.dev/x-powered-by)

#### `Access-Control-Allow-Methods` (always)

Indicates which HTTP methods are permitted for cross-origin requests, typically returned in preflight responses.

Example: `OPTIONS, POST`

[MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Access-Control-Allow-Methods) · [HTTP.dev](https://http.dev/access-control-allow-methods)

#### `Allow` (always)

Lists the HTTP methods supported by the endpoint; returned alongside a `Method Not Allowed` response.

Example: `OPTIONS, POST`

[MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Allow) · [HTTP.dev](https://http.dev/allow)

#### `Access-Control-Allow-Methods` (always)

Indicates which HTTP methods are permitted for cross-origin requests, typically returned in preflight responses.

Example: `OPTIONS, POST`

[MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Access-Control-Allow-Methods) · [HTTP.dev](https://http.dev/access-control-allow-methods)

#### `Allow` (always)

Lists the HTTP methods supported by the endpoint; returned alongside a `Method Not Allowed` response.

Example: `OPTIONS, POST`

[MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Allow) · [HTTP.dev](https://http.dev/allow)

#### `Access-Control-Allow-Methods` (always)

Indicates which HTTP methods are permitted for cross-origin requests, typically returned in preflight responses.

Example: `OPTIONS, POST`

[MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Access-Control-Allow-Methods) · [HTTP.dev](https://http.dev/access-control-allow-methods)

#### `Allow` (always)

Lists the HTTP methods supported by the endpoint; returned alongside a `Method Not Allowed` response.

Example: `OPTIONS, POST`

[MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Allow) · [HTTP.dev](https://http.dev/allow)

#### `Access-Control-Allow-Methods` (always)

Indicates which HTTP methods are permitted for cross-origin requests, typically returned in preflight responses.

Example: `OPTIONS, POST`

[MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Access-Control-Allow-Methods) · [HTTP.dev](https://http.dev/access-control-allow-methods)

#### `Allow` (always)

Lists the HTTP methods supported by the endpoint; returned alongside a `Method Not Allowed` response.

Example: `OPTIONS, POST`

[MDN](https://developer.mozilla.org/en-US/docs/Web/HTTP/Reference/Headers/Allow) · [HTTP.dev](https://http.dev/allow)

---

Home: [Ember Nexus API docs](/index.md)

Full site map: [llms.txt](/llms.txt)

Previous: [Post search](/api/post-search.md)

Next: [Post register](/api/post-register.md)
