Show examples in:
    List all filters

    Returns

    Returns an array of item_type_filter resource objects.

    Examples

    Example code:
    import { buildClient } from '@datocms/cma-client-node';
    async function run() {
    const client = buildClient({ apiToken: '<YOUR_API_TOKEN>' });
    const itemTypeFilters = await client.itemTypeFilters.list();
    itemTypeFilters.forEach((itemTypeFilter) => {
    console.log(itemTypeFilter);
    });
    }
    run();
    Returned output:
    {
    id: '34',
    name: 'Draft posts',
    filter: {
    status: {
    eq: 'draft'
    }
    },
    shared: true,
    item_type: {
    type: 'item_type',
    id: '44'
    }
    }