Skip to content

Error 500 on api/card/:card-id/query/export-format after upgrading from 0.55 #81323

Description

@mohaidoss

Describe the bug

Using the parameter pivot_results=true when exporting a non-pivot card, now returns an error 500 with no details. Previously this parameter was just ignored.

To Reproduce

  1. Create a native question on the Sample Database: SELECT ID, TOTAL FROM ORDERS LIMIT 10
  2. Save it, leave the display as Table (do not make it a pivot table). Note its card id.
  3. Export it via the card endpoint with:
    curl -i -X POST
    -H "X-API-Key: $METABASE_API_KEY"
    -H 'Content-Type: application/json'
    -d '{"format_rows":true,"parameters":[],"pivot_results":true}'
    "$METABASE_URL/api/card/<CARD_ID>/query/csv"
  4. See error: HTTP 500, java.lang.NullPointerException.
  5. Retrying with pivot_results set to False, succeeds

Expected behavior

Either document the breaking change, or revert to how this was handled previously, meaning ignoring the parameter.

Logs

No response

Information about your Metabase installation

version v0.63.2.7
Built on 2026-07-31
Hash: 30c5762

Severity

Breaking all exports through the api endpoint. Ex: automated reports

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions