Craft Documents icon

Craft Documents

Interact with Craft Multi-Document API - manage documents, blocks, collections, and search

Collection → Get Items

AI-generated

Summary

Retrieve all items from a specified collection in your Craft Documents account, with control over the depth of nested content returned.

Inputs

  • Collection Name or ID (required) — Select a collection from your Craft Documents to fetch items from, either by picking from the loaded list or by specifying its ID using an expression.
  • Max Depth — Specify the maximum depth of nested content to retrieve within the collection's items. Use -1 to fetch all descendants or 0 to fetch only the immediate item properties.

Output shape

a list of collection items including nested content according to the Max Depth setting

The returned data structure depends on the maxDepth query parameter, controlling nested content inclusion. If maxDepth is -1, all descendant nested content is included; if 0, only item properties are included without nested content. The operation returns data directly from the corresponding Craft API endpoint for collection items.

Links

Discussion