Skip to content

Export Search Results ​

Export search results to a CSV or Excel file. Requires authentication and READ permission for the target. Use a tenant, division, or organization target path; site exports are not supported.

Parameters ​

name * are required parametersdata typedescription
body.esBody*objectElasticsearch search request, including an index belonging to the URL target. Use an object or training index.
body.formLinkBase*stringApplication base URL used to build links to exported records.
body.schemaIdstringSchema ID used to add form field columns. Supply this to export Audio Note fields.
body.toCsvbooleanSet to true for CSV. Defaults to an Excel .xlsx file.
body.subTypestringUse acknowledgment or asset for those object column layouts; otherwise the standard form or training layout is used.
body.includeColumnsstring[]Column paths to include, in order, such as data.default.audio and hasAttachment.

Audio Note Columns ​

An audioNote field exports the number of recordings in its answer's audioRef array as N files, like other media fields. An answer without recordings produces an empty cell; typed text and transcripts are not exported in this column.

When hasAttachment is included, it returns Yes if any included Audio Note, image, or file field has files, and No otherwise. This checks the exported field columns, so include the relevant field paths and supply schemaId.

Return Value ​

The response contains a signed download URL valid for seven days:

json
{
  "message": "search completed",
  "data": "https://storage.googleapis.com/..."
}

Example ​

json
{
  "formLinkBase": "https://app.wombat.software",
  "esBody": {
    "index": "<target object index>",
    "query": { "term": { "schemaRef.schemaId": "audio-form" } },
    "sort": [{ "id": "asc" }]
  },
  "schemaId": "audio-form",
  "toCsv": true,
  "includeColumns": ["data.default.audio", "hasAttachment"]
}

ENDPOINTS

post/s/{targetPath}/export