Search one table’s records with the Inbound API

Find records by text in a Mainbase table and narrow the results with a field filter.

Use the search parameter when you know part of a record’s title or text and need its ID. Start with a table whose records are stored in Mainbase and an API key that can read the table. Search checks the title and supported searchable fields that the key’s acting user can read.

Search with a known title

Find your table ID using GET /entities. Replace 123 with that ID and Hex bolt with text from a known title. Use the base URL from API Access and load the key from your secret manager.

curl --silent --show-error --fail-with-body --get \
  "${NIXA_API_BASE_URL}/entities/123/records" \
  -H "X-API-Key: ${NIXA_API_KEY}" \
  --data-urlencode 'search=Hex bolt' \
  --data-urlencode 'sortBy=id' \
  --data-urlencode 'sortOrder=asc' \
  --data-urlencode 'limit=25' \
  --data-urlencode 'page=1'

Check data for the expected record and use its id with GET /entities/{entityId}/records/{recordId} to read it directly. If meta.hasMore is true, increase page and keep the same search, sort, and limit.

Narrow the matches

Add a filters parameter to the same request to require both a text match and a field condition. For example, add the following curl argument if the table schema uses status as the field’s dataKey and accepts Active as a value.

--data-urlencode 'filters={"field":"status","operator":"equals","value":"Active"}'

If the expected record is missing, remove the filter and try the search again with text from its title. Then check that the acting user can read the record and the field you expect it to match. Use a field filter when you know the specific field and value you need to match.

Diagnose Inbound API search on an Open Data virtual table

Ask Mainbase AI

Ask about any feature in Mainbase. Find a setting, get step-by-step guidance, or troubleshoot a problem.

Open the AI assistant

Copy a question to get started

  • How do I create a Kanban view?
  • How do I invite a teammate?
  • Why is a record missing from this view?