POST /api/v2/views
Allowed For
- Agents
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
.
Name | Description |
---|---|
title | Required. The title of the view |
all | Required. An array of one or more conditions. A ticket must meet all of them to be included in the view. See Conditions reference |
any | An array of one or more conditions. A ticket must meet any of them to be included in the view. See Conditions reference |
description | The description of the view |
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 "Group" or "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.
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 UI | Value |
---|---|
Assigned | assigned |
Assignee | assignee |
Due Date | due_date |
Group | group |
ID | nice_id |
Updated | updated |
Assignee updated | updated_assignee |
Requester updated | updated_requester |
Updater | updated_by_type |
Organization | organization |
Priority | priority |
Requested | created |
Requester | requester |
Requester language | locale_id |
Satisfaction | satisfaction_score |
Solved | solved |
Status category | status |
Subject | description |
Submitter | submitter |
Ticket form | ticket_form |
Type | type |
Brand | brand |
Ticket status | custom_status_id |
View sorting
You can group and sort items in the view by adding items to the output
parameter:
Attribute | Description |
---|---|
group_by , sort_by | Sort 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_order | Either "asc" or "desc" |
Servers
- https://{subdomain}.{domain}.com
How to start integrating
- Add HTTP Task to your workflow definition.
- 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.
- Click Test request to test run your request to the API and see the API's response.