POST /api/v2/views

Allowed For

JSON Format

The JSON format consists of one property, a view object that lists the values to set when the view is created.

Note: The request must include at least one condition in the all array that checks one of the following fields: status, type, group_id, assignee_id, or requester_id.

NameDescription
titleRequired. The title of the view
allRequired. An array of one or more conditions. A ticket must meet all of them to be included in the view. See Conditions reference
anyAn array of one or more conditions. A ticket must meet any of them to be included in the view. See Conditions reference
descriptionThe description of the view
activeAllowed values are true or false. Determines if the view is displayed or not
outputAn object that specifies the columns to display. Example: "output": {"columns": ["status", "description", "priority"]}. See View columns
restrictionAn object that describes who can access the view. To give all agents access to the view, omit this property

The restriction object has the following properties.

NameComment
typeAllowed values are "Group" or "User"
idThe numeric ID of a single group or user
idsThe numeric IDs of a single or more groups. Recommended for "Group" type

If type is "Group", the ids property is the preferred method of specifying the group id or ids.

Example Request Body

{
  "view": {
    "title": "Kelly's tickets",
    "raw_title": "{{dc.tickets_assigned_to_kelly}}",
    "description": "Tickets that are assigned to Kelly",
    "active": true,
    "position": 3,
    "restriction": {
      "type": "User",
      "id": "213977756"
    },
    "all": [
      {
        "field": "status",
        "operator": "less_than",
        "value": "solved"
      },
      {
        "field": "group_id",
        "operator": "is",
        "value": "24000932"
      },
      {
        "field": "custom_fields_360011872073",
        "operator": "is",
        "value": "Canada"
      },
      ...
    ],
    "output": {
      "columns": ["status", "requester", "assignee"],
      "group_by": "assignee",
      "group_order": "desc",
      "sort_by": "status",
      "sort_order": "desc"
    }
  }
}

View columns

The output request parameter lets you specify what columns to include in the view in the agent interface. Example: "output": {"columns": ["status", "description", "priority"]}. The following table lists possible columns for views in the agent UI and the corresponding values in the columns array.

For custom fields, specify the id of the custom field in the columns array.

You can specify a total of 10 columns to a view.

View column title in UIValue
Assignedassigned
Assigneeassignee
Due Datedue_date
Groupgroup
IDnice_id
Updatedupdated
Assignee updatedupdated_assignee
Requester updatedupdated_requester
Updaterupdated_by_type
Organizationorganization
Prioritypriority
Requestedcreated
Requesterrequester
Requester languagelocale_id
Satisfactionsatisfaction_score
Solvedsolved
Status categorystatus
Subjectdescription
Submittersubmitter
Ticket formticket_form
Typetype
Brandbrand
Ticket statuscustom_status_id

View sorting

You can group and sort items in the view by adding items to the output parameter:

AttributeDescription
group_by, sort_bySort or group the tickets by a column in the View columns table. The description, submitter and custom_status_id columns are not supported
group_order, sort_orderEither "asc" or "desc"

Servers

How to start integrating

  1. Add HTTP Task to your workflow definition.
  2. Search for the API you want to integrate with and click on the name.
    • This loads the API reference documentation and prepares the Http request settings.
  3. Click Test request to test run your request to the API and see the API's response.