Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  1. Fotoware Alto
    • 11.14 Schreckhorn
    • Terminology
    • Solutions
    • User Guide - Deutsch
    • User Guide - English
    • API Changelog
  2. Fotoware Veloz
    • Managing users and groups
    • Configuring archives
    • Configuring workflows
    • Configuring site behavior
    • Navigating and searching to find your assets
    • Working with your assets
    • Editing asset metadata
    • Uploading files
    • Version Control in Fotoware
    • Albums - Creating and sharing collections
    • Placing assets in a CMS
    • Working with the Fotoware Pro interface
    • Using the Fotoware plugins
    • Consent management
    • User guide to FotoWeb for iPad (Legacy)
    • Picture conferencing with FotoWeb Screens (Legacy)
    • What's what in Fotoware
    • GDPR
    • Fotoware Veloz releases
    • Activity Exports
    • Fotoware Example Workflows
  3. Fotostation
    • Getting started with Fotostation
    • Viewing, selecting and sorting files
    • Managing your assets with archives
    • Adding metadata to assets
    • Searching for assets
    • Working with your assets
    • Version Control in Fotostation
    • Automating tasks with Actions
    • Configuring metadata fields and editors
    • Configuring Fotostation
    • Configuring Fotostation for multi-user environments
    • Troubleshooting Fotostation
  4. Fotoware Flow
    • What is Flow?
    • Getting started
    • Flow dictionary
  5. Fotoware On-Premises
    • Getting started
    • Index Manager
    • FotoWeb
    • Color Factory
    • Connect
    • Operations Center Guide
  6. Integrations and APIs
    • The Fotoware API
    • Creating integrations using embeddable widgets
    • Authorizing applications using OAuth
    • Auto-tagging
    • FotoWeb Drag and Drop export
    • Integration using webhooks
    • Optimizely and Episerver plugin documentation
    • User Interface Integrations
  7. Fotoware Mobile
    • User guide for Fotoware Mobile for iPhone and Android
    • User guide to FotoWeb for iPad (Legacy)
    • User guide to FotoWeb for iPhone and Android (Legacy)

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Support

Table of Contents

Multi-Collection Searches Global Searches Full Example
  • Home
  • Integrations and APIs
  • The Fotoware API
  • Fotoware API Overview

Searching in multiple collections

This article describes how to use the API to search in multiple collections, such as all archives on a site. This allows a client to determine which collections contain assets matching a search, as well as the number of matches in each collection.

11. March 2025

Elaine Foley

Table of Contents

Multi-Collection Searches Global Searches Full Example

Multi-Collection Searches

Some collection lists allow simultaneous search for assets in all collections in the collection list using a collection query. This is called a multi-collection search. A collection list which supports multi-collection searches is called searchable. The result of a multi-collection search is again a collection list, which contains all collections in which assets matching the search query were found. It is called a search collection list.

Currently, only the list of archives is searchable, i.e., it is possible to search in all archives using one request, but not in other collection lists.

A collection list is searchable if its searchURL attribute is not null. In this case, the searchURL attribute is a URL template, which may look as follows:

searchURL: "/fotoweb/archives/{?q}"

By replacing the placeholder {?q} with a collection query, one obtains the URL of the multi-collection search. The search collection list can then be requested as follows:

GET search_url
Accept: application/vnd.fotoware.collectionlist+json

This returns a Collection List representation of the search collection list. Each collection in the search result is itself a search collection, which is the result of a search using the same query in one of the collections of the original collection list.

Each entry in the collection list contains the number of assets matching the search in the assetCount attribute. This can be used immediately for displaying the number of hits in each collection.

Getting the search results in each collection is the same process as getting the assets in each archive: The client makes a separate request to the URL given by the data attribute of each collection in the search collection list that it is interested in:

GET result_collections[i].data
Accept: application/vnd.fotoware.assetlist+json

Global Searches

In addition to searchable collection lists, it is also possible to search for assets globally on the entire site. This is called global search. A global search is done in the same way as a multi-collection search, and the URL template can be found in the public API descriptor as well as in the full API descriptor:

{  ...
  "searchURL": "...",
  ...
}

Currently, a global search searches all archives and ONLY archives, so the global search URL template is the same as the search URL of the archive list.

In future versions, global searches may include collections other than archives (such as albums) as well as new kinds of collections that do not exist at this time, so an application SHOULD do a global search ONLY if it is desirable to find results in any kind of collection, whereas an application that is only interested in results in archives should do a multi-collection search in the archive list instead, even though the result would be the same in today's version of FotoWeb. In both cases, the application SHOULD NOT us a hard-coded search URL, as search URLs are subject to change. For example, in a future version, the global search URL may change from /fotoweb/archives/{?q} to something like /fotoweb/{?q}.

Full Example

For example, consider that the request user has access to the archives "Photos", "Presentations" and "Documents" and performs a multi-collection search for the term "birds".

The client first requests the API descriptor, which returns the URL of the list of archives:

GET /fotoweb/me/
Accept: application/vnd.fotoware.full-api-descriptor+json

200 OK
Content-Type: application/vnd.fotoware.full-api-descriptor+json

{
  ...
  "archives": "/fotoweb/me/archives/",
  ...
}

The client then requests the archive list, which contains the searchURL:

GET /fotoweb/me/archives/
Accept: application/vnd.fotoware.collectionlist+json

200 OK
Content-Type: application/vnd.fotoware.collectionlist+json

{
  "searchURL": "/fotoweb/archives/{?q}",
  ...
}

By replacing the placeholder {?q} with the collection query ?q=birds, the client then performs the multi-collection search as follows:

GET /fotoweb/archives/?q=birds
Accept: application/vnd.fotoware.collectionlist+json

200 OK
Content-Type: application/vnd.fotoware.collectionlist+json

{
  "data": [
    {
      "name": "Birds",
      "data": "/fotoweb/archives/5000-Birds/?q=birds",
      "assetCount": 10
      ...
    },
    {...},
    ...
  ],
  "paging": {...}
}

In this example, the "Birds" archive contains 10 assets that match the search query. To get the assets in this collection that matched the search, the client makes another request to the URL of the "Birds" archive, which it obtains from the data attribute of the "Birds" archive in the search collection list above.

GET /fotoweb/archives/5000-Birds/?q=birds
Accept: application/vnd.fotoware.assetlist+json

200 OK
Content-Type: application/vnd.fotoware.assetlist+json

{
  data: [
    {
      "filename": "cormorant.jpg",
      "href": "/fotoweb/archives/5000-Birds/Birds/cormorant.jpg",
      ...
    },
    {...},
    ...
  ],
  paging: {...}
}

NOTE: All URLs shown in this example are for illustration only. Clients should never hard-code or make any assumptions about the format of URLs.

exploration assortment

Was this article helpful?

Yes
No
Give feedback about this article

Related Articles

  • Content Relation Items Changed Condition
  • Indexing PDF documents
  • Splitting JPEG and RAW files in a workflow
eco-lighthouse-miljøfyrtårn

Company

  • About us
  • Resellers
  • Careers
  • Contact us

Help & support

  • Support center
  • Consultancy
  • Tech partners
  • Fotostation
  • System status

Trust Center

  • Legal
  • Security
  • Sustainability & ESG

Locations

Fotoware AS (HQ)
Tollbugata 35
0157 OSLO
Norway
FotoWare Switzerland AG
Industriestrasse 25
5033 Buchs (AG)
Switzerland

Copyright 2025 Fotoware All rights reserved.

  • Terms of service
  • Privacy policy
  • Cookie policy

Knowledge Base Software powered by Helpjuice

Expand