Partial Data
Overview
show
query parameter allows clients to specify which fields should be included in the API response for a given resource. By using this parameter, you can customize the response to include only the fields you need, improving efficiency and reducing payload size.Usage
Selecting Single Fields
show
query parameter. For example:GET /api/resource?show=name
{
"id": 1,
"name": "Example Name"
}
Selecting Multiple Fields
1.
GET /api/resource?show=name,description
{
"id": 1,
"name": "Example Name",
"description": "This is an example description."
}
2.
GET /api/resource?show[]=name&show[]=description
{
"id": 1,
"name": "Example Name",
"description": "This is an example description."
}
Including Fields from Related Resources
GET /api/resource?show=name,company.name
{
"id": 1,
"name": "Example Name",
"company_id": 2,
"company": {
"id": 2,
"name": "Example Company"
}
}
Behavior Notes
id
field of the resource is always included in the response, even if it is not explicitly specified in the show
parameter.Modified at 2025-01-26 13:30:23