Skip to main content
patriciam905
Participating Frequently
Oct 30, 2023 9:28 PM UTC
Question

Web Api

Hi,

I have a question, im creating a web api to return data from a query and i have to remove a column from the response.

For example:

I have an expression rule to bring me all the centers we have and it returns  "id" : null, "address" : "null", "officeName" : "null", "countryId" : null, "isAvailable" : true

How can i remove the column "countryId"?

    2 replies

    Inspiring
    Oct 31, 2023 3:17 AM UTC

    you can do that in two ways:
    1. while fetching data from query, you can pass what ever fields you want in selection as below.

    2. prepare custom response as you need

    patriciam905
    Participating Frequently
    Oct 31, 2023 3:45 PM UTC

    Thank you, this works