Skip to main content

Export a resource type as CSV

$csv searches a resource type and returns matching resources as a CSV download. Supply _fields to choose the columns; ordinary FHIR search parameters can be used to narrow the rows.

MethodPath
GET/fhir/R4/:type/$csv

Request​

curl --get 'https://api.sandbox.ovok.com/fhir/R4/Patient/$csv' \
--header "Authorization: Bearer ${OVOK_TOKEN}" \
--data-urlencode '_fields=id,active,birthDate'
ParameterRequiredDescription
_fieldsYesComma-separated resource fields to include as CSV columns.
FHIR search parametersNoStandard search filters for the selected resource type, such as active=true.

Response​

The response is a CSV file (text/csv) named export.csv. It includes a UTF-8 byte-order mark for spreadsheet compatibility. Exports are bounded by the server's result limit; use search filters to keep large exports focused.

Response partDescription
Header rowSelected fields, in the requested field order.
Data rowsMatching resource values; repeated or complex values are serialized by the server.

This route uses GET. The CSV export is a read operation; do not send it as POST.