Sorry, no results found for "".

Show examples in:
Javascript HTTP
Endpoint info
Available examples

Content Management API > Model filter

Delete a filter

Returns

Returns a resource object of type item_type_filter

Examples

import { buildClient } from "@datocms/cma-client-node";
async function run() {
const client = buildClient({ apiToken: process.env.DATOCMS_API_TOKEN });
const itemTypeFilterId = "FF-P5of6Qp-DD2w0xoaa6Q";
const itemTypeFilter = await client.itemTypeFilters.destroy(itemTypeFilterId);
// Check the 'Returned output' tab for the result ☝️
console.log(itemTypeFilter);
}
run();
{
id: "FF-P5of6Qp-DD2w0xoaa6Q",
name: "Draft posts",
filter: {
query: "foo bar",
fields: {
_status: { eq: "draft" },
title: {
matches: { pattern: "qux", case_sensitive: "false", regexp: "false" },
},
},
},
columns: [
{ name: "_preview", width: 0.6 },
{ name: "slug", width: 0.1 },
{ name: "_status", width: 0.1 },
{ name: "_updated_at", width: 0.2 },
],
order_by: "_updated_at_ASC",
shared: true,
item_type: { type: "item_type", id: "DxMaW10UQiCmZcuuA-IkkA" },
}