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

    Examples

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