Update View

PUT {{baseUrl}}/api/v2/views/:view_id

Allowed For

  • Agents

JSON Format

The PUT request takes one property, a view object that lists the values to update. All properties are optional.

Note: Updating a condition updates the containing array, clearing the other conditions. Include all your conditions when updating any condition.

NameDescription
titleThe title of the view
allAn array of one or more conditions. A ticket must meet all the conditions to be included in the view. The PUT request replaces all existing conditions. See Conditions reference
anyAn array of one or more conditions. A ticket must meet any of them to be included in the view. At least one all condition must be defined with the any conditions. The PUT request replaces all existing any conditions. See Conditions reference
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.

You can also update how items are sorted and grouped. See View sorting in Create View.

Example Request Body

{
  "view": {
    "title": "Code red tickets",
    "restriction": {
      "type": "Group",
      "ids": [10052, 10057, 10062, 10002]
    },
    "all": [
      {
        "field": "priority",
        "operator": "is",
        "value": "urgent"
      }
    ],
    "output": {
      "columns": ["status", "requester", "assignee", "updated"]
    }
  }
}

HEADERS

KeyDatatypeRequiredDescription
Acceptstring

RESPONSES

status: OK

{"view":{"active":true,"conditions":{},"description":"View for recent tickets","execution":{},"id":25,"position":3,"restriction":{},"title":"Roger Wilco II"}}