Sorry, no results found for "".
RFC 4122 UUID of upload filter expressed in URL-safe base64 format
"-Lo34LFSTLmgPToamzJLcg"
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.
POST https://site-api.datocms.com/upload-filters HTTP/1.1Authorization: Bearer YOUR-API-TOKENAccept: application/jsonX-Api-Version: 3Content-Type: application/vnd.api+json
{ "data": { "type": "upload_filter", "attributes": { "name": "Draft posts", "filter": { "status": { "eq": "draft" } }, "shared": true } }}
curl -g 'https://site-api.datocms.com/upload-filters' \ -X POST \ -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","attributes":{"name":"Draft posts","filter":{"status":{"eq":"draft"}},"shared":true}}}'
await fetch("https://site-api.datocms.com/upload-filters", { method: "POST", 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", attributes: { name: "Draft posts", filter: { status: { eq: "draft" } }, shared: true, }, }, }),});
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 } }}