Sorry, no results found for "".
Must be exactly "upload_filter"
.
The name of the filter
"Draft posts"
The actual filter
{ status: { eq: "draft" } }
Whether it's a shared filter or not
Returns a resource object of type upload_filter.
PUT https://site-api.datocms.com/upload-filters/:upload_filter_id HTTP/1.1Authorization: Bearer YOUR-API-TOKENAccept: application/jsonX-Api-Version: 3Content-Type: application/vnd.api+json
{ "data": { "type": "upload_filter", "id": "-Lo34LFSTLmgPToamzJLcg", "attributes": { "name": "Draft posts", "filter": { "status": { "eq": "draft" } } } }}
curl -g 'https://site-api.datocms.com/upload-filters/:upload_filter_id' \ -X PUT \ -H "Authorization: Bearer YOUR-API-TOKEN" \ -H "Accept: application/json" \ -H "X-Api-Version: 3" \ -H "Content-Type: application/vnd.api+json" \ --data-binary '{"data":{"type":"upload_filter","id":"-Lo34LFSTLmgPToamzJLcg","attributes":{"name":"Draft posts","filter":{"status":{"eq":"draft"}}}}}'
await fetch("https://site-api.datocms.com/upload-filters/:upload_filter_id", { method: "PUT", headers: { Authorization: "Bearer YOUR-API-TOKEN", Accept: "application/json", "X-Api-Version": "3", "Content-Type": "application/vnd.api+json", }, body: JSON.stringify({ data: { type: "upload_filter", id: "-Lo34LFSTLmgPToamzJLcg", attributes: { name: "Draft posts", filter: { status: { eq: "draft" } } }, }, }),});
HTTP/1.1 200 OKContent-Type: application/jsonCache-Control: cache-control: max-age=0, private, must-revalidateX-RateLimit-Limit: 30X-RateLimit-Remaining: 28
{ "data": { "type": "upload_filter", "id": "-Lo34LFSTLmgPToamzJLcg", "attributes": { "name": "Draft posts", "filter": { "status": { "eq": "draft" } }, "shared": true } }}