> Portal Navigation: > > - Append `.md` to any URL under `https://dev.wix.com/docs/` to get its markdown version. > - Pages are either content pages (article or reference text) or menu pages (a list of links to child pages). > - To get a menu page, truncate any URL to a parent path and append `.md` (e.g. `https://dev.wix.com/docs/sdk.md`, `https://dev.wix.com/docs/sdk/core-modules.md`). > - Top-level index of all portals: https://dev.wix.com/docs/llms.txt > - Full concatenated docs: https://dev.wix.com/docs/llms-full.txt # Resource: Data Collections # Type: Data Collection Object # Link: https://dev.wix.com/docs/api-reference/business-solutions/cms/collection-management/data-collections/data-collection-object.md ## Description: A data collection determines the structure of data to be stored in a database. ## Schema: ```json Type: Data Collection Object | type: DataCollection Description: A data collection determines the structure of data to be stored in a database. - name: id | type: string | description: [Collection ID](https://dev.wix.com/docs/develop-websites-sdk/code-your-site/work-with-data/introduction/about-collections.md#collection-ids). For example, `my-first-collection`. For [app collections](https://dev.wix.com/docs/api-reference/business-solutions/cms/collection-management/wix-app-collections/introduction.md), use `AppName/CollectionName`. - name: collectionType | type: string | description: Collection type. Indicates how the collection was created and how it is stored. enum: NATIVE, WIX_APP, BLOCKS_APP, EXTERNAL - name: ownerAppId | type: string | description: ID of the app that defined this collection. For collections defined by Wix users, this value is null. - name: value | type: string | description: - name: maxPageSize | type: number | description: 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. - name: value | type: number | description: - name: displayName | type: string | description: Collection's display name as shown in the CMS. For example, `My First Collection`. - name: defaultDisplayOrder | type: Sort | description: Default item sorting order when a query doesn't specify one. - name: fieldKey | type: string | description: Field to sort by. - name: direction | type: string | description: Sort order. Use `ASC` for ascending order or `DESC` for descending order. Default: `ASC` enum: ASC, DESC - name: displayNamespace | type: string | description: 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 Wix apps. - name: displayField | type: string | description: Field whose value the CMS displays to represent the collection item when referenced in a different collection. - name: capabilities | type: CollectionCapabilities | description: Capabilities the collection supports. Capabilities are set by default. Values depend on the collection type. - name: dataOperations | type: Array | description: Data operations the collection supports. The listed operations can be performed on data the collection contains. > **Note**: The `PATCH` and `BULK_PATCH` operations aren't currently supported. enum: AGGREGATE, BULK_INSERT, BULK_REMOVE, BULK_SAVE, BULK_UPDATE, COUNT, DISTINCT, FIND, GET, INSERT, INSERT_REFERENCE, IS_REFERENCED, QUERY_REFERENCED, REMOVE, REMOVE_REFERENCE, REPLACE_REFERENCES, SAVE, TRUNCATE, UPDATE, PATCH, BULK_PATCH - name: collectionOperations | type: Array | description: Collection operations supported. The listed operations can be performed on the collection itself. enum: UPDATE, REMOVE - name: indexLimits | type: IndexLimits | description: Maximum number of indexes for the collection. - name: regular | type: number | description: Maximum number of regular (non-unique) indexes allowed for this collection. - name: unique | type: number | description: Maximum number of unique indexes allowed for this collection. - name: total | type: number | description: Maximum number of regular and unique indexes allowed for this collection. - name: fields | type: Array | description: Collection's field structure. - name: key | type: string | description: Unique identifier for the field. For example, `firstName`. - name: displayName | type: string | description: Field's display name when displayed in the CMS. For example, `First Name`. - name: type | type: string | description: Field's data type. Learn more about [data types in Wix Data](https://dev.wix.com/docs/rest/business-solutions/cms/data-types-in-wix-data.md). enum: TEXT, NUMBER, DATE, DATETIME, IMAGE, BOOLEAN, DOCUMENT, URL, RICH_TEXT, VIDEO, ANY, ARRAY_STRING, ARRAY_DOCUMENT, AUDIO, TIME, LANGUAGE, RICH_CONTENT, MEDIA_GALLERY, ADDRESS, PAGE_LINK, REFERENCE, MULTI_REFERENCE, OBJECT, ARRAY, LEGACY_TIME, LEGACY_BOOK, LEGACY_EXTERNAL_URL, LEGACY_BROKEN_REFERENCE, LEGACY_IMAGE, LEGACY_COLOR, LEGACY_EXTERNAL_VIDEO, EMAIL - name: typeMetadata | type: TypeMetadata | description: Metadata for complex data types. This property only exists for references, multi-references, objects, and arrays. - name: systemField | type: boolean | description: Whether the field is a system field. - name: capabilities | type: FieldCapabilities | description: Capabilities the field supports. - name: sortable | type: boolean | description: Whether the collection can be sorted by this field. Default: `false` - name: queryOperators | type: Array | description: Query operators that can be used for this field. - name: encrypted | type: boolean | description: Whether the field is encrypted. - name: description | type: string | description: Field description. - name: readOnly | type: boolean | description: Whether the field is read-only. A read-only field can't be changed. Default: `false` - name: value | type: boolean | description: - name: immutable | type: boolean | description: Whether the field is immutable. An immutable field can be set once, but then cannot be updated. Default: `false` - name: required | type: boolean | description: Whether the field is required. Default: `false` - name: plugins | type: Array | description: Additional optional plugins for the field. - name: type | type: string | description: - name: condition | type: FieldCondition | description: This indicates that this fields is conditional and is not retrieved by default. - name: groupName | type: string | description: If `group_name` is set, this field will not be present in query results. To retrieve this field, pass `group_name` value to `includeFieldGroups` parameter in query operations. - name: permission | type: string | description: If present, the field may be omitted from the results, if the requester lacks sufficient permissions to access data stored in the field. - name: permissions | type: Permissions | description: [Permissions](https://dev.wix.com/docs/api-reference/business-solutions/cms/collection-management/data-collections/introduction.md#permissions) required to access and modify collection items, defined by the lowest role needed to perform each action. - name: insert | type: string | description: Role required to insert items into the collection. Default: `CMS_EDITOR` enum: ADMIN, SITE_MEMBER_AUTHOR, SITE_MEMBER, ANYONE - name: update | type: string | description: Role required to update collection items. Default: `CMS_EDITOR` - name: remove | type: string | description: Role required to remove items from the collection. Default: `CMS_EDITOR` - name: read | type: string | description: Role required to read collection items. Default: `SITE_MEMBER_AUTHOR` - name: revision | type: string | description: Collection's current revision number, which increments each time the collection is updated. For an update operation to succeed, you must specify the latest revision number. - name: value | type: string | description: - name: plugins | type: Array | description: Plugins the collection uses. Plugins apply additional capabilities to the collection or extend its functionality. - name: type | type: string | description: Plugin type. enum: PUBLISH, SINGLE_ITEM, URLIZED, GRIDAPPLESS, MULTILINGUAL, SHARED, EDITABLE_PAGE_LINK, CMS - name: pagingModes | type: Array | description: Paging modes the collection supports. In native collections, offset-based paging is supported by default. enum: OFFSET, CURSOR - name: createdDate | type: string | description: Date the collection was created. - name: seconds | type: string | description: - name: nanos | type: number | description: - name: updatedDate | type: string | description: Date the collection was last updated. ```