Folders

Searches for folders in your product environment

POST
/v1_1/{cloud_name}/folders/search

Lists the folders that match the specified search expression. Limited to 2000 results. If no parameters are passed, returns the 50 most recently created folders in descending order of creation time.

Authorization

AuthorizationBasic <token>

Basic authentication using Cloudinary API Key and API Secret.

In: header

Path Parameters

cloud_name*string

The cloud name of your product environment.

Request Body

application/json

The folder search query parameters.

expression?string

The (Lucene-like) string expression specifying the search query.

sort_by?array<>

An array of single-key objects mapping a field to a sort direction. Each object must contain exactly one field name mapped to 'asc' or 'desc'. Default: [{"created_at": "desc"}].

max_results?integer

Maximum number of folders to return (max 500, default 50).

Rangevalue <= 500
Default50
next_cursor?string

When more results are available, use the next_cursor value from the previous response.

Response Body

application/json

application/json

application/json

curl -X POST "https://example.com/v1_1/my_cloud/folders/search" \  -H "Content-Type: application/json" \  -d '{    "expression": "name:folder AND path:my_parent AND created_at=>4w",    "sort_by": [      {        "name": "asc"      }    ],    "max_results": 10  }'
{  "total_count": 14,  "time": 1136,  "next_cursor": "0a37f8c9f65e79c1cbe782d47987ed108d9f9e0dad4b0666adbf4eac9a634191996204a0ef84ce7b3e0e",  "folders": [    {      "name": "1_folder_param",      "path": "my_parent/1_folder_param",      "created_at": "2024-12-16T11:31:00+00:00",      "external_id": "c7c08f8ecf093353d669d2ea3123967c7"    },    {      "name": "a_folder_param",      "path": "my_parent/a_folder_param",      "created_at": "2024-12-16T11:08:32+00:00",      "external_id": "c7c08b736592482c1125ba5d689ab8779"    }  ]}