Read what a surface's views can filter, sort, group and show

Returns one section of a surface's view capabilities. overview (the default) reports totals, whether search is supported, the view modes and the writable state keys. filters lists filterable fields with their operators and valid values (select filters use stable option IDs), sorting the sortable fields, grouping the groupable fields, and appearance the columns available for columnOrder, columnWidths and hiddenColumns. Sections are paged with page and pageSize (1 to 25, default 10) and can be narrowed with query.

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 personal: only the caller's own views are listed or changed.

POST
/v1/data-views/config

Authorization

apiKeyAuth
x-api-key<token>

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/config" \  -H "Content-Type: application/json" \  -d '{    "surfaceKey": "records:0b8c7d6e-5f4a-4b3c-9d2e-1f0a9b8c7d6e",    "section": "filters",    "page": 1,    "pageSize": 25  }'
{
  "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",
  "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
  }
}
Empty