View
- 16 Jun 2022
- 3 Minutes to read
- Print
- DarkLight
View
- Updated on 16 Jun 2022
- 3 Minutes to read
- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
View
View of the ticket.
Views
- Views ManageGET ticketing/views
- Get the list of ViewsGET ticketing/views/{id}
- Get a single ViewPOST ticketing/views
- Create a new ViewPUT ticketing/views/{id}
- Update the ViewDELETE ticketing/views/{id}
- 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[] | 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
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:
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[] | body | no | The list of condition. |
Response:
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[] | body | no | The list of condition. |
Response:
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
Was this article helpful?