zendesk_api 1.3.5 → 1.3.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (203) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +2 -2
  3. data/.yardopts +0 -2
  4. data/Gemfile +4 -30
  5. data/Gemfile.lock +38 -80
  6. data/Rakefile +0 -5
  7. data/lib/zendesk_api/actions.rb +3 -2
  8. data/lib/zendesk_api/client.rb +4 -1
  9. data/lib/zendesk_api/collection.rb +4 -0
  10. data/lib/zendesk_api/configuration.rb +2 -0
  11. data/lib/zendesk_api/middleware/request/upload.rb +1 -1
  12. data/lib/zendesk_api/middleware/request/url_based_access_token.rb +26 -0
  13. data/lib/zendesk_api/resources.rb +25 -1
  14. data/lib/zendesk_api/version.rb +1 -1
  15. data/spec/core/client_spec.rb +1 -0
  16. data/spec/core/middleware/request/upload_spec.rb +26 -27
  17. data/spec/core/spec_helper.rb +27 -1
  18. data/spec/live/user_spec.rb +4 -2
  19. data/spec/live/user_view_spec.rb +16 -0
  20. data/spec/live/voice/phone_number_spec.rb +2 -0
  21. data/zendesk_api.gemspec +1 -4
  22. metadata +9 -191
  23. data/Procfile +0 -1
  24. data/bin/zendesk +0 -27
  25. data/config.ru +0 -6
  26. data/config/mongoid.yml +0 -81
  27. data/config/newrelic.yml +0 -255
  28. data/lib/zendesk_api/console/base.rb +0 -12
  29. data/lib/zendesk_api/console/console.rb +0 -144
  30. data/lib/zendesk_api/console/extensions.rb +0 -202
  31. data/lib/zendesk_api/console/options.rb +0 -41
  32. data/lib/zendesk_api/server/base.rb +0 -123
  33. data/lib/zendesk_api/server/docs/account_settings.md +0 -191
  34. data/lib/zendesk_api/server/docs/activity_stream.md +0 -121
  35. data/lib/zendesk_api/server/docs/attachments.md +0 -142
  36. data/lib/zendesk_api/server/docs/autocomplete.md +0 -29
  37. data/lib/zendesk_api/server/docs/automations.md +0 -256
  38. data/lib/zendesk_api/server/docs/categories.md +0 -193
  39. data/lib/zendesk_api/server/docs/changes_roadmap.md +0 -286
  40. data/lib/zendesk_api/server/docs/custom_roles.md +0 -88
  41. data/lib/zendesk_api/server/docs/forum_subscriptions.md +0 -139
  42. data/lib/zendesk_api/server/docs/forums.md +0 -229
  43. data/lib/zendesk_api/server/docs/group_memberships.md +0 -229
  44. data/lib/zendesk_api/server/docs/groups.md +0 -212
  45. data/lib/zendesk_api/server/docs/introduction.md +0 -165
  46. data/lib/zendesk_api/server/docs/job_statuses.md +0 -86
  47. data/lib/zendesk_api/server/docs/locales.md +0 -124
  48. data/lib/zendesk_api/server/docs/macros.md +0 -289
  49. data/lib/zendesk_api/server/docs/organizations.md +0 -271
  50. data/lib/zendesk_api/server/docs/problems.md +0 -117
  51. data/lib/zendesk_api/server/docs/requests.md +0 -274
  52. data/lib/zendesk_api/server/docs/satisfaction_ratings.md +0 -172
  53. data/lib/zendesk_api/server/docs/search.md +0 -106
  54. data/lib/zendesk_api/server/docs/sharing_agreements.md +0 -57
  55. data/lib/zendesk_api/server/docs/side_loading.md +0 -125
  56. data/lib/zendesk_api/server/docs/suspended_tickets.md +0 -184
  57. data/lib/zendesk_api/server/docs/tags.md +0 -145
  58. data/lib/zendesk_api/server/docs/ticket_audits.md +0 -688
  59. data/lib/zendesk_api/server/docs/ticket_export.md +0 -121
  60. data/lib/zendesk_api/server/docs/ticket_fields.md +0 -277
  61. data/lib/zendesk_api/server/docs/ticket_import.md +0 -65
  62. data/lib/zendesk_api/server/docs/ticket_metrics.md +0 -125
  63. data/lib/zendesk_api/server/docs/tickets.md +0 -696
  64. data/lib/zendesk_api/server/docs/topic_comments.md +0 -221
  65. data/lib/zendesk_api/server/docs/topic_subscriptions.md +0 -140
  66. data/lib/zendesk_api/server/docs/topic_votes.md +0 -153
  67. data/lib/zendesk_api/server/docs/topics.md +0 -335
  68. data/lib/zendesk_api/server/docs/triggers.md +0 -264
  69. data/lib/zendesk_api/server/docs/user_identities.md +0 -279
  70. data/lib/zendesk_api/server/docs/users.md +0 -455
  71. data/lib/zendesk_api/server/docs/views.md +0 -644
  72. data/lib/zendesk_api/server/helper.rb +0 -110
  73. data/lib/zendesk_api/server/html_renderer.rb +0 -98
  74. data/lib/zendesk_api/server/models/user_request.rb +0 -16
  75. data/lib/zendesk_api/server/models/zlib_json.rb +0 -13
  76. data/lib/zendesk_api/server/public/config.rb +0 -26
  77. data/lib/zendesk_api/server/public/doc/ZendeskAPI.html +0 -131
  78. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Ability.html +0 -592
  79. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Activity.html +0 -979
  80. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Attachment.html +0 -658
  81. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Automation.html +0 -805
  82. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Bookmark.html +0 -606
  83. data/lib/zendesk_api/server/public/doc/ZendeskAPI/CRMData.html +0 -592
  84. data/lib/zendesk_api/server/public/doc/ZendeskAPI/CRMDataStatus.html +0 -592
  85. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Category.html +0 -825
  86. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Client.html +0 -1226
  87. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Collection.html +0 -2606
  88. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Configuration.html +0 -1302
  89. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Create.html +0 -392
  90. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Create/ClassMethods.html +0 -283
  91. data/lib/zendesk_api/server/public/doc/ZendeskAPI/CreateResource.html +0 -878
  92. data/lib/zendesk_api/server/public/doc/ZendeskAPI/CustomRole.html +0 -592
  93. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Data.html +0 -1406
  94. data/lib/zendesk_api/server/public/doc/ZendeskAPI/DataResource.html +0 -823
  95. data/lib/zendesk_api/server/public/doc/ZendeskAPI/DeleteResource.html +0 -815
  96. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Destroy.html +0 -357
  97. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Destroy/ClassMethod.html +0 -295
  98. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Error.html +0 -115
  99. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Error/ClientError.html +0 -127
  100. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Error/NetworkError.html +0 -127
  101. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Error/RecordInvalid.html +0 -371
  102. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Error/RecordNotFound.html +0 -127
  103. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Forum.html +0 -1559
  104. data/lib/zendesk_api/server/public/doc/ZendeskAPI/ForumSubscription.html +0 -979
  105. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Group.html +0 -606
  106. data/lib/zendesk_api/server/public/doc/ZendeskAPI/GroupMembership.html +0 -979
  107. data/lib/zendesk_api/server/public/doc/ZendeskAPI/JobStatus.html +0 -598
  108. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Locale.html +0 -598
  109. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Macro.html +0 -805
  110. data/lib/zendesk_api/server/public/doc/ZendeskAPI/MobileDevice.html +0 -724
  111. data/lib/zendesk_api/server/public/doc/ZendeskAPI/OAuthClient.html +0 -606
  112. data/lib/zendesk_api/server/public/doc/ZendeskAPI/OAuthToken.html +0 -810
  113. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Organization.html +0 -1379
  114. data/lib/zendesk_api/server/public/doc/ZendeskAPI/OrganizationField.html +0 -606
  115. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Read.html +0 -341
  116. data/lib/zendesk_api/server/public/doc/ZendeskAPI/ReadResource.html +0 -797
  117. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Request.html +0 -1189
  118. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Request/Comment.html +0 -993
  119. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Resource.html +0 -1263
  120. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Role.html +0 -592
  121. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Rule.html +0 -610
  122. data/lib/zendesk_api/server/public/doc/ZendeskAPI/RuleExecution.html +0 -679
  123. data/lib/zendesk_api/server/public/doc/ZendeskAPI/SatisfactionRating.html +0 -1327
  124. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Save.html +0 -494
  125. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Search.html +0 -411
  126. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Search/Result.html +0 -462
  127. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Setting.html +0 -742
  128. data/lib/zendesk_api/server/public/doc/ZendeskAPI/SharingAgreement.html +0 -598
  129. data/lib/zendesk_api/server/public/doc/ZendeskAPI/SingularResource.html +0 -610
  130. data/lib/zendesk_api/server/public/doc/ZendeskAPI/SuspendedTicket.html +0 -911
  131. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Ticket.html +0 -3094
  132. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Ticket/Audit.html +0 -787
  133. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Ticket/Comment.html +0 -1039
  134. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Ticket/Tag.html +0 -606
  135. data/lib/zendesk_api/server/public/doc/ZendeskAPI/TicketField.html +0 -606
  136. data/lib/zendesk_api/server/public/doc/ZendeskAPI/TicketMetric.html +0 -782
  137. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Topic.html +0 -1449
  138. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Topic/TopicComment.html +0 -1122
  139. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Topic/TopicVote.html +0 -983
  140. data/lib/zendesk_api/server/public/doc/ZendeskAPI/TopicComment.html +0 -1039
  141. data/lib/zendesk_api/server/public/doc/ZendeskAPI/TopicSubscription.html +0 -979
  142. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Trigger.html +0 -805
  143. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Update.html +0 -392
  144. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Update/ClassMethod.html +0 -287
  145. data/lib/zendesk_api/server/public/doc/ZendeskAPI/UpdateResource.html +0 -878
  146. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Upload.html +0 -1176
  147. data/lib/zendesk_api/server/public/doc/ZendeskAPI/User.html +0 -3974
  148. data/lib/zendesk_api/server/public/doc/ZendeskAPI/User/Identity.html +0 -926
  149. data/lib/zendesk_api/server/public/doc/ZendeskAPI/User/TopicComment.html +0 -656
  150. data/lib/zendesk_api/server/public/doc/ZendeskAPI/UserField.html +0 -606
  151. data/lib/zendesk_api/server/public/doc/ZendeskAPI/Verbs.html +0 -332
  152. data/lib/zendesk_api/server/public/doc/ZendeskAPI/View.html +0 -1650
  153. data/lib/zendesk_api/server/public/doc/ZendeskAPI/ViewCount.html +0 -592
  154. data/lib/zendesk_api/server/public/doc/ZendeskAPI/ViewRow.html +0 -1744
  155. data/lib/zendesk_api/server/public/doc/_index.html +0 -799
  156. data/lib/zendesk_api/server/public/doc/class_list.html +0 -53
  157. data/lib/zendesk_api/server/public/doc/css/common.css +0 -1
  158. data/lib/zendesk_api/server/public/doc/css/full_list.css +0 -57
  159. data/lib/zendesk_api/server/public/doc/css/style.css +0 -338
  160. data/lib/zendesk_api/server/public/doc/file.Readme.html +0 -137
  161. data/lib/zendesk_api/server/public/doc/file_list.html +0 -55
  162. data/lib/zendesk_api/server/public/doc/frames.html +0 -28
  163. data/lib/zendesk_api/server/public/doc/index.html +0 -137
  164. data/lib/zendesk_api/server/public/doc/js/app.js +0 -214
  165. data/lib/zendesk_api/server/public/doc/js/full_list.js +0 -173
  166. data/lib/zendesk_api/server/public/doc/js/jquery.js +0 -4
  167. data/lib/zendesk_api/server/public/doc/method_list.html +0 -2332
  168. data/lib/zendesk_api/server/public/doc/top-level-namespace.html +0 -112
  169. data/lib/zendesk_api/server/public/favicon.ico +0 -0
  170. data/lib/zendesk_api/server/public/images/glyphicons-halflings-white.png +0 -0
  171. data/lib/zendesk_api/server/public/images/glyphicons-halflings.png +0 -0
  172. data/lib/zendesk_api/server/public/images/spinner.gif +0 -0
  173. data/lib/zendesk_api/server/public/images/zendesk_developers_bg.png +0 -0
  174. data/lib/zendesk_api/server/public/images/zendesk_developers_header.png +0 -0
  175. data/lib/zendesk_api/server/public/javascripts/application.js +0 -186
  176. data/lib/zendesk_api/server/public/javascripts/bootstrap-alert.js +0 -90
  177. data/lib/zendesk_api/server/public/javascripts/bootstrap-button.js +0 -96
  178. data/lib/zendesk_api/server/public/javascripts/bootstrap-carousel.js +0 -169
  179. data/lib/zendesk_api/server/public/javascripts/bootstrap-collapse.js +0 -157
  180. data/lib/zendesk_api/server/public/javascripts/bootstrap-dropdown.js +0 -100
  181. data/lib/zendesk_api/server/public/javascripts/bootstrap-modal.js +0 -218
  182. data/lib/zendesk_api/server/public/javascripts/bootstrap-popover.js +0 -98
  183. data/lib/zendesk_api/server/public/javascripts/bootstrap-scrollspy.js +0 -151
  184. data/lib/zendesk_api/server/public/javascripts/bootstrap-tab.js +0 -135
  185. data/lib/zendesk_api/server/public/javascripts/bootstrap-tooltip.js +0 -275
  186. data/lib/zendesk_api/server/public/javascripts/bootstrap-transition.js +0 -61
  187. data/lib/zendesk_api/server/public/javascripts/bootstrap-typeahead.js +0 -285
  188. data/lib/zendesk_api/server/public/sass/screen.scss +0 -102
  189. data/lib/zendesk_api/server/public/sass/styles.scss +0 -5
  190. data/lib/zendesk_api/server/public/stylesheets/developer.screen.css +0 -836
  191. data/lib/zendesk_api/server/public/stylesheets/screen.css +0 -129
  192. data/lib/zendesk_api/server/public/stylesheets/styles.css +0 -6208
  193. data/lib/zendesk_api/server/templates/footer.haml +0 -13
  194. data/lib/zendesk_api/server/templates/header.haml +0 -20
  195. data/lib/zendesk_api/server/templates/index.haml +0 -68
  196. data/lib/zendesk_api/server/templates/layout.haml +0 -44
  197. data/lib/zendesk_api/server/templates/param.haml +0 -4
  198. data/lib/zendesk_api/server/templates/search.haml +0 -23
  199. data/lib/zendesk_api/server/templates/sidebar.haml +0 -7
  200. data/spec/server/app_spec.rb +0 -140
  201. data/spec/server/helper_spec.rb +0 -97
  202. data/spec/server/html_renderer_spec.rb +0 -130
  203. data/spec/server/spec_helper.rb +0 -43
