Skip to content

feat(api): allow excluding id and order fields from list rows response#5381

Open
singhvishalkr wants to merge 1 commit into
baserow:developfrom
singhvishalkr:feat-893-exclude-id-order-fields
Open

feat(api): allow excluding id and order fields from list rows response#5381
singhvishalkr wants to merge 1 commit into
baserow:developfrom
singhvishalkr:feat-893-exclude-id-order-fields

Conversation

@singhvishalkr
Copy link
Copy Markdown

This PR adds the ability to exclude the built-in id and order fields from the list_database_table_rows API response.

Currently, the exclude parameter only works for user-created fields (field_1, field_2, etc.). The id and order fields are always included in the response even when not needed, which can be wasteful for clients that only care about the actual data.

With this change, users can pass id and order in the exclude query parameter:

  • GET /api/database/rows/table/{table_id}/?exclude=id - excludes id
  • GET /api/database/rows/table/{table_id}/?exclude=order - excludes order
  • GET /api/database/rows/table/{table_id}/?exclude=id,order - excludes both
  • GET /api/database/rows/table/{table_id}/?exclude=id,order,field_1 - mix with field exclusions

The implementation adds:

  1. extract_row_metadata_field_exclusions() helper in utils.py to detect id/order in exclude string
  2. exclude_id and exclude_order parameters to get_row_serializer_class()
  3. Updated API documentation for the exclude parameter

Closes #893

Adds support for excluding the built-in id and order fields from the
list_database_table_rows API response. Users can now pass id and/or
order in the exclude query parameter alongside regular field exclusions.

Example: GET /rows/?exclude=id,order,field_1

Fixes baserow#893
@silvestrid silvestrid added database 🗄️ Key expertise in database is required, though the issue may also involve domain::core. external contribution labels May 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

database 🗄️ Key expertise in database is required, though the issue may also involve domain::core. external contribution

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Exclude order or id fields in list rows API

2 participants