Kalpana Docs
Resources

Find assets by name

Look up many images at once by file name, id or storage key.

POST /api/assets/bulk-search

Requires assets:read. This is a read; it uses POST so the list of names can go in the body. Use it to turn the file names in a spreadsheet into asset ids before you build rows.

FieldRequiredDescription
workspaceYesWorkspace slug or id.
namesYes1 to 1,000 strings. Each is a file name, an asset id or a storage key. Spaces around each name are trimmed, empty names are dropped and repeats count once.
curl --request POST "https://app.kalpana.one/api/assets/bulk-search" \
  --header "x-api-key: $KALPANA_API_KEY" \
  --header "content-type: application/json" \
  --data '{"workspace":"acme","names":["blue-shirt.jpg","red-shirt"]}'

Response

{
  "assets": [
    {
      "id": "0b0f5a3e-5b1c-4d65-9a5e-3f7d2f2f6c11",
      "filename": "blue-shirt.jpg",
      "storageKey": "…",
      "contentType": "image/jpeg",
      "sizeBytes": 184233,
      "url": "https://cdn.example/temporary-url"
    }
  ]
}

An asset matches a name when any of these hold:

  • its id equals the name, when the name is a UUID;
  • its storageKey equals the name;
  • its filename equals the name, ignoring case;
  • its filename is the name without its extension followed by any extension, ignoring case. So red-shirt and red-shirt.png both match red-shirt.jpg. Only the first 50 distinct names are matched this way.

The response does not say which name matched which asset; compare filename, id or storageKey yourself. One name can match several assets. Assets are ordered by upload time, oldest first, up to 1,000. Internal template previews are excluded. url is a temporary link.

Errors

StatusCause
400names is empty or has more than 1,000 items.
403Your role or key lacks assets:read.
Was this page helpful?

Updated 4 Nov 2026

On this page