SearchAfter API 2.0 examples

The following SearchAfter request examples illustrate how to use the SearchAfter API.

M.Asset query

The following request searches M.Asset and examines the Title property for the DoesNotEqual value A_text. The results are sorted by the date created in descending order. All properties and relations are in the default culture.

RequestResponse
{
    "filter": {
        "left": {
            "name": "M.Asset",
            "type": "DefinitionName"
        },
        "right": {
            "value": "A text",
            "operator": "DoesNotEqual",
            "property_name": "Title",
            "type": "StringProperty"
        },
        "operator": "And",
        "type": "Logical"
    },
    "take": 25,
    "sorting": [
        {
            "field": "createdon",
            "order": "Desc"
        }
    ],
    "load_configuration": {
        "load_entities": true,
        "culture_option": {
            "load_option": "None"
        },
        "property_option": {
            "load_option": "all"
        },
        "relation_option": {
            "load_option": "all"
        }
    }

Full-text query

The following request is a full-text query where the results are sorted by the date created in descending order and only the title property is displayed in the default culture.

RequestResponse
{
    "filter": {
        {
            "value": "something awesome",
            "type": "FullText"
        }
    },
    "sorting": [
        {
            "field": "createdon",
            "order": "Desc"
        }
    ],
    "load_configuration": {
        "culture_option": {
            "load_option": "None"
        },
        "property_option": {
            "load_option": "Custom",
            "properties": ["Title"]
        },
        "relation_option": {
            "load_option": "None"
        }
    }
}

Entity query

This request filters entities that were created after 2024-03-04. The results are sorted by the date created in descending order.

RequestResponse
{
    "filter": {
        {
            "value": "2024-03-04",
            "operator": "LessThanOrEquals",
            "property_name": "createdon",
            "culture": "en-us",
            "type": "DateTimeProperty"
        }
    },
    "sorting": [
        {
            "field": "createdon",
            "order": "Desc"
        }
    ]
}

Entity query returning those not root taxonomies

This request returns entities that are not root taxonomies.

RequestResponse
{
    "filter": {
        {
            "type": "Negating",
            "query":
            {
               "type": "RootTaxonomyItem",
            }
        }
    },
    "sorting": [
        {
            "field": "createdon",
            "order": "Desc"
        }
    ]
}

Do you have some feedback for us?

If you have suggestions for improving this article,