SR
Usage

Commands

Learn about all of the commands of the craft query API


create-public-schema

Creates a public schema.

ddev craft query-api/default/create-public-schema

create-public-token

Creates a public schema along with an access token. This will fail if a schema or token with the same identifier already exists.

ddev craft query-api/default/create-public-token

clear-caches

This will clear all data caches managed by the Query API.

ddev craft query-api/default/clear-caches

invalidate-scheduled

Invalidates the caches of all entries that went live (post date) or expired (expiry date) since the last run, and triggers the webhooks. Run it via cron, e.g. every minute.

ddev craft query-api/cache/invalidate-scheduled

Options

--lookback: Seconds to look back if the command never ran before. Defaults to 3600.

generate-types

This will generate TypeScript types based on your elements and fields.

ddev craft query-api/typescript/generate-types

Options

--output: Define an output path, where the file should be stored. This will also accept craft aliases.

Example:

ddev craft query-api/typescript/generate-types --output=./your-path/yourFile.ts

image-transforms

Bulk generate image transforms, for native craft asset transforms.

ddev craft query-api/image-transforms/generate

Options

--transforms: Define one or more transform handles.
--volumes: Define one or more volume handles.

Example:

ddev craft query-api/image-transforms/generate --transforms=portrait --volumes=images,graphics

Copyright © 2026 Samuel Reichör