© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Search
Star
Feedback
Setup for Free
Design REST API to request certain fields - C#
C
C#
•
3y ago
•
5 replies
Core
Design REST API to request certain fields
Hello
, this is a generic question
If a model has six fields
, but as a response you only want to include four
, a DTO would be used
. This means that the
GET /users
GET /users
request would contain a list of users
, each with four fields
.
Instead of
GET /users
GET /users
, should the request URL be
GET /users?fields=name,username,etc
GET /users?fields=name,username,etc
in this scenario
?
I am wondering if this is used in real
-life scenarios when the consumer of the API is a SPA
.
C#
Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
62,470
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Similar Threads
Was this page helpful?
Yes
No
Recent Announcements
Similar Threads
✅ API REST
C
C# / help
9mo ago
✅ REST Api
C
C# / help
3y ago
OOP and REST/JSON Design
C
C# / help
3y ago
✅ .db file to rest api
C
C# / help
3y ago