Choose your language:
    Retrieve a filter
    Returns
    Returns a item_type_filter object.

    Examples

    Example code:
    const { SiteClient } = require('datocms-client');
    async function run() {
    const client = new SiteClient('YOUR-API-TOKEN');
    const itemTypeFilterId = '34';
    const itemTypeFilter = await client.itemTypeFilter.find(itemTypeFilterId);
    console.log(itemTypeFilter);
    }
    run();
    Returned output:
    > node example.js
    {
    "id": "34",
    "name": "Draft posts",
    "filter": {
    "status": {
    "eq": "draft"
    }
    },
    "shared": true,
    "itemType": "44"
    }