WHAT YOU'LL LEARN
  • What use cases are available in webiny/api/cms/entry?
  • Which event handlers can you implement?
  • How to import and use each exported item?

Overview
anchor

This page documents everything exported from webiny/api/cms/entry. Import any of the items below directly from this path in your Webiny extensions.

Use Cases

CreateEntryRevisionFromUseCaseCreateEntryUseCaseDeleteEntryRevisionUseCaseDeleteEntryUseCaseDeleteMultipleEntriesUseCaseGetEntriesByIdsUseCaseGetEntryByIdUseCaseGetEntryUseCaseGetLatestDeletedRevisionByEntryIdUseCaseGetLatestEntriesByIdsUseCaseGetLatestRevisionByEntryIdBaseUseCaseGetLatestRevisionByEntryIdIncludingDeletedUseCaseGetLatestRevisionByEntryIdUseCaseGetPreviousRevisionByEntryIdBaseUseCaseGetPreviousRevisionByEntryIdUseCaseGetPublishedEntriesByIdsUseCaseGetPublishedRevisionByEntryIdUseCaseGetRevisionByIdUseCaseGetRevisionsByEntryIdUseCaseGetSingletonEntryUseCaseListDeletedEntriesUseCaseListEntriesUseCaseListLatestEntriesUseCaseListPublishedEntriesUseCaseMoveEntryToBinUseCaseMoveEntryUseCasePublishEntryUseCaseRepublishEntryUseCaseRestoreEntryFromBinUseCaseUnpublishEntryUseCaseUpdateEntryUseCaseUpdateSingletonEntryUseCaseValidateEntryUseCase

Event Handlers

Services

Types & Classes

Use Cases
anchor

CreateEntryRevisionFromUseCase
anchor

Use Case Abstraction — imported from webiny/api/cms/entry

Interface CreateEntryRevisionFromUseCase.Interface:

CreateEntryRevisionFrom Use Case - Creates a new revision from an existing entry.

Types:

CreateEntryUseCase
anchor

Use Case Abstraction — imported from webiny/api/cms/entry

Interface CreateEntryUseCase.Interface:

CreateEntry Use Case

Types:

DeleteEntryRevisionUseCase
anchor

Use Case Abstraction — imported from webiny/api/cms/entry

Interface DeleteEntryRevisionUseCase.Interface:

DeleteEntryRevision Use Case - Deletes a specific revision of an entry. Handles special cases like deleting the latest revision.

Types:

DeleteEntryUseCase
anchor

Use Case Abstraction — imported from webiny/api/cms/entry

Interface DeleteEntryUseCase.Interface:

DeleteEntry Use Case - Permanently deletes an entry from the database. This is a hard delete that removes all traces of the entry.

Types:

DeleteMultipleEntriesUseCase
anchor

Use Case Abstraction — imported from webiny/api/cms/entry

Interface DeleteMultipleEntriesUseCase.Interface:

Types:

GetEntriesByIdsUseCase
anchor

Use Case Abstraction — imported from webiny/api/cms/entry

Interface GetEntriesByIdsUseCase.Interface:

GetEntriesByIds Use Case - Fetches multiple entries by their exact revision IDs. Returns array of entries (excludes deleted entries via decorator).

Types:

GetEntryByIdUseCase
anchor

Use Case Abstraction — imported from webiny/api/cms/entry

Interface GetEntryByIdUseCase.Interface:

GetEntryById Use Case - Fetches a single entry by its exact revision ID. Returns entry or fails with EntryNotFoundError if not found or deleted.

Types:

GetEntryUseCase
anchor

Use Case Abstraction — imported from webiny/api/cms/entry

Interface GetEntryUseCase.Interface:

GetEntry Use Case - Gets a single entry by query parameters (where + sort). Uses list operation with limit 1 and returns first result or NotFoundError.

Types:

GetLatestDeletedRevisionByEntryIdUseCase
anchor

Use Case Abstraction — imported from webiny/api/cms/entry

