Data Collection Object


A data collection determines the structure of data to be stored in a database.

Properties
idstring

Collection ID. For example, my-first-collection. May include a namespace.


collectionTypestringRead-only

Collection type. Indicates how the collection was created and is stored.

  • NATIVE: User-created collection.
  • WIX_APP: Collection created by a Wix app, including starter collections created when a Wix app is installed.
  • BLOCKS_APP: Collection created by a Wix Blocks app.
  • EXTERNAL: Collection located in externally connected storage.

ownerAppIdstringRead-onlyformat GUID

ID of the app that defined this collection. For user-defined collections, this value is null.


maxPageSizeintegerRead-onlyformat int32

Maximum number of items returned in a single query, based on the underlying storage. Native collections have a maximum page size of 1000 for offset-based queries or 100 for cursor-based queries. External collections' maximum page size defaults to 50, but an external provider can set any maximum value up to 1000.


displayNamestring

Collection's display name as shown in the CMS. For example, My First Collection.


defaultDisplayOrderDefaultDisplayOrderRead-only

Indicates how the collection's items are sorted by default when a query doesn't specify an order.


displayNamespacestringRead-only

UI-friendly namespace of the Wix app with which the data collection is associated, such as Stores or Bookings. Empty for all data collections not owned by internal Wix apps.


displayFieldstring

The field whose value the CMS displays to represent the collection item when referenced in a different collection.


capabilitiesCapabilitiesRead-only

Capabilities the collection supports.


fieldsArray <Field>

Collection's field structure.


permissionsPermissions

Levels of permission for accessing and modifying data, defined by lowest role needed to perform each action.


revisionintegerRead-onlyformat int64

Collection's current revision number, which increments each time the collection is updated. For an update operation to succeed, you must pass the latest revision number.


pluginsArray <Plugin>

All plugins the collection uses. Plugins apply additional capabilities to the collection or extend its functionality.


pagingModesArray <string>Read-only

All paging modes the collection supports. In native collections, offset-based paging is supported by default.


createdDatestringRead-onlyformat date-time

Date the collection was created.


updatedDatestringRead-onlyformat date-time

Date the collection was last updated.

Did this help?