GET

List Data Collections


Retrieves a list of all data collections associated with the site or project.

By default, the list is ordered by ID in ascending order.

Authentication

You can only call this method when authenticated as a Wix app or Wix user identity.

Permissions
Manage Data Collections
Manage All Data Resources
Learn more about app permissions.
Endpoint
GET
https://www.wixapis.com/wix-data/v2/collections

Query Params
sort.fieldNamestring

Name of the field to sort by.


sort.orderstring

Sort order.


paging.limitintegerminimum 0format int32

Number of items to load.


paging.offsetintegerminimum 0format int32

Number of items to skip in the current sort order.


consistentReadboolean

Whether to retrieve data from the primary database instance. This decreases performance but ensures data retrieved is up to date even immediately after an update. Learn more about Wix Data and eventual consistency.

Default: false


fieldsArray <string>

List of specific field names to return, if empty all fields are returned. Affects all returned collections

Response Object
collectionsArray <DataCollection>

List of collections.


pagingMetadataPagingMetadata

Paging information.

Request
cURL
curl -X GET \ 'https://www.wixapis.com/wix-data/v2/collections' \ -H 'Content-Type: application/json' \ -H 'Authorization: <AUTH>'
Response
JSON
{ "collections": [ { "id": "my-second-collection", "collectionType": "NATIVE", "displayField": "name", "capabilities": { "dataOperations": [ "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" ], "collectionOperations": ["UPDATE", "REMOVE"] }, "fields": [ { "key": "title", "displayName": "Book title", "type": "TEXT" }, { "key": "author_ref", "displayName": "Book author", "type": "REFERENCE", "typeMetadata": { "reference": { "referencedCollection": "my-first-collection" } } } ], "permissions": { "insert": "ADMIN", "update": "ADMIN", "remove": "ADMIN", "read": "ADMIN" }, "revision": "1", "plugins": [], "pagingModes": ["OFFSET"], "createdDate": "2022-09-19T15:15:59.099Z", "updatedDate": "2022-09-19T15:15:59.099Z" }, { "id": "my-first-collection", "collectionType": "NATIVE", "displayName": "My First Collection", "displayField": "name", "capabilities": { "dataOperations": [ "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" ], "collectionOperations": ["UPDATE", "REMOVE"] }, "fields": [ { "key": "name", "displayName": "First Name", "type": "TEXT", "systemField": false, "capabilities": { "sortable": true, "queryOperators": [ "EQ", "LT", "GT", "NE", "LTE", "GTE", "STARTS_WITH", "ENDS_WITH", "CONTAINS", "HAS_SOME", "HAS_ALL", "EXISTS", "URLIZED" ] }, "encrypted": false }, { "key": "age", "displayName": "Age", "type": "NUMBER", "systemField": false, "capabilities": { "sortable": true, "queryOperators": [ "EQ", "LT", "GT", "NE", "LTE", "GTE", "STARTS_WITH", "ENDS_WITH", "CONTAINS", "HAS_SOME", "HAS_ALL", "EXISTS", "URLIZED" ] }, "encrypted": false }, { "key": "_id", "displayName": "ID", "type": "TEXT", "systemField": true, "capabilities": { "sortable": true, "queryOperators": [ "EQ", "LT", "GT", "NE", "LTE", "GTE", "STARTS_WITH", "ENDS_WITH", "CONTAINS", "HAS_SOME", "HAS_ALL", "EXISTS", "URLIZED" ] }, "encrypted": false }, { "key": "_owner", "displayName": "Owner", "type": "TEXT", "systemField": true, "capabilities": { "sortable": true, "queryOperators": [ "EQ", "LT", "GT", "NE", "LTE", "GTE", "STARTS_WITH", "ENDS_WITH", "CONTAINS", "HAS_SOME", "HAS_ALL", "EXISTS", "URLIZED" ] }, "encrypted": false }, { "key": "_createdDate", "displayName": "Created Date", "type": "DATETIME", "systemField": true, "capabilities": { "sortable": true, "queryOperators": [ "EQ", "LT", "GT", "NE", "LTE", "GTE", "STARTS_WITH", "ENDS_WITH", "CONTAINS", "HAS_SOME", "HAS_ALL", "EXISTS", "URLIZED" ] }, "encrypted": false }, { "key": "_updatedDate", "displayName": "Updated Date", "type": "DATETIME", "systemField": true, "capabilities": { "sortable": true, "queryOperators": [ "EQ", "LT", "GT", "NE", "LTE", "GTE", "STARTS_WITH", "ENDS_WITH", "CONTAINS", "HAS_SOME", "HAS_ALL", "EXISTS", "URLIZED" ] }, "encrypted": false } ], "permissions": { "insert": "ADMIN", "update": "ADMIN", "remove": "ADMIN", "read": "ADMIN" }, "revision": "1", "plugins": [], "pagingModes": ["OFFSET"], "createdDate": "2022-09-19T15:10:56.603Z", "updatedDate": "2022-09-19T15:10:56.603Z" } ], "pagingMetadata": { "count": 2, "offset": 0, "total": 2, "tooManyToCount": false } }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?