Export search results as CSV

Export search results to a CSV file

The export search service allows exporting search results to a CSV file. The operation can be performed synchronously or asynchronously.

Export via POST

The examples below show how to export search results using a POST request with a SearchRequest body.


# <CORE_HOST>  FlowerDocs Core base URL
# <TOKEN>      authentication token
# <CATEGORY>   component category (documents, folders, tasks, virtualFolders)
curl -X POST "<CORE_HOST>/rest/<CATEGORY>/search/csv" \
  -H "token: <TOKEN>" \
  -H "Content-Type: application/json" \
  -d '{
  "searchCriteria": [
    {
      "name": "classId",
      "value": "MyDocumentClass"
    }
  ],
  "paginationContext": {
    "maxResults": 1000,
    "pageIndex": 0
  }
}'

The following query parameters can be used:

Name Description Default
isAsync Run as an asynchronous job false
locale Locale for date and number formatting server default

Export via GET

Alternatively, the search request can be passed as a URL-encoded JSON parameter.


# <CORE_HOST>      FlowerDocs Core base URL
# <TOKEN>          authentication token
# <CATEGORY>       component category (documents, folders, tasks, virtualFolders)
# <SEARCH_JSON>    URL-encoded SearchRequest JSON
curl -X GET "<CORE_HOST>/rest/<CATEGORY>/search/csv?searchRequest=<SEARCH_JSON>" \
  -H "token: <TOKEN>"

Asynchronous job management

When using isAsync=true, the CSV export is generated in the background. Use the following endpoints to track job progress.

Check job status


# <CORE_HOST>  FlowerDocs Core base URL
# <TOKEN>      authentication token
# <CATEGORY>   component category
curl -X GET "<CORE_HOST>/rest/<CATEGORY>/search/csv/job/status/" \
  -H "token: <TOKEN>"

Get job result


# <CORE_HOST>  FlowerDocs Core base URL
# <TOKEN>      authentication token
# <CATEGORY>   component category
curl -X GET "<CORE_HOST>/rest/<CATEGORY>/search/csv/job/" \
  -H "token: <TOKEN>"

Get job error


# <CORE_HOST>  FlowerDocs Core base URL
# <TOKEN>      authentication token
# <CATEGORY>   component category
curl -X GET "<CORE_HOST>/rest/<CATEGORY>/search/csv/job/error/" \
  -H "token: <TOKEN>"