Interface GetLatestDeletedRevisionByEntryIdUseCase.Interface:

Base internal use case - returns entry regardless of deleted state. This is used internally by the three public variations.

Types:

GetLatestEntriesByIdsUseCase
anchor

Use Case Abstraction — imported from webiny/api/cms/entry

Interface GetLatestEntriesByIdsUseCase.Interface:

GetLatestEntriesByIds Use Case - Fetches latest revisions by entry IDs. Returns array of latest entries (excludes deleted entries via decorator).

Types:

GetLatestRevisionByEntryIdBaseUseCase
anchor

Use Case Abstraction — imported from webiny/api/cms/entry

Interface GetLatestRevisionByEntryIdBaseUseCase.Interface:

Base internal use case - returns entry regardless of deleted state. This is used internally by the three public variations.

Types:

GetLatestRevisionByEntryIdIncludingDeletedUseCase
anchor

Use Case Abstraction — imported from webiny/api/cms/entry

Interface GetLatestRevisionByEntryIdIncludingDeletedUseCase.Interface:

Base internal use case - returns entry regardless of deleted state. This is used internally by the three public variations.

Types:

GetLatestRevisionByEntryIdUseCase
anchor

Use Case Abstraction — imported from webiny/api/cms/entry

Interface GetLatestRevisionByEntryIdUseCase.Interface:

Base internal use case - returns entry regardless of deleted state. This is used internally by the three public variations.

Types:

GetPreviousRevisionByEntryIdBaseUseCase
anchor

Use Case Abstraction — imported from webiny/api/cms/entry

Interface GetPreviousRevisionByEntryIdBaseUseCase.Interface:

Base internal use case - returns entry regardless of deleted state. This is used internally by the public variation.

Types:

GetPreviousRevisionByEntryIdUseCase
anchor

Use Case Abstraction — imported from webiny/api/cms/entry

Interface GetPreviousRevisionByEntryIdUseCase.Interface:

Base internal use case - returns entry regardless of deleted state. This is used internally by the public variation.

Types:

GetPublishedEntriesByIdsUseCase
anchor

Use Case Abstraction — imported from webiny/api/cms/entry

Interface GetPublishedEntriesByIdsUseCase.Interface:

GetPublishedEntriesByIds Use Case - Fetches published revisions by entry IDs. Returns array of published entries (excludes deleted entries via decorator).

Types:

GetPublishedRevisionByEntryIdUseCase
anchor

Use Case Abstraction — imported from webiny/api/cms/entry

Interface GetPublishedRevisionByEntryIdUseCase.Interface:

GetPublishedRevisionByEntryId Use Case

Types:

GetRevisionByIdUseCase
anchor

Use Case Abstraction — imported from webiny/api/cms/entry

Interface GetRevisionByIdUseCase.Interface:

GetRevisionById Use Case - Fetches a specific entry revision by ID. Returns the entry or fails with EntryNotFoundError if not found or deleted.

Types:

GetRevisionsByEntryIdUseCase
anchor

Use Case Abstraction — imported from webiny/api/cms/entry

Interface GetRevisionsByEntryIdUseCase.Interface:

GetRevisionsByEntryId Use Case - Fetches all revisions for a given entry ID. Returns array of entry revisions.

Types:

GetSingletonEntryUseCase
anchor

Use Case Abstraction — imported from webiny/api/cms/entry

Interface GetSingletonEntryUseCase.Interface:

GetSingletonEntry Use Case

Gets the singleton entry for a model, creating it if it doesn’t exist.

Types:

ListDeletedEntriesUseCase
anchor

Use Case Abstraction — imported from webiny/api/cms/entry

Interface ListDeletedEntriesUseCase.Interface:

ListDeletedEntries Use Case - Lists deleted entries (manage API).

Types:

ListEntriesUseCase
anchor

Use Case Abstraction — imported from webiny/api/cms/entry

Interface ListEntriesUseCase.Interface:

Base ListEntries Use Case - Internal base use case for listing entries. Used by specific variants (Latest, Published, Deleted).

