curl --request POST \
--url https://api.example.com/v1/organizations/{organizationId}/projects/{projectId}/saved-searches \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"type": "<string>",
"description": "<string>",
"folderId": "<string>",
"filter": {},
"sort": [
{}
]
}
'Create a new saved search
curl --request POST \
--url https://api.example.com/v1/organizations/{organizationId}/projects/{projectId}/saved-searches \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"type": "<string>",
"description": "<string>",
"folderId": "<string>",
"filter": {},
"sort": [
{}
]
}
'content or asset{
"name": "Recent Images",
"description": "Recently uploaded image assets",
"type": "asset",
"folderId": null,
"filter": {
"type": {
"in": ["image/jpeg", "image/png"]
},
"createdAt": {
"gte": "2024-03-01T00:00:00Z"
}
},
"sort": [
{ "field": "createdAt", "order": "desc" }
]
}
{
"id": "ss789",
"name": "Recent Images",
"description": "Recently uploaded image assets",
"type": "asset",
"folderId": null,
"filter": {
"type": {
"in": ["image/jpeg", "image/png"]
},
"createdAt": {
"gte": "2024-03-01T00:00:00Z"
}
},
"sort": [
{ "field": "createdAt", "order": "desc" }
],
"favorites": [],
"metadata": {
"lastUsed": null,
"useCount": 0
},
"createdAt": "2024-03-22T10:00:00Z",
"updatedAt": "2024-03-22T10:00:00Z"
}
{
"error": {
"code": "INVALID_FILTER",
"message": "Invalid filter syntax",
"details": {
"field": "status",
"operator": "invalid_op"
}
}
}
{
"error": {
"code": "TYPE_MISMATCH",
"message": "Saved search type must match folder type",
"details": {
"searchType": "asset",
"folderType": "content"
}
}
}
curl -X POST "https://api.metabind.ai/v1/organizations/org123/projects/proj456/saved-searches" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Recent Images",
"type": "asset",
"filter": {
"type": { "in": ["image/jpeg", "image/png"] }
},
"sort": [{ "field": "createdAt", "order": "desc" }]
}'