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

    Examples

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