Retrieves a data collection by ID.
ID of the collection to retrieve.
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
List of specific field names to return, if empty all fields are returned. Affects all returned collections
Details of the collection requested.
Details of collections referenced by the collection requested.
Only populated when includeReferencedCollections
is true
in the request.
curl -X GET \
'https://www.wixapis.com/wix-data/v2/collections/my-first-collection' \
-H 'Content-Type: application/json' \
-H 'Authorization: <AUTH>'
{
"collection": {
"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"
},
"referencedCollections": []
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.