Indexing API (BETA) --- Overview · Datasource & properties · Index documents · Permissions
Overview
You do two things, in order:- Create a datasource --- declare object types (e.g.
wiki_page,account) plus their property definitions (custom attributes such asdepartment,priority), and optionally a tree of sub-datasources (used as the first/second-level filters in the search UI). Everything goes in a singlePOST /datasourcescall. - Index documents --- send the standard built-in fields plus a
custom_propertiesarray whosenamevalues match the property definitions, and (optionally) reference a sub-datasource by itskey.
Naming rules (slugs)
Several identifiers in the Indexing API must be slugs inword_word form:
- Datasource
name--- e.g.internal_wiki - Sub
key--- e.g.engineering,runbooks
^[a-z][a-z0-9]*(_[a-z][a-z0-9]*)*$:
- lowercase letters and digits only,
- words separated by single underscores (no hyphens, no spaces, no leading digit).
key is auto-generated from name if you omit it (e.g. "HR Documents" → hr_documents). The datasource name must always be supplied explicitly.
Standard document fields
These fields are available on every document without any property definition. They use the same naming conventions as all amberSearch datasources:
For indexing examples, updates, deletes, and error handling see Index documents.
File types
file_type is required on every document and tells amberSearch how to render and treat the content. It must be one of:
message, merge_request, issue, wiki, markdown, blog, content, timeline, email, file, directory, email_parent, issue_parent, wiki_parent, page, merge_request_parent, webpage, asset.
Pick the value that best matches the source object (e.g. wiki for a wiki page, file for an arbitrary uploaded file, webpage for a scraped page, email for a mail message). The list is also exposed at runtime:
GET /file-types always returns 200 OK.
Sub-datasource hierarchy
amberSearch uses a three-level filter hierarchy for every datasource. These levels let users progressively narrow results:
Subs are declared on the datasource (during creation, or later via the sub endpoints). On documents you reference subs by their
key (the slug); amberSearch derives the human-readable label from the sub’s name and the compound storage values automatically.
Custom attributes (property definitions)
For metadata that goes beyond the built-in fields, you declare property definitions inside an object definition on the datasource and send matchingcustom_properties on each document.
Each property definition requires:
name--- the attribute key you reference later incustom_propertieswhen indexing documents.display_label--- the attribute display name shown in the search UI.
is_searchable): when true, the property values are included in the full-text index so users can find documents by typing those values in a free-text query --- not only via structured filters.
Create the datasource (with subs and property schemas)
POST /api/indexing/datasources --- include subs for the sub-datasource tree and object_definitions (with nested property_definitions) so amberSearch knows which metadata fields exist for each object type.
In the search UI filters this renders as:
Datasource fields
Sub definition fields
Subs are limited to two levels: a top-level sub and one level of children. A child sub cannot have its own children.
Property definition fields
Property types
Once your property definitions are in place, attach values on each document using
custom_properties when indexing.
Manage subs after creation
POST /api/indexing/datasources/{name}/subs adds a single sub to an existing datasource.
Add a top-level sub (auto-slug from name):
parent_key to an existing top-level sub key:
POST /datasources/{name}/subs
Remove a sub by its
key. Children of a deleted sub are removed as well (cascade).
DELETE /datasources/{name}/subs/{sub_key}
List, get, update, or delete a datasource
ListPUT /api/indexing/datasources/{name}. Only display_name, icon_base64, and object_definitions can be changed here. Subs must be added or removed via the sub endpoints.
Response codes
Next step
Index documents
Push and update documents and permissions.