Types:

ListLatestEntriesUseCase
anchor

Use Case Abstraction — imported from webiny/api/cms/entry

Interface ListLatestEntriesUseCase.Interface:

ListLatestEntries Use Case - Lists latest entries (manage API).

Types:

ListPublishedEntriesUseCase
anchor

Use Case Abstraction — imported from webiny/api/cms/entry

Interface ListPublishedEntriesUseCase.Interface:

ListPublishedEntries Use Case - Lists published entries (read API).

Types:

MoveEntryToBinUseCase
anchor

Use Case Abstraction — imported from webiny/api/cms/entry

Interface MoveEntryToBinUseCase.Interface:

MoveEntryToBin Use Case - Soft deletes an entry by marking it as deleted. This moves the entry to the bin (trash) instead of permanently deleting it.

Types:

MoveEntryUseCase
anchor

Use Case Abstraction — imported from webiny/api/cms/entry

Interface MoveEntryUseCase.Interface:

MoveEntry Use Case - Moves an entry to a different folder.

Types:

PublishEntryUseCase
anchor

Use Case Abstraction — imported from webiny/api/cms/entry

Interface PublishEntryUseCase.Interface:

PublishEntry Use Case - Publishes an entry revision.

Types:

RepublishEntryUseCase
anchor

Use Case Abstraction — imported from webiny/api/cms/entry

Interface RepublishEntryUseCase.Interface:

RepublishEntry Use Case - Republishes an already published entry. This updates the entry and publishes it again.

Types:

RestoreEntryFromBinUseCase
anchor

Use Case Abstraction — imported from webiny/api/cms/entry

Interface RestoreEntryFromBinUseCase.Interface:

RestoreEntryFromBin Use Case - Restores a soft-deleted entry from the bin. This clears the wbyDeleted flag and restores the entry to its original folder.

Types:

UnpublishEntryUseCase
anchor

Use Case Abstraction — imported from webiny/api/cms/entry

Interface UnpublishEntryUseCase.Interface:

UnpublishEntry Use Case

Types:

UpdateEntryUseCase
anchor

Use Case Abstraction — imported from webiny/api/cms/entry

Interface UpdateEntryUseCase.Interface:

UpdateEntry Use Case

Types:

UpdateSingletonEntryUseCase
anchor

Use Case Abstraction — imported from webiny/api/cms/entry

Interface UpdateSingletonEntryUseCase.Interface:

UpdateSingletonEntry Use Case

Updates the singleton entry for a model.

Types:

ValidateEntryUseCase
anchor

Use Case Abstraction — imported from webiny/api/cms/entry

Interface ValidateEntryUseCase.Interface:

Types:

Event Handlers
anchor

EntryAfterCreateEventHandler
anchor

Event Handler Abstraction — imported from webiny/api/cms/entry

Interface EntryAfterCreateEventHandler.Interface:

Event payload EntryAfterCreateEventPayload:

Types:

EntryAfterDeleteEventHandler
anchor

Event Handler Abstraction — imported from webiny/api/cms/entry

Interface EntryAfterDeleteEventHandler.Interface:

Types:

EntryAfterDeleteMultipleEventHandler
anchor

Event Handler Abstraction — imported from webiny/api/cms/entry

Interface EntryAfterDeleteMultipleEventHandler.Interface:

Types:

EntryAfterMoveEventHandler
anchor

Event Handler Abstraction — imported from webiny/api/cms/entry

Interface EntryAfterMoveEventHandler.Interface:

Types:

EntryAfterPublishEventHandler
anchor

Event Handler Abstraction — imported from webiny/api/cms/entry

Interface EntryAfterPublishEventHandler.Interface:

Types:

EntryAfterRepublishEventHandler
anchor

Event Handler Abstraction — imported from webiny/api/cms/entry

Interface EntryAfterRepublishEventHandler.Interface:

Types:

EntryAfterRestoreFromBinEventHandler
anchor

Event Handler Abstraction — imported from webiny/api/cms/entry

