Read one saved view's state
Returns one view with its complete state: filters, search term, sort, page size, view mode (table or card), grouping with its group summaries, column order, column widths and hidden columns. viewKey __all__ reads the All view. Read immediately before an update.
Requires: read access to the surface's page: read access to the record type for a records:<typeId> surface, read on users for Members and Roles, read all on api for Webhooks, read all on activityLog for Activity, read on routines for Routines, and read on inboxMessages plus the messaging entitlement for Inbox. Dashboard and record timeline views need no extra permission. Saved views are private until shared: list also returns views teammates shared with the caller (marked with sharedBy), which can be selected but only their owner can change, delete or share.
Authorization
apiKeyAuth API key authentication. Create an API key in your user profile and include it in the x-api-key header.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://customermates.com/api/v1/data-views/read" \ -H "Content-Type: application/json" \ -d '{ "surfaceKey": "records:0b8c7d6e-5f4a-4b3c-9d2e-1f0a9b8c7d6e", "viewKey": "6f1c2d3e-4b5a-4c6d-8e7f-1a2b3c4d5e6f" }'{
"action": "surfaces",
"surfaceKey": "users-card-store",
"label": "string",
"path": "string",
"section": "overview",
"total": 9007199254740991,
"page": 1,
"pageSize": 1,
"totalPages": 1,
"items": [
{
"id": "string",
"surfaceKey": "users-card-store",
"name": "string",
"label": "string",
"path": "string",
"position": -9007199254740991,
"state": {
"filters": [
{
"field": "string",
"operator": "equals",
"value": "string"
}
],
"searchTerm": "string",
"sortDescriptor": {
"field": "string",
"direction": "asc"
},
"pageSize": 5,
"viewMode": "table",
"grouping": {
"field": "string",
"bucket": "day",
"hidden": [
"string"
],
"hideEmpty": true,
"summaries": [
{
"fieldId": "84922011-b03d-4966-bc95-c5b49bc2e342",
"aggregation": "sum"
}
]
},
"columnOrder": [
"string"
],
"columnWidths": {
"property1": 0,
"property2": 0
},
"hiddenColumns": [
"string"
],
"calendar": {
"dateFieldId": "0e1d975e-73f3-487e-ac80-14e9e130620e",
"endDateFieldId": "258b375b-74ed-4b5e-99a1-3f54c6fea6e5",
"colorFieldId": "fb3508bd-25c6-4412-a3bc-eb958a7aa449",
"mode": "month"
}
},
"field": "string",
"operators": [
"string"
],
"property1": null,
"property2": null
}
],
"totals": {
"property1": 9007199254740991,
"property2": 9007199254740991
},
"supportsSearch": true,
"viewModes": [
"table"
],
"writableStateFields": [
"string"
],
"activeViewKey": "string",
"allState": {
"filters": [
{
"field": "string",
"operator": "equals",
"value": "string"
}
],
"searchTerm": "string",
"sortDescriptor": {
"field": "string",
"direction": "asc"
},
"pageSize": 5,
"viewMode": "table",
"grouping": {
"field": "string",
"bucket": "day",
"hidden": [
"string"
],
"hideEmpty": true,
"summaries": [
{
"fieldId": "84922011-b03d-4966-bc95-c5b49bc2e342",
"aggregation": "sum"
}
]
},
"columnOrder": [
"string"
],
"columnWidths": {
"property1": 0,
"property2": 0
},
"hiddenColumns": [
"string"
],
"calendar": {
"dateFieldId": "0e1d975e-73f3-487e-ac80-14e9e130620e",
"endDateFieldId": "258b375b-74ed-4b5e-99a1-3f54c6fea6e5",
"colorFieldId": "fb3508bd-25c6-4412-a3bc-eb958a7aa449",
"mode": "month"
}
},
"viewKey": "__all__",
"id": "string",
"name": "string",
"position": -9007199254740991,
"state": {
"filters": [
{
"field": "string",
"operator": "equals",
"value": "string"
}
],
"searchTerm": "string",
"sortDescriptor": {
"field": "string",
"direction": "asc"
},
"pageSize": 5,
"viewMode": "table",
"grouping": {
"field": "string",
"bucket": "day",
"hidden": [
"string"
],
"hideEmpty": true,
"summaries": [
{
"fieldId": "84922011-b03d-4966-bc95-c5b49bc2e342",
"aggregation": "sum"
}
]
},
"columnOrder": [
"string"
],
"columnWidths": {
"property1": 0,
"property2": 0
},
"hiddenColumns": [
"string"
],
"calendar": {
"dateFieldId": "0e1d975e-73f3-487e-ac80-14e9e130620e",
"endDateFieldId": "258b375b-74ed-4b5e-99a1-3f54c6fea6e5",
"colorFieldId": "fb3508bd-25c6-4412-a3bc-eb958a7aa449",
"mode": "month"
}
},
"link": "string",
"selected": true,
"deleted": true,
"proposed": true,
"trashBatchId": "f9ad794f-414e-4d2a-bff7-4eedbaa196bb",
"visibility": "private",
"roleIds": [
"string"
],
"publicLink": {
"url": "string",
"expiresAt": "2019-08-24",
"openCount": -9007199254740991,
"lastOpenedAt": "string",
"createdAt": "string"
},
"property1": null,
"property2": null
}{
"error": {
"kind": "validation",
"issues": [
{
"code": "string",
"path": [
"string"
],
"message": "string",
"customCode": "recordNotFound",
"entitlement": "string"
}
],
"retryable": true
}
}{
"error": {
"kind": "validation",
"issues": [
{
"code": "string",
"path": [
"string"
],
"message": "string",
"customCode": "recordNotFound",
"entitlement": "string"
}
],
"retryable": true
}
}{
"error": {
"kind": "validation",
"issues": [
{
"code": "string",
"path": [
"string"
],
"message": "string",
"customCode": "recordNotFound",
"entitlement": "string"
}
],
"retryable": true
}
}{
"error": {
"kind": "validation",
"issues": [
{
"code": "string",
"path": [
"string"
],
"message": "string",
"customCode": "recordNotFound",
"entitlement": "string"
}
],
"retryable": true
}
}{
"error": {
"kind": "validation",
"issues": [
{
"code": "string",
"path": [
"string"
],
"message": "string",
"customCode": "recordNotFound",
"entitlement": "string"
}
],
"retryable": true
}
}{
"error": {
"kind": "validation",
"issues": [
{
"code": "string",
"path": [
"string"
],
"message": "string",
"customCode": "recordNotFound",
"entitlement": "string"
}
],
"retryable": true
}
}{
"error": {
"kind": "validation",
"issues": [
{
"code": "string",
"path": [
"string"
],
"message": "string",
"customCode": "recordNotFound",
"entitlement": "string"
}
],
"retryable": true
}
}