--- title: "View" slug: "server-api-ticketing-view" updated: 2022-06-16T07:35:12Z published: 2022-06-16T07:35:12Z canonical: "developer.comm100.com/server-api-ticketing-view" --- > ## Documentation Index > Fetch the complete documentation index at: https://developer.comm100.com/llms.txt > Use this file to discover all available pages before exploring further. # View ## View View of the ticket. - `Views` - Views Manage - `GET ticketing/views` - [Get the list of Views](/docs/server-api-ticketing-view#get-the-list-of-views) - `GET ticketing/views/{id}` - [Get a single View](/docs/server-api-ticketing-view#get-a-single-view) - `POST ticketing/views` - [Create a new View](/docs/server-api-ticketing-view#create-a-new-view) - `PUT ticketing/views/{id}` - [Update the View](/docs/server-api-ticketing-view#update-the-view) - `DELETE ticketing/views/{id}` - [Remove the View](/docs/server-api-ticketing-view#remove-the-view) ### View JSON Format View is represented as simple flat JSON objects with the following keys: | Name | Type | Description | | --- | --- | --- | | `id` | guid | Id of the view. | | `name` | string | Name of the view. | | `isPrivate` | bool | Whether the view belongs to a specific agent or not. | | `createdById` | guid | Id of the agent who created the view. | | `logicalExpression` | string | Logical expression to match the conditions i.e., (1 or 2 or 3) and (4 and 5). | | `conditionMetType` | string | How conditions are matched. Allowed values are "any", "all", "logicalExpression". | | `conditions` | [conditions[]](/docs/server-api-ticketing-view#view-condition-json-format) | Reference to View Condition. | ### View Condition JSON Format: | Name | Type | Description | | --- | --- | --- | | `id` | guid | Id of the condition. | | `viewId` | guid | Id of the view which the concition belongs to. | | `fieldName` | string | Name of the ticketing field you want to set value for. | | `operator` | string | How value for this condition field is matched. Allowed values are "contains", "notContains", "is", "isNot", "isMoreThan", "isLessThan", "before", "after", "regularExpression", "isOneOf", "isNotIn". | | `value` | string | Value of the condition field. | | `order` | integer | Order of the condition. | ### Get the list of Views `GET ticketing/views` - #### Parameters: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `include` | string | query | no | Allowed value is "viewCondition". | - #### Response: An array of [View](/docs/server-api-ticketing-view#view-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/ticketing/views \ -X 'GET' \ -H 'Authorization: Bearer {access_token}' \ ``` Response: HTTP/1.1 200 OK ``` [ { "id": "4d103607-f113-4884-8f7e-735f6fefdbf9", "name": "My Open", "isPrivate": false, "createdById": "bdf96bad-890f-4af5-8f4e-42d2cc29e61b", "logicalExpression": "", "conditionMetType": "all", "conditions": [ { "id": "7cee5281-95b8-43cc-8c1e-f6424d69f002", "viewId": "4d103607-f113-4884-8f7e-735f6fefdbf9", "fieldName": "{!Ticket.Status}", "operator": "isNot", "value": "resolved", "order": 1 } ] } ] ``` ### Get a single View `GET ticketing/views/{id}` - #### Parameters: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `include` | string | query | no | Allowed value is "viewCondition". | - #### Response: [View](/docs/server-api-ticketing-view#view-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/ticketing/views/4d103607-f113-4884-8f7e-735f6fefdbf9 \ -X 'GET' \ -H 'Authorization: Bearer {access_token}' \ ``` Response: HTTP/1.1 200 OK ``` { "id": "4d103607-f113-4884-8f7e-735f6fefdbf9", "name": "My Open", "isPrivate": false, "createdById": "bdf96bad-890f-4af5-8f4e-42d2cc29e61b", "logicalExpression": "", "conditionMetType": "all", "conditions": [ { "id": "7cee5281-95b8-43cc-8c1e-f6424d69f002", "viewId": "4d103607-f113-4884-8f7e-735f6fefdbf9", "fieldName": "{!Ticket.Status}", "operator": "isNot", "value": "resolved", "order": 1 } ] } ``` ### Create a new View `POST ticketing/views` - #### Parameters: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `name` | string | body | yes | Name of the view. | | `isPrivate` | bool | body | yes | Whether the view belongs to a specific agent or not. | | `createdById` | guid | body | yes | Id of the agent who created the view. | | `logicalExpression` | string | body | no | Logical expression to match the conditions i.e., (1 or 2 or 3) and (4 and 5). | | `conditionMetType` | string | body | yes | How conditions are matched. Allowed values are "any", "all", "logicalExpression". | | `conditions` | [conditions[]](/docs/server-api-ticketing-view#view-condition-json-format) | body | no | The list of condition. | - #### Response: [View](/docs/server-api-ticketing-view#view-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/ticketing/views \ -X 'POST' \ -H 'Authorization: Bearer {access_token}' \ -H 'Content-Type: application/json' \ -D '{"name":"My Open","isPrivate":false,"createdById":"bdf96bad-890f-4af5-8f4e-42d2cc29e61b","logicalExpression":"","conditionMetType":"all","conditions":[{"fieldName":"{!Ticket.Status}","operator":"isNot","value":"resolved","order":1}]}' ``` Response: HTTP/1.1 201 Created ``` { "id": "4d103607-f113-4884-8f7e-735f6fefdbf9", "name": "My Open", "isPrivate": false, "createdById": "bdf96bad-890f-4af5-8f4e-42d2cc29e61b", "logicalExpression": "", "conditionMetType": "all", "conditions": [ { "id": "7cee5281-95b8-43cc-8c1e-f6424d69f002", "viewId": "4d103607-f113-4884-8f7e-735f6fefdbf9", "fieldName": "{!Ticket.Status}", "operator": "isNot", "value": "resolved", "order": 1 } ] } ``` ### Update the View `PUT ticketing/views/{id}` - #### Parameters: | Name | Type | in | Required | Description | | --- | --- | --- | --- | --- | | `name` | string | body | yes | Name of the view. | | `isPrivate` | bool | body | yes | Whether the view belongs to a specific agent or not. | | `createdById` | guid | body | yes | Id of the agent who created the view. | | `logicalExpression` | string | body | no | Logical expression to match the conditions i.e., (1 or 2 or 3) and (4 and 5). | | `conditionMetType` | string | body | yes | How conditions are matched. Allowed values are "any", "all", "logicalExpression". | | `conditions` | [conditions[]](/docs/server-api-ticketing-view#view-condition-json-format) | body | no | The list of condition. | - #### Response: [View](/docs/server-api-ticketing-view#view-json-format) - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/ticketing/views/4d103607-f113-4884-8f7e-735f6fefdbf9 \ -X 'PUT' \ -H 'Authorization: Bearer {access_token}' \ -H 'Content-Type: application/json' \ -D '{"name":"My Open","isPrivate":false,"createdById":"bdf96bad-890f-4af5-8f4e-42d2cc29e61b","logicalExpression":"","conditionMetType":"all","conditions":[{"fieldName":"{!Ticket.Status}","operator":"isNot","value":"resolved","order":1}]}' ``` Response: HTTP/1.1 200 OK ``` { "id": "4d103607-f113-4884-8f7e-735f6fefdbf9", "name": "My Open", "isPrivate": false, "createdById": "bdf96bad-890f-4af5-8f4e-42d2cc29e61b", "logicalExpression": "", "conditionMetType": "all", "conditions": [ { "id": "7cee5281-95b8-43cc-8c1e-f6424d69f002", "viewId": "4d103607-f113-4884-8f7e-735f6fefdbf9", "fieldName": "{!Ticket.Status}", "operator": "isNot", "value": "resolved", "order": 1 } ] } ``` ### Remove the View `DELETE ticketing/views/{id}` - #### Parameters: No Parameters - #### Response: No Content - #### Example Sample Request: ``` curl https://api11.comm100.io/v4/ticketing/views/4d103607-f113-4884-8f7e-735f6fefdbf9 \ -X 'DELETE' \ -H 'Authorization: Bearer {access_token}' \ ``` Response: HTTP/1.1 204 No Content