@@ -1,125 +0,0 @@
1
- ## Ticket Metrics
2
-
3
- ### JSON Format
4
-
5
- | Name | Type | Read-only | Mandatory | Comment
6
- | ---------------------------------- | ---------------------- | --------- | --------- | -------
7
- | id | integer | yes | no | Automatically assigned
8
- | ticket_id | integer | yes | no | Id of the associated ticket
9
- | url | string | yes | no | The API url of this ticket metric
10
- | group_stations | integer | yes | no | Number of groups this ticket passed through
11
- | assignee_stations | integer | yes | no | Number of assignees this ticket had
12
- | reopens | integer | yes | no | Total number of times the ticket was reopened
13
- | replies | integer | yes | no | Total number of times ticket was replied to
14
- | assignee_updated_at | date | yes | no | When the assignee last updated the ticket
15
- | requester_updated_at | date | yes | no | When the requester last updated the ticket
16
- | status_updated_at | date | yes | no | When the status was last updated
17
- | initially_assigned_at | date | yes | no | When the ticket was initially assigned
18
- | assigned_at | date | yes | no | When the ticket was last assigned
19
- | solved_at | date | yes | no | When the ticket was solved
20
- | latest_comment_added_at | date | yes | no | When the latest comment was added
21
- | first_resolution_time_in_minutes | object | yes | no | Number of minutes to the first resolution time inside and out of business hours
22
- | reply_time_in_minutes | object | yes | no | Number of minutes to the first reply inside and out of business hours
23
- | full_resolution_time_in_minutes | object | yes | no | Number of minutes to the full resolution inside and out of business hours
24
- | agent_wait_time_in_minutes | object | yes | no | Number of minutes the agent spent waiting inside and out of business hours
25
- | requester_wait_time_in_minutes | object | yes | no | Number of minutes the requester spent waiting inside and out of business hours
26
- | created_at | date | yes | no | When this record was created
27
- | updated_at | date | yes | no | When this record last got updated
28
-
29
- #### Example
30
- ```js
31
- { "id": 33,
32
- "ticket_id": 4343,
33
- "created_at": "2009-07-20T22:55:29Z",
34
- "updated_at": "2011-05-05T10:38:52Z",
35
- "group_stations": 7,
36
- "assignee_stations": 1,
37
- "reopens": 55,
38
- "replies": 322,
39
- "assignee_updated_at": "2011-05-06T10:38:52Z",
40
- "requester_updated_at": "2011-05-07T10:38:52Z",
41
- "status_updated_at": "2011-05-04T10:38:52Z",
42
- "initially_assigned_at": "2011-05-03T10:38:52Z",
43
- "assigned_at": "2011-05-05T10:38:52Z",
44
- "solved_at": "2011-05-09T10:38:52Z",
45
- "latest_comment_added_at": "2011-05-09T10:38:52Z",
46
- "reply_time_in_minutes": { "calendar": 2391, "business": 737 },
47
- "first_resolution_time_in_minutes": { "calendar": 2391, "business": 737 },
48
- "full_resolution_time_in_minutes": { "calendar": 2391, "business": 737 },
49
- "agent_wait_time_in_minutes": { "calendar": 2391, "business": 737 },
50
- "requester_wait_time_in_minutes": { "calendar": 2391, "business": 737 },
51
- "on_hold_time_in_minutes": { "calendar": 2290, "business": 637 }
52
- }
53
- ```
54
-
55
- ### Listing Ticket Metrics
56
- `GET /api/v2/ticket_metrics.json`
57
-
58
- `GET /api/v2/tickets/{id}/metrics.json`
59
-
60
- #### Allowed For
61
-
62
- * Agents
63
-
64
- #### Using curl
65
-
66
- ```bash
67
- curl https://{subdomain}.zendesk.com/api/v2/ticket_metrics.json \
68
- -v -u {email_address}:{password}
69
- ```
70
-
71
- #### Example Response
72
- ```http
73
- Status: 200 OK
74
-
75
- {
76
- "ticket_metrics": [
77
- {
78
- "id": 33,
79
- "ticket_id": 4343,
80
- "reopens": 55,
81
- "replies": 322,
82
- ...
83
- }
84
- {
85
- "id": 34,
86
- "ticket_id": 443,
87
- "reopens": 123,
88
- "replies": 232,
89
- ...
90
- },
91
- ]
92
- }
93
- ```
94
-
95
- ### Getting Ticket Metrics
96
- `GET /api/v2/ticket_metrics/{id}.json`
97
-
98
- #### Allowed For
99
-
100
- * Agents
101
-
102
- #### Using curl:
103
-
104
- ```bash
105
- curl https://{subdomain}.zendesk.com/api/v2/ticket_metrics/{id}.json \
106
- -v -u {email_address}:{password}
107
- ```
108
-
109
- #### Example Response
110
-
111
- ```http
112
- Status: 200 OK
113
-
114
- {
115
- "ticket_metric": {
116
- {
117
- "id": 34,
118
- "ticket_id": 443,
119
- "reopens": 123,
120
- "replies": 232,
121
- ...
122
- }
123
- }
124
- }
125
- ```
@@ -1,696 +0,0 @@
1
- ## Tickets
2
-
3
- Tickets are the means through which your End-users (customers) communicate with Agents in Zendesk. Tickets can originate via a number of support channels: email, web portal, chat, phone call, Twitter, Facebook and the API. All tickets have a core set of properties. Some key things to know are:
4
-
5
- #### Requester
6
-
7
- Every ticket has a Requester, Group and Assignee. The User who is asking for support through a ticket is the Requester. For most businesses that use Zendesk, the Requester is a customer, but Requesters can also be agents in your Zendesk.
8
-
9
- #### Submitter
10
-
11
- The Submitter is the User who created a ticket. If a Requester creates a ticket themselves, they are also the Submitter. If an agent creates a ticket through the web interface, the agent is set as the Submitter.
12
-
13
- #### Collaborators
14
-
15
- Aside from the Requester, a Ticket can include other people in its communication, known as Collaborators or CCs. Collaborators receive email notifications when tickets are updated. Collaborators can be either End-users or Agents.
16
-
17
- #### Group
18
-
19
- The Group that a Ticket is assigned to.
20
-
21
- #### Assignee
22
-
23
- The agent, within a Group, who is assigned to a Ticket. A Ticket can only be assigned to a single agent at a time.
24
-
25
- #### Status
26
-
27
- All tickets in Zendesk start out as New and progress through Open, Pending, Solved and Closed states. A Ticket must have an Assignee in order to be solved.
28
-
29
- ### JSON Format
30
- Tickets are represented as JSON objects which have the following keys:
31
-
32
- | Name | Type | Read-only | Mandatory | Comment
33
- | --------------------- | ---------------------------------------- | --------- | --------- | -------
34
- | id | integer | yes | no | Automatically assigned when creating tickets
35
- | url | string | yes | no | The API url of this ticket
36
- | external_id | string | no | no | A unique external id, you can use this to link Zendesk tickets to local records
37
- | type | string | no | no | The type of this ticket, i.e. "problem", "incident", "question" or "task"
38
- | subject | string | no | no | The value of the subject field for this ticket
39
- | description | string | yes | no | The first comment on the ticket
40
- | priority | string | no | no | Priority, defines the urgency with which the ticket should be addressed: "urgent", "high", "normal", "low"
41
- | status | string | no | no | The state of the ticket, "new", "open", "pending", "hold", "solved", "closed"
42
- | recipient | string | yes | no | The original recipient e-mail address of the ticket
43
- | requester_id | integer | no | yes | The user who requested this ticket
44
- | submitter_id | integer | yes | no | The user who submitted the ticket; this is the currently authenticated API user
45
- | assignee_id | integer | no | no | What agent is currently assigned to the ticket
46
- | organization_id | integer | yes | no | The organization of the requester
47
- | group_id | integer | no | no | The group this ticket is assigned to
48
- | collaborator_ids | array | no | no | Who are currently CC'ed on the ticket
49
- | forum_topic_id | integer | no | no | The topic this ticket originated from, if any
50
- | problem_id | integer | no | no | The problem this incident is linked to, if any
51
- | has_incidents | boolean | yes | no | Is true of this ticket has been marked as a problem, false otherwise
52
- | due_at | date | no | no | If this is a ticket of type "task" it has a due date. Due date format uses [ISO 8601](http://en.wikipedia.org/wiki/ISO_8601) format.
53
- | tags | array | no | no | The array of tags applied to this ticket
54
- | via | [Via](ticket_audits.html#the-via-object) | yes | no | This object explains how the ticket was created
55
- | custom_fields | array | no | no | The custom fields of the ticket
56
- | satisfaction_rating | object | yes | no | The satisfaction rating of the ticket, if it exists
57
- | sharing_agreement_ids | array | yes | no | The ids of the sharing agreements used for this ticket
58
- | created_at | date | yes | no | When this record was created
59
- | updated_at | date | yes | no | When this record last got updated
60
-
61
- #### Example
62
- ```js
63
- {
64
- "id": 35436,
65
- "url": "https://company.zendesk.com/api/v2/tickets/35436.json",
66
- "external_id": "ahg35h3jh",
67
- "created_at": "2009-07-20T22:55:29Z",
68
- "updated_at": "2011-05-05T10:38:52Z",
69
- "type": "incident",
70
- "subject": "Help, my printer is on fire!",
71
- "description": "The fire is very colorful.",
72
- "priority": "high",
73
- "status": "open",
74
- "recipient": "support@company.com",
75
- "requester_id": 20978392,
76
- "submitter_id": 76872,
77
- "assignee_id": 235323,
78
- "organization_id": 509974,
79
- "group_id": 98738,
80
- "collaborator_ids": [35334, 234],
81
- "forum_topic_id": 72648221,
82
- "problem_id": 9873764,
83
- "has_incidents": false,
84
- "due_at": null,
85
- "tags": ["enterprise", "other_tag"],
86
- "via": {
87
- "channel": "web"
88
- },
89
- "custom_fields": [
90
- {
91
- "id": 27642,
92
- "value": "745"
93
- },
94
- {
95
- "id": 27648,
96
- "value": "yes"
97
- }
98
- ],
99
- "satisfaction_rating": {
100
- "score": "good",
101
- "comment": "Great support!"
102
- },
103
- "sharing_agreement_ids": [84432]
104
- }
105
- ```
106
-
107
- ### Listing Tickets
108
- `GET /api/v2/tickets.json`
109
-
110
- Tickets are ordered chronologically by created date, from oldest to newest.
111
-
112
- #### Allowed for
113
-
114
- * Admins
115
-
116
- `GET /api/v2/organizations/{organization_id}/tickets.json`
117
-
118
- `GET /api/v2/users/{user_id}/tickets/requested.json`
119
-
120
- `GET /api/v2/users/{user_id}/tickets/ccd.json`
121
-
122
- `GET /api/v2/tickets/recent.json`
123
-
124
- #### Allowed For
125
-
126
- * Agents
127
-
128
- #### Using curl
129
-
130
- ```bash
131
- curl https://{subdomain}.zendesk.com/api/v2/tickets.json \
132
- -v -u {email_address}:{password}
133
- ```
134
-
135
- #### Example Response
136
- ```http
137
- Status: 200 OK
138
-
139
- {
140
- "tickets": [
141
- {
142
- "id": 35436,
143
- "subject": "Help I need somebody!",
144
- ...
145
- },
146
- {
147
- "id": 20057623,
148
- "subject": "Not just anybody!",
149
- ...
150
- },
151
- ]
152
- }
153
- ```
154
-
155
- ### Getting Tickets
156
- `GET /api/v2/tickets/{id}.json`
157
-
158
- #### Allowed For
159
-
160
- * Agents
161
-
162
- #### Using curl:
163
-
164
- ```bash
165
- curl https://{subdomain}.zendesk.com/api/v2/tickets/{id}.json \
166
- -v -u {email_address}:{password}
167
- ```
168
-
169
- #### Example Response
170
-
171
- ```http
172
- Status: 200 OK
173
-
174
- {
175
- "ticket": {
176
- {
177
- "id": 35436,
178
- "subject": "My printer is on fire!",
179
- ...
180
- }
181
- }
182
- }
183
- ```
184
-
185
- ### Show Multiple Tickets
186
- `POST /api/v2/tickets/show_many?ids={ids}.json`
187
-
188
- Accepts a comma separated list of ticket ids to return.
189
-
190
- #### Allowed For:
191
-
192
- * Agents
193
-
194
- #### Using curl
195
-
196
- ```bash
197
- curl https://{subdomain}.zendesk.com/api/v2/tickets/show_many.json?ids={id,id,id} \
198
- -v -u {email_address}:{password} -X POST
199
- ```
200
-
201
- #### Example Response
202
-
203
- See [Listing Tickets](#example-response)
204
-
205
- ### Creating Tickets
206
- `POST /api/v2/tickets.json`
207
-
208
- #### Allowed For
209
-
210
- * Agents
211
-
212
- #### Using curl
213
-
214
- ```bash
215
- curl https://{subdomain}.zendesk.com/api/v2/tickets.json \
216
- -d '{"ticket":{"subject":"My printer is on fire!", "comment": { "body": "The smoke is very colorful." }}}' \
217
- -H "Content-Type: application/json" -v -u {email_address}:{password} -X POST
218
- ```
219
-
220
- #### Example Response
221
-
222
- ```http
223
- Status: 201 Created
224
- Location: https://{subdomain}.zendesk.com/api/v2/tickets/{id}.json
225
-
226
- {
227
- "ticket": {
228
- {
229
- "id": 35436,
230
- "subject": "My printer is on fire!",
231
- ...
232
- }
233
- }
234
- }
235
- ```
236
-
237
- #### Request parameters
238
-
239
- The POST request takes one parameter, a `ticket` object that lists the values to set when the ticket is created.
240
-
241
- | Name | Description |
242
- | -------- | ---------------------------------------------------- |
243
- | subject | Required. The subject of the ticket. |
244
- | comment | Required. A comment object that describes the problem, incident, question, or task. See [Ticket comments](http://developer.zendesk.com/documentation/rest_api/ticket_audits.html#audit-events) in Audit Events. |
245
- | requester\_id | The numeric ID of the user asking for support through the ticket. |
246
- | submitter\_id | The numeric ID of the user submitting the ticket. |
247
- | assignee\_id | The numeric ID of the agent to assign the ticket to. |
248
- | group\_id | The numeric ID of the group to assign the ticket to. |
249
- | collaborator\_ids | An array of the numeric IDs of agents or end-users to CC on the ticket. An email notification is sent to them when the ticket is created. |
250
- | type | Allowed values are `problem`, `incident`, `question`, or `task`. |
251
- | priority | Allowed values are `urgent`, `high`, `normal`, or `low`. |
252
- | status | Allowed values are `new`, `open`, `pending`, `hold`, `solved` or `closed`. Is set to `open` if status is not specified. |
253
- | tags | An array of tags to add to the ticket. |
254
- | external\_id | A unique external ID to link Zendesk tickets to local records. |
255
- | forum\_topic\_id | The numeric ID of the topic the ticket originated from, if any. |
256
- | problem\_id | For tickets of type "incident", the numeric ID of the problem the incident is linked to, if any. |
257
- | due\_at | For tickets of type "task", the due date of the task. Accepts the ISO 8601 date format (yyyy-mm-dd). |
258
- | custom\_fields | An array of the custom fields of the ticket. |
259
-
260
- #### Example request
261
-
262
- ```js
263
- "ticket":{
264
- "subject":"My printer is on fire!",
265
- "comment": { "body": "The smoke is very colorful." },
266
- "priority": "urgent"
267
- }
268
- ```
269
-
270
- ### Updating Tickets
271
- `PUT /api/v2/tickets/{id}.json`
272
-
273
- #### Allowed For
274
-
275
- * Agents
276
-
277
- #### Using curl
278
-
279
- ```bash
280
- curl https://{subdomain}.zendesk.com/api/v2/tickets/{id}.json \
281
- -H "Content-Type: application/json" \
282
- -d '{"ticket":{"status":"solved", \
283
- "comment":{"public":true, "body": "Thanks, this is now solved!"}}}' \
284
- -v -u {email_address}:{password} -X PUT
285
- ```
286
-
287
- #### Example Response
288
-
289
- ```http
290
- Status: 200 OK
291
-
292
- {
293
- "ticket": {
294
- "id": 35436,
295
- "subject": "My printer is on fire!",
296
- "status": "solved",
297
- ...
298
- },
299
- "audit": {
300
- "events": [...],
301
- ...
302
- }
303
- }
304
- ```
305
-
306
- #### Request parameters
307
-
308
- The PUT request takes one parameter, a `ticket` object that lists the values to update. All properties are optional.
309
-
310
- | Name | Description |
311
- | -------- | ---------------------------------------------------- |
312
- | subject | The subject of the ticket. |
313
- | comment | An object that adds a comment to the ticket. See [Ticket comments](http://developer.zendesk.com/documentation/rest_api/ticket_audits.html#audit-events) in Audit Events. |
314
- | requester\_id | The numeric ID of the user asking for support through the ticket. |
315
- | assignee\_id | The numeric ID of the agent to assign the ticket to. |
316
- | group\_id | The numeric ID of the group to assign the ticket to. |
317
- | collaborator\_ids | An array of the numeric IDs of agents or end-users to CC. Note that this replaces any existing collaborators. An email notification is sent to them when the ticket is created. |
318
- | type | Allowed values are `problem`, `incident`, `question`, or `task`. |
319
- | priority | Allowed values are `urgent`, `high`, `normal`, or `low`. |
320
- | status | Allowed values are `open`, `pending`, `hold`, `solved` or `closed`. |
321
- | tags | An array of tags to add to the ticket. Note that the tags replace any existing tags. |
322
- | external\_id | A unique external ID to link Zendesk tickets to local records. |
323
- | forum\_topic\_id | The numeric ID of the topic the ticket originated from, if any. |
324
- | problem\_id | For tickets of type "incident", the numeric ID of the problem the incident is linked to, if any. |
325
- | due\_at | For tickets of type "task", the due date of the task. Accepts the ISO 8601 date format (yyyy-mm-dd). |
326
- | custom\_fields | An array of the custom field objects consisting of ids and values. Any tags defined with the custom field replace existing tags. |
327
-
328
- #### Example request
329
-
330
- ```js
331
- "ticket": {
332
- "comment":{ "body": "Thanks for choosing Acme Jet Motors.", "public":"true" },
333
- "status": "solved"
334
- }
335
- ```
336
-
337
- ### Bulk Updating Tickets
338
- `PUT /api/v2/tickets/update_many.json?ids={ids}`
339
-
340
- #### Allowed For
341
-
342
- * Agents
343
-
344
- #### Example Request
345
-
346
- ```js
347
- "ticket": {
348
- "status": "solved"
349
- }
350
- ```
351
-
352
- #### Using curl
353
-
354
- ```bash
355
- curl https://{subdomain}.zendesk.com/api/v2/tickets/update_many.json?ids=1,2,3 \
356
- -H "Content-Type: application/json" -d "{\"ticket\":{\"status\":\"solved\"}}" \
357
- -v -u {email_address}:{password} -X PUT
358
- ```
359
-
360
- #### Example Response
361
-
362
- See [Job Status](job_statuses.md#show-job-status)
363
-
364
- ### Mark a ticket as spam and suspend the requester
365
- `PUT /api/v2/tickets/{id}/mark_as_spam.json`
366
-
367
- #### Allowed For
368
-
369
- * Agents
370
-
371
- #### Using curl
372
-
373
- ```bash
374
- curl https://{subdomain}.zendesk.com/api/v2/tickets/{id}/mark_as_spam.json\
375
- -v -u {email_address}:{password} -X PUT
376
- ```
377
-
378
- #### Example Response
379
-
380
- ```http
381
- Status: 200 OK
382
- ```
383
-
384
- ### Setting Collaborators
385
-
386
- You can set collaborators on tickets by passing in an array identifying the collaboratos you wish to
387
- set. Each slot in the array is either the id of a user or the email address of a user or a hash containing
388
- user name and email.
389
-
390
- * `someone@example.com`
391
- * `{ "name": "Someone Special", "email": "someone@example.com" }`
392
-
393
- You can use the latter for also specifying the name of a collaborator such that the user gets created
394
- on the fly with the appropriate name.
395
-
396
- #### Example Request
397
-
398
- ```js
399
- "ticket": {
400
- "collaborators": [ 562, "someone@example.com", { "name": "Someone Else", "email": "else@example.com" } ]
401
- }
402
- ```
403
-
404
- Note that setting collaborators this way will completely ignore what's already set, so make sure to
405
- include existing collaborators in the array if you wish to retain these on the ticket.
406
-
407
- ### Setting Metadata
408
-
409
- When you create or update a ticket, an [Audit](ticket_audits.md) gets generated if the ticket properties have changed.
410
- On each such audit, you can add up to 1 kilobyte of custom metadata. You can use this to build your own integrations or apps.
411
- **Note**: If your update does not change the ticket, this will not create an Audit and will not save your metadata.
412
-
413
- #### Example Request
414
-
415
- ```js
416
- "ticket": {
417
- "metadata": { "time_spent": "4m12s", "account": "integrations" },
418
- "comment": { "body": "Please press play on tape now" },
419
- "status": "pending"
420
- }
421
- ```
422
-
423
- Note that metadata can only be set as part of other regular ticket updates as they are associated to a such
424
- rather than just the ticket. Zendesk also adds metadata on each ticket update, and the resulting audit JSON
425
- structure looks like this:
426
-
427
- ```js
428
- "audit": {
429
- {
430
- "id": 35436,
431
- "ticket_id": 47,
432
- "created_at": "2012-04-20T22:55:29Z",
433
- "author_id": 35436,
434
- "metadata": {
435
- "custom": {
436
- "time_spent": "4m12s",
437
- "account": "integrations"
438
- },
439
- "system": {
440
- "ip_address": "184.106.40.75",
441
- "location": "United States",
442
- "longitude": -97,
443
- "latitude": 38,
444
- "client": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_3)"
445
- }
446
- },
447
- "via": {
448
- "channel": "web"
449
- },
450
- "events": [
451
- {
452
- "id": 1564245,
453
- "type": "Comment"
454
- "body": "Please press play on tape now",
455
- "public": true,
456
- "attachments": []
457
- },
458
- ...
459
- ]
460
- }
461
- }
462
- ```
463
-
464
- ### Attaching Files
465
-
466
- When creating and updating tickets you may attach files by passing in
467
- an array of the tokens received from uploading the files. For the upload attachment
468
- to succeed when updating a ticket, a comment must be included.
469
-
470
- To get the token of upload, see [Attachments](attachments.md) section on uploading files.
471
-
472
- The upload tokens are single use only. After a token is used to attach a file to a ticket comment,
473
- that token cannot be used to attach the same upload to an additional ticket comment.
474
-
475
- #### Example Request
476
-
477
- ```js
478
- "ticket": {
479
- "comment": { "body": "Please press play on tape now", "uploads": ["vz7ll9ud8oofowy"] }
480
- }
481
- ```
482
-
483
- ### Creating a Ticket with a new Requester
484
-
485
- Requesters can explicitly be created handling tickets.
486
- The name, email, and locale id can be set on the new requester, with the name and email being required.
487
-
488
- To get the locale id, see the [Locales](locales.md) section.
489
-
490
- #### Example Request
491
-
492
- ```js
493
- "ticket": {
494
- "subject": "Hello",
495
- "comment": { "body": "Some question" },
496
- "requester": { "locale_id": 8, "name": "Pablo", "email": "pablito@example.org" }
497
- }
498
- ```
499
-
500
- Please note, if a user already exists with the given email address then we will use that user,
501
- no updates will be made to existing users during the ticket create process. In this approach, only the email attribute is required.
502
-
503
- ### Setting Ticket Fields
504
-
505
- When creating or updating a ticket, [Ticket Fields](ticket_fields.md) can be set by passing in
506
- an array of objects in the format { id: {id}, value: {value} }.
507
-
508
- #### Example Request
509
-
510
- ```js
511
- "ticket": {
512
- "subject": "Hello",
513
- "comment": { "body": "Some question" },
514
- "custom_fields": [{ "id": 34, "value": "I need help!" }]
515
- }
516
- ```
517
-
518
- ### Deleting Tickets
519
- `DELETE /api/v2/tickets/{id}.json`
520
-
521
- #### Allowed For
522
-
523
- * Admins
524
-
525
- #### Using curl
526
-
527
- ```bash
528
- curl https://{subdomain}.zendesk.com/api/v2/tickets/{id}.json \
529
- -v -u {email_address}:{password} -X DELETE
530
- ```
531
-
532
- #### Example Response
533
-
534
- ```http
535
- Status: 200 OK
536
- ```
537
-
538
- ### Bulk Deleting Tickets
539
- `DELETE /api/v2/tickets/destroy_many.json?ids={ids}`
540
-
541
- #### Allowed For
542
-
543
- * Agents
544
-
545
- #### Using curl
546
-
547
- ```bash
548
- curl https://{subdomain}.zendesk.com/api/v2/tickets/destroy_many.json?ids=1,2,3 \
549
- -v -u {email_address}:{password} -X DELETE
550
- ```
551
-
552
- #### Example Response
553
-
554
- ```http
555
- Status: 200 OK
556
- ```
557
-
558
- ### List Collaborators for a Ticket
559
- `GET /api/v2/tickets/{id}/collaborators.json`
560
-
561
- #### Allowed For
562
-
563
- * Agents
564
-
565
- #### Using curl
566
-
567
- ```bash
568
- curl https://{subdomain}.zendesk.com/api/v2/tickets/{id}/collaborators.json \
569
- -v -u {email_address}:{password}
570
- ```
571
-
572
- #### Example Response
573
-
574
- ```http
575
- Status: 200
576
-
577
- {
578
- "users": [
579
- {
580
- "id": 223443,
581
- "name": "Johnny Agent",
582
- ...
583
- },
584
- {
585
- "id": 8678530,
586
- "name": "Peter Admin",
587
- ...
588
- }
589
- ]
590
- }
591
- ```
592
-
593
- ### Listing Ticket Incidents
594
- `GET /api/v2/tickets/{id}/incidents.json`
595
-
596
- #### Allowed For
597
-
598
- * Agents
599
-
600
- #### Using curl
601
-
602
- ```bash
603
- curl https://{subdomain}.zendesk.com/api/v2/tickets/12345/incidents.json \
604
- -v -u {email_address}:{password}
605
- ```
606
-
607
- #### Example Response
608
- ```http
609
- Status: 200 OK
610
-
611
- {
612
- "tickets": [
613
- {
614
- "id": 33,
615
- "subject": "My printer is on fire",
616
- "description": "The fire is very colorful.",
617
- "status": "open",
618
- ...
619
- },
620
- {
621
- "id": 34,
622
- "subject": "The printer is on fire over here too",
623
- "description": "The fire is very colorful as well!",
624
- "status": "pending",
625
- ...
626
- },
627
- ]
628
- }
629
- ```
630
-
631
- ### Listing Ticket Problems
632
- `GET /api/v2/problems.json`
633
-
634
- #### Allowed For
635
-
636
- * Agents
637
-
638
- #### Using curl
639
-
640
- ```bash
641
- curl https://{subdomain}.zendesk.com/api/v2/problems.json \
642
- -v -u {email_address}:{password}
643
- ```
644
-
645
- #### Example Response
646
-
647
- ```http
648
- Status: 200 OK
649
-
650
- {
651
- "tickets": [
652
- {
653
- "id": 33,
654
- "subject": "My printer is on fire",
655
- "description": "The fire is very colorful.",
656
- "status": "open",
657
- ...
658
- },
659
- {
660
- "id": 34,
661
- "subject": "The printer is on fire over here too",
662
- "description": "The fire is very colorful as well!",
663
- "status": "pending",
664
- ...
665
- },
666
- ]
667
- }
668
- ```
669
-
670
- ### Autocomplete Problems
671
- `POST /api/v2/problems/autocomplete.json?text={name}`
672
-
673
- #### Allowed For
674
-
675
- * Agents
676
-
677
- #### Using curl
678
-
679
- ```bash
680
- curl https://{subdomain}.zendesk.com/api/v2/problems/autocomplete.json \
681
- -X POST -d '{"text": "att"}' -H "Content-Type: application/json" \
682
- -u {email_address}:{password}
683
- ```
684
-
685
- #### Example Response
686
-
687
- ```http
688
- Status: 200 OK
689
-
690
- {
691
- "tickets": [
692
- { .. ticket record as in the #index method .. },
693
- { .. ticket record as in the #index method .. }
694
- ]
695
- }
696
- ```