Appearance
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 parameters | data type | description |
|---|---|---|
body.esBody* | object | Elasticsearch search request, including an index belonging to the URL target. Use an object or training index. |
body.formLinkBase* | string | Application base URL used to build links to exported records. |
body.schemaId | string | Schema ID used to add form field columns. Supply this to export Audio Note fields. |
body.toCsv | boolean | Set to true for CSV. Defaults to an Excel .xlsx file. |
body.subType | string | Use acknowledgment or asset for those object column layouts; otherwise the standard form or training layout is used. |
body.includeColumns | string[] | 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