GET api/Products?q={q}
Get list of products from server
Request Information
URI Parameters
| Name | Description | Type | Additional information |
|---|---|---|---|
| q |
Search string for Name, Category and Description fields |
string |
Default value is |
Body Parameters
None.
Response Information
Resource Description
Collection of Product| Name | Description | Type | Additional information |
|---|---|---|---|
| ID | integer |
None. |
|
| Category | string |
Required Matching regular expression pattern: ^[A-Z]+[a-zA-Z''-'\s]*$ String length: inclusive between 0 and 30 |
|
| Name | string |
String length: inclusive between 3 and 60 |
|
| Price | decimal number |
Data type: Currency Range: inclusive between 0 and 1000 |
|
| Description | string |
None. |
|
| Modified | date |
Data type: Date |
Response Formats
application/json, text/json
Sample:
[
{
"ID": 1,
"Category": "sample string 2",
"Name": "sample string 3",
"Price": 4.0,
"Description": "sample string 5",
"Modified": "2025-12-12T18:51:31.3593555+00:00"
},
{
"ID": 1,
"Category": "sample string 2",
"Name": "sample string 3",
"Price": 4.0,
"Description": "sample string 5",
"Modified": "2025-12-12T18:51:31.3593555+00:00"
}
]
application/xml, text/xml
Sample:
<ArrayOfProduct xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://schemas.datacontract.org/2004/07/AspNetMvcDemo.Models">
<Product>
<Category>sample string 2</Category>
<Description>sample string 5</Description>
<ID>1</ID>
<Modified>2025-12-12T18:51:31.3593555+00:00</Modified>
<Name>sample string 3</Name>
<Price>4</Price>
</Product>
<Product>
<Category>sample string 2</Category>
<Description>sample string 5</Description>
<ID>1</ID>
<Modified>2025-12-12T18:51:31.3593555+00:00</Modified>
<Name>sample string 3</Name>
<Price>4</Price>
</Product>
</ArrayOfProduct>