wfapi items
List CMS items from the currently selected collection.
Requirements
Both site and collection context must be set:
wfapi use site <siteId>
wfapi use cms <collectionSlug>Basic Usage
wfapi itemsWith Filter
Filter items by name or slug:
wfapi items "search term"
wfapi items partialOptions
| Option | Description |
|---|---|
--recent | Show only items modified in the past week, newest first |
--raw | Output raw JSON instead of formatted table |
--site <id|slug> | Use a specific site for this call (no persistence) |
--cms <id|slug> | Use a specific collection for this call (no persistence) |
--env <env> | Use a specific environment for this call (does not change saved ENV) |
Examples
# All items
wfapi items
# Items containing "featured" in name/slug
wfapi items featured
# Recent items only
wfapi items --recent
# Items with filter, raw JSON
wfapi items "blog" --raw
# Recent items with filter
wfapi items "post" --recent --rawOutput
Displays:
- Item name
- Slug
- Item ID
- Last updated date
Example Workflow
# Set context
wfapi use site my-site
wfapi use cms blog-posts
# List all items
wfapi items
# Find recent posts
wfapi items --recent
# Search for specific posts
wfapi items "tutorial"Last updated on