Choose your language:
    List all filters
    Returns
    Returns an array of item_type_filter objects.

    Examples

    Example code:
    const SiteClient = require('datocms-client').SiteClient;
    const client = new SiteClient('YOUR-API-TOKEN');
    client.itemTypeFilters.all()
    .then((itemTypeFilters) => {
    itemTypeFilters.forEach((itemTypeFilter) => {
    console.log(itemTypeFilter);
    });
    })
    .catch((error) => {
    console.error(error);
    });
    Returned output:
    > node example.js
    {
    "id": "34",
    "name": "Draft posts",
    "filter": {
    "status": {
    "eq": "draft"
    }
    },
    "shared": true,
    "itemType": "44"
    }