Show examples in:
Update a filter

Body Parameters

name  Required  string  Example: "Draft posts"

The name of the filter

filter  Required  object  Example: {"status":{"eq":"draft"}}

The actual filter

shared  Optional  boolean  Example: true

Whether it's a shared filter or not

Returns

Returns a upload_filter resource object.

Examples

Example Basic example
import { buildClient } from '@datocms/cma-client-node';
async function run() {
const client = buildClient({ apiToken: '<YOUR_API_TOKEN>' });
const uploadFilterId = '-Lo34LFSTLmgPToamzJLcg';
const uploadFilter = await client.uploadFilters.update(uploadFilterId, {
name: 'Draft posts',
filter: {
status: {
eq: 'draft'
}
}
});
console.log(uploadFilter);
}
run();