Craft icon

Craft

Interact with your Craft documents via the API

Collection → List Collections

AI-generated

Summary

List collections accessible in your Craft workspace with optional filters for document inclusion/exclusion and date range (for Daily Notes).

Inputs

  • Document IDs — Comma-separated document IDs to include or exclude when listing collections; leave empty to list all accessible collections.
  • Document Filter Mode — Specify whether to include or exclude the given document IDs from the collection list.
  • Start Date — (Daily Notes credentials only) Filter collections to those in notes on or after this date (format: YYYY-MM-DD or relative date).
  • End Date — (Daily Notes credentials only) Filter collections to those in notes on or before this date (format: YYYY-MM-DD or relative date).

Output shape

a JSON array where each item represents a collection, including properties like collection ID and name, with optional descriptive details.

The output lists all collections accessible by the credentials given, optionally filtered by document IDs and date range. Date filters apply only to Daily Notes connections. If no document IDs are provided, all accessible collections are returned. Errors may be included per item if 'Continue On Fail' is enabled.

Examples

Example 1: List all collections without filters

Leave Document IDs empty and do not set Start Date or End Date.

Example 2: List collections including only specified documents

Set Document IDs to desired comma-separated IDs and Document Filter Mode to 'Include'.

Example 3: List collections excluding specified documents

Set Document IDs to desired comma-separated IDs and Document Filter Mode to 'Exclude'.

Discussion