Views
A view consists of one or more conditions that define a collection of tickets to display. If the conditions are met, the ticket is included in the view. For example, a view can display all open tickets that were last updated more than 24 hours ago.
For more information, see Creating views to manage ticket workflow.
JSON format
Views are represented as JSON objects with the following properties:
| Name | Type | Read-only | Mandatory | Description |
|---|---|---|---|---|
| active | boolean | false | false | Whether the view is active |
| conditions | object | false | false | Describes how the view is constructed. See Conditions reference |
| created_at | string | true | false | The time the view was created |
| default | boolean | true | false | If true, the view is a default view |
| description | string | false | false | The description of the view |
| execution | object | false | false | Describes how the view should be executed. See Execution |
| id | integer | true | false | Automatically assigned when created |
| position | integer | false | false | The position of the view |
| restriction | object | false | false | Who may access this view. Is null when everyone in the account can access it |
| title | string | false | false | The title of the view |
| updated_at | string | true | false | The time the view was last updated |
Execution
A view's execution object is a read-only object that describes how to display a collection of tickets in the view.
| Name | Type | Comment |
|---|---|---|
| group_by, sort_by | string | Sort or group the tickets by a column in the View columns table. The subject and submitter columns are not supported |
| group_order, sort_order | string | Either "asc" or "desc" |
| columns | array | The ticket fields to display. Custom fields have an id, title, type, and url referencing the ticket field |
| group | object | When present, the structure indicating how the tickets are grouped |
| sort | object | The column structure of the field used for sorting |
Example
{"execution": {"columns": [{ "id": "status", "title": "Status" },{ "id": "updated", "title": "Updated" },{"id": 5, "title": "Account", "type": "text","url": "https://example.zendesk.com/api/v2/ticket_fields/5"},...]"group": { "id": "status", "title"