Interface EntryAfterRestoreFromBinEventHandler.Interface:

Types:

EntryAfterUnpublishEventHandler
anchor

Event Handler Abstraction — imported from webiny/api/cms/entry

Interface EntryAfterUnpublishEventHandler.Interface:

Event payload EntryAfterUnpublishEventPayload:

Types:

EntryAfterUpdateEventHandler
anchor

Event Handler Abstraction — imported from webiny/api/cms/entry

Interface EntryAfterUpdateEventHandler.Interface:

Event payload EntryAfterUpdateEventPayload:

Types:

EntryBeforeCreateEventHandler
anchor

Event Handler Abstraction — imported from webiny/api/cms/entry

Interface EntryBeforeCreateEventHandler.Interface:

Event payload EntryBeforeCreateEventPayload:

Types:

EntryBeforeDeleteEventHandler
anchor

Event Handler Abstraction — imported from webiny/api/cms/entry

Interface EntryBeforeDeleteEventHandler.Interface:

Types:

EntryBeforeDeleteMultipleEventHandler
anchor

Event Handler Abstraction — imported from webiny/api/cms/entry

Interface EntryBeforeDeleteMultipleEventHandler.Interface:

Types:

EntryBeforeMoveEventHandler
anchor

Event Handler Abstraction — imported from webiny/api/cms/entry

Interface EntryBeforeMoveEventHandler.Interface:

Types:

EntryBeforePublishEventHandler
anchor

Event Handler Abstraction — imported from webiny/api/cms/entry

Interface EntryBeforePublishEventHandler.Interface:

Types:

EntryBeforeRepublishEventHandler
anchor

Event Handler Abstraction — imported from webiny/api/cms/entry

Interface EntryBeforeRepublishEventHandler.Interface:

Types:

EntryBeforeRestoreFromBinEventHandler
anchor

Event Handler Abstraction — imported from webiny/api/cms/entry

Interface EntryBeforeRestoreFromBinEventHandler.Interface:

Types:

EntryBeforeUnpublishEventHandler
anchor

Event Handler Abstraction — imported from webiny/api/cms/entry

Interface EntryBeforeUnpublishEventHandler.Interface:

Event payload EntryBeforeUnpublishEventPayload:

Types:

EntryBeforeUpdateEventHandler
anchor

Event Handler Abstraction — imported from webiny/api/cms/entry

Interface EntryBeforeUpdateEventHandler.Interface:

Event payload EntryBeforeUpdateEventPayload:

Types:

EntryRevisionAfterCreateEventHandler
anchor

Event Handler Abstraction — imported from webiny/api/cms/entry

Interface EntryRevisionAfterCreateEventHandler.Interface:

Types:

EntryRevisionAfterDeleteEventHandler
anchor

Event Handler Abstraction — imported from webiny/api/cms/entry

Interface EntryRevisionAfterDeleteEventHandler.Interface:

Types:

EntryRevisionBeforeCreateEventHandler
anchor

Event Handler Abstraction — imported from webiny/api/cms/entry

Interface EntryRevisionBeforeCreateEventHandler.Interface:

Types:

EntryRevisionBeforeDeleteEventHandler
anchor

Event Handler Abstraction — imported from webiny/api/cms/entry

Interface EntryRevisionBeforeDeleteEventHandler.Interface:

Types:

Services
anchor

CmsSortMapper
anchor

Abstraction — imported from webiny/api/cms/entry

Interface CmsSortMapper.Interface:

Types:

CmsWhereMapper
anchor

Abstraction — imported from webiny/api/cms/entry

Interface CmsWhereMapper.Interface:

Types:

Types & Classes
anchor

CmsEntry
anchor

Type — imported from webiny/api/cms/entry

A content entry definition for and from the database.

@category Database model @category CmsEntry

CmsEntryValues
anchor

Type — imported from webiny/api/cms/entry

A content entry values definition for and from the database.

@category Database model @category CmsEntry

EntryId
anchor

Class — imported from webiny/api/cms/entry