Saved Searches

Retrieves the saved searches for every searchable type on the tenant: custom schema types, customer, and legal-entity. Each item includes type.
- : Needed to search documents, to read saved searches, and to read search indexes and index jobs.
Your Emporix tenant's name. Note: The tenant should always be written in lowercase.
^[a-z][a-z0-9]+$Page number to be retrieved. The number of the first page is 1.
1Number of items to be retrieved per page.
60Comma-separated list of properties used to sort the results. The order of properties indicates their priority.
Possible values:
{fieldName}{fieldName}:ASC{fieldName}:DESC
When the direction is omitted, the field is sorted in ascending order. When sort is omitted, results are ordered by metadata.createdAt descending.
name:ASCA standard query parameter is used to search for specific values.
Comma-separated list of saved search properties to return. When the parameter is omitted, the saved search is returned in full.
id,name,indexIdList of language codes acceptable for the response.
- If the header is set to a language or a list of languages, the service returns the first requested language that has a translation. Localized fields are maps with that language code as the key.
- If the header is set to
*, localized fields are retrieved as maps of translations, where the keys are language codes and values are the fields in their respective languages. - If the header is empty, localized fields are retrieved as maps containing a single translation, where the key is a language code and the value is the field in the specified language. The endpoint assumes that localized fields are to be retrieved in the tenant's default language defined in the Configuration Service.
- If none of the requested languages has a translation, the localized fields are omitted from the response.
Flag indicating whether the total count of retrieved items should be returned.
falseThe request succeeded. The body is the current page of saved searches.
The authorization token is invalid or has expired.
The access token does not include search.search_read.
A server-side error occurred.
GET /search/{tenant}/search/queries HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
[
{
"id": "red-cars",
"type": "VEHICLE",
"name": {
"en": "Red cars"
},
"description": {
"en": "Vehicles whose name contains red"
},
"indexId": "vehicles",
"queries": {
"type": "TEXT",
"query": "red",
"field": "name.en"
},
"metadata": {
"version": 1,
"createdAt": "2026-03-12T10:00:00.000Z",
"modifiedAt": "2026-03-12T10:00:00.000Z"
}
},
{
"id": "city-bikes",
"type": "BIKE",
"name": {
"en": "City bikes"
},
"description": {
"en": "Bikes whose name contains city"
},
"indexId": "bikes",
"queries": {
"type": "TEXT",
"query": "city",
"field": "name.en"
},
"metadata": {
"version": 1,
"createdAt": "2026-03-13T10:00:00.000Z",
"modifiedAt": "2026-03-13T10:00:00.000Z"
}
}
]
Retrieves the saved searches for one type.
When sort is omitted, saved searches are ordered by metadata.createdAt descending. When the X-Total-Count request header is true, the response includes the X-Total-Count header with the number of saved searches. The response body stays an array.
- : Needed to search documents, to read saved searches, and to read search indexes and index jobs.
Your Emporix tenant's name. Note: The tenant should always be written in lowercase.
^[a-z][a-z0-9]+$Type of documents to search. Use a custom schema type, customer, or legal-entity.
VEHICLEPage number to be retrieved. The number of the first page is 1.
1Number of items to be retrieved per page.
60Comma-separated list of properties used to sort the results. The order of properties indicates their priority.
Possible values:
{fieldName}{fieldName}:ASC{fieldName}:DESC
When the direction is omitted, the field is sorted in ascending order. When sort is omitted, results are ordered by metadata.createdAt descending.
name:ASCA standard query parameter is used to search for specific values.
Comma-separated list of saved search properties to return. When the parameter is omitted, the saved search is returned in full.
id,name,indexIdList of language codes acceptable for the response.
- If the header is set to a language or a list of languages, the service returns the first requested language that has a translation. Localized fields are maps with that language code as the key.
- If the header is set to
*, localized fields are retrieved as maps of translations, where the keys are language codes and values are the fields in their respective languages. - If the header is empty, localized fields are retrieved as maps containing a single translation, where the key is a language code and the value is the field in the specified language. The endpoint assumes that localized fields are to be retrieved in the tenant's default language defined in the Configuration Service.
- If none of the requested languages has a translation, the localized fields are omitted from the response.
Flag indicating whether the total count of retrieved items should be returned.
falseThe request succeeded. The body is the current page of saved searches.
The authorization token is invalid or has expired.
The access token does not include search.search_read.
A server-side error occurred.
GET /search/{tenant}/search/{type}/queries HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
[
{
"id": "red-cars",
"type": "VEHICLE",
"name": {
"en": "Red cars"
},
"description": {
"en": "Vehicles whose name contains red"
},
"indexId": "vehicles",
"queries": {
"type": "TEXT",
"query": "red",
"field": "name.en"
},
"metadata": {
"version": 1,
"createdAt": "2026-03-12T10:00:00.000Z",
"modifiedAt": "2026-03-12T10:00:00.000Z"
}
}
]
Retrieves one saved search.
- : Needed to search documents, to read saved searches, and to read search indexes and index jobs.
Your Emporix tenant's name. Note: The tenant should always be written in lowercase.
^[a-z][a-z0-9]+$Type of documents to search. Use a custom schema type, customer, or legal-entity.
VEHICLESaved search id. Use 1 to 66 characters. Allowed characters are letters, digits, underscore, and hyphen.
red-carsPattern: ^[\w-]{1,66}$Comma-separated list of saved search properties to return. When the parameter is omitted, the saved search is returned in full.
id,name,indexIdList of language codes acceptable for the response.
- If the header is set to a language or a list of languages, the service returns the first requested language that has a translation. Localized fields are maps with that language code as the key.
- If the header is set to
*, localized fields are retrieved as maps of translations, where the keys are language codes and values are the fields in their respective languages. - If the header is empty, localized fields are retrieved as maps containing a single translation, where the key is a language code and the value is the field in the specified language. The endpoint assumes that localized fields are to be retrieved in the tenant's default language defined in the Configuration Service.
- If none of the requested languages has a translation, the localized fields are omitted from the response.
The request succeeded. The body is the saved search.
One stored saved search. The request field index is returned as indexId. queries is one query node. A list sent on save is returned as one or group.
Saved search id.
red-carsType this saved search belongs to. A custom schema type, customer, or legal-entity.
VEHICLEId of the search index this saved search uses.
vehiclesThe authorization token is invalid or has expired.
The access token does not include search.search_read.
No saved search with this id exists for the type.
A server-side error occurred.
GET /search/{tenant}/search/{type}/queries/{id} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
{
"id": "red-cars",
"type": "VEHICLE",
"name": {
"en": "Red cars"
},
"description": {
"en": "Vehicles whose name contains red"
},
"indexId": "vehicles",
"queries": {
"type": "TEXT",
"query": "red",
"field": "name.en",
"boost": 2
},
"metadata": {
"version": 1,
"createdAt": "2026-03-12T10:00:00.000Z",
"modifiedAt": "2026-03-12T10:00:00.000Z"
}
}
Creates or replaces the saved search identified by {id} for one type. Unknown properties in the body are ignored. Saving does not start an index build.
A new saved search returns 201 Created and the saved search id. Replacing an existing saved search returns 204 No Content. index must already exist for this type. The body must include queries, filters, or both.
metadata can be omitted when the saved search is created. An update requires metadata.version.
- : Needed to create, update, and delete saved searches and search indexes.
Your Emporix tenant's name. Note: The tenant should always be written in lowercase.
^[a-z][a-z0-9]+$Type of documents to search. Use a custom schema type, customer, or legal-entity.
VEHICLESaved search id. Use 1 to 66 characters. Allowed characters are letters, digits, underscore, and hyphen.
red-carsPattern: ^[\w-]{1,66}$Language of the localized name and description in the request body. Each language key in those maps must be configured for the tenant.
enDefinition of a saved search. Unknown properties are ignored. The body must include queries, filters, or both. index must already exist for the type.
The saved search was created. The body is the saved search id.
Identifier of a created saved search.
Saved search id.
red-carsThe saved search was replaced. The response has no body.
The saved search id, criteria, or metadata version is invalid.
The authorization token is invalid or has expired.
The access token does not include search.search_manage.
No index with the id in index exists for this type.
metadata.version does not match the stored saved search.
A server-side error occurred.
PUT /search/{tenant}/search/{type}/queries/{id} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 169
{
"name": {
"en": "Red cars"
},
"description": {
"en": "Vehicles whose name contains red"
},
"index": "vehicles",
"queries": {
"type": "TEXT",
"query": "red",
"field": "name.en",
"boost": 2
}
}{
"id": "red-cars"
}
Deletes one saved search. Deleting does not start an index build.
- : Needed to create, update, and delete saved searches and search indexes.
Your Emporix tenant's name. Note: The tenant should always be written in lowercase.
^[a-z][a-z0-9]+$Type of documents to search. Use a custom schema type, customer, or legal-entity.
VEHICLESaved search id. Use 1 to 66 characters. Allowed characters are letters, digits, underscore, and hyphen.
red-carsPattern: ^[\w-]{1,66}$The saved search was deleted. The response has no body.
No content
The authorization token is invalid or has expired.
The access token does not include search.search_manage.
No saved search with this id exists for the type.
A server-side error occurred.
DELETE /search/{tenant}/search/{type}/queries/{id} HTTP/1.1
Host: api.emporix.io
Authorization: Bearer YOUR_OAUTH2_TOKEN
Accept: */*
No content
Last updated
Was this helpful?

