How to apply filter schema property?

Hi Team,

I’ve created multi schema where added multiple records. Now in front end I would like to get record based on specific field. e.g.

Schema : dev-educate
Fields: Category

when I hit below url on Postman getting 404 not found error.

http://cms.MYsite.co.uk/api/content/dev-educate/dev-educate/data/Category/IV=CreditScore

This is my collection by hitting below url

http://cms.MYsite.co.uk/api/content/dev-educate/dev-educate/
{
    "total": 3,
    "items": [
        {
            "id": "669263b8-6225-4c92-bfb8-b4fb8fd7fdf5",
            "createdBy": "subject:5e14982fcfd422188476b9e4",
            "lastModifiedBy": "subject:5e14982fcfd422188476b9e4",
            "data": {
                "Category": {
                    "iv": "CreditScore"
                },
                "CategoryText": {
                    "iv": "Money Saving Initiatives"
                }
            },
            "isPending": false,
            "created": "2020-01-13T11:52:57Z",
            "lastModified": "2020-01-14T10:23:34Z",
            "status": "Published",
            "statusColor": "#4bb958",
            "version": 2            
        },
        {
            "id": "90d3952e-5886-438a-89ac-4dbacbe7cc11",
            "createdBy": "subject:5e14982fcfd422188476b9e4",
            "lastModifiedBy": "subject:5e14982fcfd422188476b9e4",
            "data": {
                "Category": {
                    "iv": "Manage Budget"
                },
                "CategoryText": {
                    "iv": "Credit Score"
                },
                "Img": {
                    "iv": [
                        "dcec7ffa-4fa3-4aa7-9d0c-88ff849a9e98"
                    ]
                }
            },
            "isPending": false,
            "created": "2020-01-13T11:53:12Z",
            "lastModified": "2020-01-14T10:17:50Z",
            "status": "Published",
            "statusColor": "#4bb958",
            "version": 3
        },
       
    ],
    "statuses": [
        {
            "status": "Archived",
            "color": "#eb3142"
        },
        {
            "status": "Draft",
            "color": "#8091a5"
        },
        {
            "status": "Published",
            "color": "#4bb958"
        }
    ],
    "_links": {
        "self": {
            "href": "/api/content/dev-educate/category",
            "method": "GET"
        },
        "create": {
            "href": "/api/content/dev-educate/category",
            "method": "POST"
        },
        "create/publish": {
            "href": "/api/content/dev-educate/category?publish=true",
            "method": "POST"
        }
    }
}

Hi,

have you seen the docs: https://docs.squidex.io/02-documentation/developer-guides/api-overview/api

It should be http://cms.MYsite.co.uk/api/content/dev-educate/dev-educate/?$filter=data/Category/IV eq 'CreditScore'

Getting below error

{
“message”: “Query $filter clause not valid.”,
“details”: [
“Could not find a property named ‘IV’ on type ‘DevEducate.DevEducate.Data.Category’.”
],
“statusCode”: 400
}

Sorry, lowercase iv insead of IV

Great Its working fine .

1 Like