GET API with Query parameters "include" and "exclude" data response is not as expected

Hi,

I am trying to use Query parameters “include” and “exclude” in GET API but the response data is not showing accordingly.

Help me with an example to implement “include” and “exclude” in GET API

Hi,

My first thought is that you need to set the parameter user_field_names to true in the querystring in order to use the field names in the include or exclude parameter. If that is not the case, can you offer more details of what is wrong with the data?

If I test the following query, it returns all fields: https://api.baserow.io/api/database/rows/table/[ID of the table]/?user_field_names=true

{
      "id": 1,
      "order": "1.00000000000000000000",
      "Date": "2023-09-14T15:03:34.599332Z",
      "Note": "Testing",
      "Location": "false",
      "Contact": "",
      "Image": []
    },

Using includes with only Note and Location returns the following: https://api.baserow.io/api/database/rows/table/[ID of the table]/?user_field_names=true&include=Note,Location

{
      "id": 1,
      "order": "1.00000000000000000000",
      "Note": "Big nest, quick intervention needed",
      "Location": "false"
    },

The fields id and order are always included in the response