Can I exclude a field from the response body?

Hi, I'm using an api: /api/v2/users?expand=authorization
I need only 'roles' field from this api not the 'permission' field in response(authorization array), is there any way we can exclude the list of 'permission' from coming in response?

No. APIs return the structure their contract specifies.
If you expand authorization you get the entire UserAuthorization object as it's defined in Schema

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.