View
  • 16 Jun 2022
  • 3 Minutes to read
  • Dark
    Light

View

  • Dark
    Light

Article summary

View

View of the ticket.

View JSON Format

View is represented as simple flat JSON objects with the following keys:

NameTypeDescription
idguidId of the view.
namestringName of the view.
isPrivateboolWhether the view belongs to a specific agent or not.
createdByIdguidId of the agent who created the view.
logicalExpressionstringLogical expression to match the conditions i.e., (1 or 2 or 3) and (4 and 5).
conditionMetTypestringHow conditions are matched. Allowed values are "any", "all", "logicalExpression".
conditionsconditions[]Reference to View Condition.

View Condition JSON Format:

NameTypeDescription
idguidId of the condition.
viewIdguidId of the view which the concition belongs to.
fieldNamestringName of the ticketing field you want to set value for.
operatorstringHow value for this condition field is matched. Allowed values are "contains", "notContains", "is", "isNot", "isMoreThan", "isLessThan", "before", "after", "regularExpression", "isOneOf", "isNotIn".
valuestringValue of the condition field.
orderintegerOrder of the condition.

Get the list of Views

GET ticketing/views

  • Parameters:

NameTypeinRequiredDescription
includestringquerynoAllowed 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:

NameTypeinRequiredDescription
includestringquerynoAllowed value is "viewCondition".
  • Response:

View

  • 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:

NameTypeinRequiredDescription
namestringbodyyesName of the view.
isPrivateboolbodyyesWhether the view belongs to a specific agent or not.
createdByIdguidbodyyesId of the agent who created the view.
logicalExpressionstringbodynoLogical expression to match the conditions i.e., (1 or 2 or 3) and (4 and 5).
conditionMetTypestringbodyyesHow conditions are matched. Allowed values are "any", "all", "logicalExpression".
conditionsconditions[]bodynoThe list of condition.
  • Response:

View

  • 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:

NameTypeinRequiredDescription
namestringbodyyesName of the view.
isPrivateboolbodyyesWhether the view belongs to a specific agent or not.
createdByIdguidbodyyesId of the agent who created the view.
logicalExpressionstringbodynoLogical expression to match the conditions i.e., (1 or 2 or 3) and (4 and 5).
conditionMetTypestringbodyyesHow conditions are matched. Allowed values are "any", "all", "logicalExpression".
conditionsconditions[]bodynoThe list of condition.
  • Response:

View

  • 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?

What's Next