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.
Name | Description |
---|---|
title | The title of the view |
all | An 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 |
any | An 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 |
active | Allowed values are true or false. Determines if the view is displayed or not |
output | An object that specifies the columns to display. Example: "output": {"columns": ["status", "description," "priority"]} . See View columns |
restriction | An 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.
Name | Comment |
---|---|
type | Allowed values are Groupor User |
id | The numeric ID of a single group or user |
ids | The 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
Key | Datatype | Required | Description |
---|---|---|---|
Accept | string |
RESPONSES
status: OK
{"view":{"active":true,"conditions":{},"description":"View for recent tickets","execution":{},"id":25,"position":3,"restriction":{},"title":"Roger Wilco II"}}