Search task resource
Search a task in the database using curl and Postman. The query returns all the matching instances of the text provided against the parameter.
Endpoint
{base-URL}/tasks?q=
NOTE - {base-URL}/tasks?q= returns all resource instances because no filtering text is present.
Parameters
- q : provide the text you want to search in database.
Request headers
Not required
Search task resource via curl
Request body - curl
curl "{base_url}/tasks?q={text-to-search}"
Example request body - curl
curl "{base_url}/tasks/?q=dog"
Response body - curl
[
{
"userId": 3,
"title": "Get shots for dog",
"description": "Annual vaccinations for poochy",
"dueDate": "2025-12-11T14:00",
"warning": "20",
"id": 4
}
]
Search task resource via Postman
Request body - Postman
- METHOD: GET
- URL:
{base_url}/tasks?q={text-to-search}
Example request body - Postman
- METHOD: GET
- URL:
{base_url}/tasks?q=dog
Response body - Postman
[
{
"userId": 3,
"title": "Get shots for dog",
"description": "Annual vaccinations for poochy",
"dueDate": "2025-12-11T14:00",
"warning": "20",
"id": 4
}
]
Response code - Postman
- 200 OK : Request successful