Filtering
You can search within a collection using ?filter[field].
#URL Syntax
-
/resources?filter[field]=value
Not all attributes are searchable. Some attributes are computed attributes and are not physically so that they are not searchable. In this case, an exception is thrown.
#Example
Request
GET /production-methods?filter[handle]=dtg HTTP/1.1
Response
{
"data": [
{
"id": 1,
"handle": "dtg",
"collection_name": "dtg",
"name": {
"ar": "طباعة رقمية",
"de": "Digital-Direktdruck",
"en": "Digital print",
"es": "Impresión digital",
"fr": "Impression numérique",
"it": "Stampa digitale",
"ja": "デジタルプリント",
"ko": "Digital-Direktdruck",
"nl": "Digitaal printen",
"pl": "Druk cyfrowy",
"sv": "Digitalt direkttryck",
"tr": "Dijital baskı"
},
"created_at": "2023-01-10T10:11:10+00:00",
"updated_at": "2023-01-10T10:11:10+00:00"
}
],
"links": {
"first": null,
"last": null,
"prev": null,
"next": null
},
"meta": {
"path": "https://api.smake.io/master-administration/production-methods",
"per_page": 15,
"next_cursor": null,
"prev_cursor": null
}
}