zendesk_api 1.3.5 → 1.3.7

Sign up to get free protection for your applications and to get access to all the features.
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,145 +0,0 @@
1
- ## Tags
2
-
3
- ### List Tags
4
- `GET /api/v2/tags.json`
5
-
6
- Lists the most popular recent tags in decreasing popularity
7
-
8
- #### Allowed For:
9
-
10
- * Admins
11
-
12
- #### Using curl
13
-
14
- ```bash
15
- curl https://{subdomain}.zendesk.com/api/v2/tags.json \
16
- -v -u {email_address}:{password}
17
- ```
18
-
19
- #### Example Response
20
-
21
- ```http
22
- Status: 200 OK
23
-
24
- {
25
- "tags": [
26
- {
27
- "name": "important",
28
- "count": 47
29
- },
30
- {
31
- "name": "customer",
32
- "count": 11
33
- }
34
- ]
35
- }
36
- ```
37
-
38
- ### Show Tags
39
- `GET /api/v2/tickets/{id}/tags.json`
40
-
41
- #### Allowed For:
42
-
43
- * Agents
44
-
45
- #### Using curl
46
-
47
- ```bash
48
- curl https://{subdomain}.zendesk.com/api/v2/tickets/{id}/tags.json \
49
- -v -u {email_address}:{password}
50
- ```
51
-
52
- #### Example Response
53
-
54
- ```http
55
- Status: 200 OK
56
-
57
- {
58
- "tags": [
59
- "important",
60
- "customer"
61
- ]
62
- }
63
- ```
64
-
65
- ### Set Tags
66
- `POST /api/v2/tickets/{id}/tags.json`
67
-
68
- #### Allowed For:
69
-
70
- * Agents
71
-
72
- #### Using curl
73
-
74
- ```bash
75
- curl https://{subdomain}.zendesk.com/api/v2/tickets/{id}/tags.json \
76
- -v -u {email_address}:{password} -X POST \
77
- -d '{ "tags": ["important"] }'
78
- ```
79
-
80
- #### Example Response
81
-
82
- ```http
83
- Status: 200 OK
84
-
85
- {
86
- "tags": [
87
- "important"
88
- ]
89
- }
90
- ```
91
-
92
- ### Add Tags
93
- `PUT /api/v2/tickets/{id}/tags.json`
94
-
95
- #### Allowed For:
96
-
97
- * Agents
98
-
99
- #### Using curl
100
-
101
- ```bash
102
- curl https://{subdomain}.zendesk.com/api/v2/tickets/{id}/tags.json \
103
- -v -u {email_address}:{password} -X PUT \
104
- -d '{ "tags": ["customer"] }'
105
- ```
106
-
107
- #### Example Response
108
-
109
- ```http
110
- Status: 200 OK
111
-
112
- {
113
- "tags": [
114
- "important",
115
- "customer"
116
- ]
117
- }
118
- ```
119
-
120
- ### Remove Tags
121
- `DELETE /api/v2/tickets/{id}/tags.json`
122
-
123
- #### Allowed For:
124
-
125
- * Agents
126
-
127
- #### Using curl
128
-
129
- ```bash
130
- curl https://{subdomain}.zendesk.com/api/v2/tickets/{id}/tags.json \
131
- -v -u {email_address}:{password} -X DELETE \
132
- -d '{ "tags": ["customer"] }'
133
- ```
134
-
135
- #### Example Response
136
-
137
- ```http
138
- Status: 200 OK
139
-
140
- {
141
- "tags": [
142
- "important"
143
- ]
144
- }
145
- ```
@@ -1,688 +0,0 @@
1
- ## Ticket Audits
2
-
3
- Audits are a **read-only** history of all updates to a ticket and the events that occur as a result of these updates. When a Ticket is updated in Zendesk, we store an Audit. Each Audit represents a single update to the Ticket, and each Audit includes a list of changes, such as:
4
-
5
- * Changes to ticket fields
6
- * Addition of a new comment
7
- * Addition or removal of tags
8
- * Notifications sent to Groups, Assignees, Requesters and CCs
9
-
10
- To learn more about adding new comments to tickets, [see our Ticket documentation](tickets.html#updating-tickets).
11
-
12
- ### JSON Format
13
- Audits are represented as JSON objects which have the following keys:
14
-
15
- | Name | Type | Read-only | Comment
16
- | ---------- | ---------------------- | --------- | -------
17
- | id | integer | yes | Automatically assigned when creating audits
18
- | ticket_id | integer | yes | The ID of the associated ticket
19
- | metadata | hash | yes | Metadata for the audit, custom and system data
20
- | Via | [Via](#the-via-object) | yes | This object explains how this audit was created
21
- | created_at | date | yes | The time the audit was created
22
- | author_id | integer | yes | The user who created the audit
23
- | events | array | yes | An array of the events that happened in this audit. See [Audit Events](#audit-events)
24
-
25
- #### Example
26
- ```js
27
- {
28
- "id": 35436,
29
- "ticket_id": 47,
30
- "created_at": "2009-07-20T22:55:29Z",
31
- "author_id": 35436,
32
- "metadata": { "custom": { "time_spent": "3m22s" }, "system": { "ip_address": "184.106.40.75" }}
33
- "via": {
34
- "channel": "web"
35
- },
36
- "events": [
37
- {
38
- "id": 1564245,
39
- "type": "Comment"
40
- "body": "Thanks for your help!",
41
- "public": true,
42
- "attachments": []
43
- },
44
- {
45
- "id": 1564246,
46
- "type": "Notification"
47
- "subject": "Your ticket has been updated"
48
- "body": "Ticket #47 has been updated"
49
- }
50
- ]
51
- }
52
- ```
53
-
54
- ### Listing Audits
55
- `GET /api/v2/tickets/{ticket_id}/audits.json`
56
-
57
- #### Allowed For
58
-
59
- * Agents
60
-
61
- #### Using curl
62
-
63
- ```bash
64
- curl https://{subdomain}.zendesk.com/api/v2/tickets/{ticket_id}/audits.json \
65
- -v -u {email_address}:{password}
66
- ```
67
-
68
- #### Example Response
69
- ```http
70
- Status: 200 OK
71
-
72
- {
73
- "previous_page": null,
74
- "next_page": null,
75
- "count": 5,
76
- "audits": [
77
- {
78
- "created_at": "2011/09/25 22:35:44 -0700",
79
- "via": {
80
- "channel": "web"
81
- },
82
- "metadata": {
83
- "system": {
84
- "location": "San Francisco, CA, United States",
85
- "client": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.186 Safari/535.1",
86
- "ip_address": "76.218.201.212"
87
- },
88
- "custom": {
89
- }
90
- },
91
- "id": 2127301143,
92
- "ticket_id": 666,
93
- "events": [
94
- {
95
- "html_body": "<p>This is a new private comment</p>",
96
- "public": false,
97
- "body": "This is a new private comment",
98
- "id": 2127301148,
99
- "type": "Comment",
100
- "attachments": [
101
- ]
102
- },
103
- {
104
- "via": {
105
- "channel": "rule",
106
- "source": {
107
- "title": "Assign to first responder",
108
- "rel": "trigger",
109
- "id": 22472716,
110
- "type": "rule"
111
- }
112
- },
113
- "id": 2127301163,
114
- "value": "open",
115
- "type": "Change",
116
- "previous_value": "new",
117
- "field_name": "status"
118
- }
119
- ],
120
- "author_id": 5246746
121
- },
122
- ...
123
- {
124
- ...
125
- "events": [
126
- ...
127
- ],
128
- }
129
- ]
130
- }
131
- ```
132
-
133
- ### Show Audit
134
- `GET /api/v2/tickets/{ticket_id}/audits/{id}.json`
135
-
136
- #### Allowed For
137
-
138
- * Agents
139
-
140
- #### Using curl
141
-
142
- ```bash
143
- curl https://{subdomain}.zendesk.com/api/v2/tickets/{ticket_id}/audits/{id}.json \
144
- -v -u {email_address}:{password}
145
- ```
146
-
147
- #### Example Response
148
- ```http
149
- Status: 200 OK
150
-
151
- {
152
- "audit": {
153
- "created_at": "2011/09/25 22:35:44 -0700",
154
- "via": {
155
- "channel": "web"
156
- },
157
- "metadata": {
158
- "system": {
159
- "location": "San Francisco, CA, United States",
160
- "client": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.835.186 Safari/535.1",
161
- "ip_address": "76.218.201.212"
162
- },
163
- "custom": {
164
- }
165
- },
166
- "id": 2127301143,
167
- "ticket_id": 666,
168
- "events": [
169
- {
170
- "html_body": "<p>This is a new private comment</p>",
171
- "public": false,
172
- "body": "This is a new private comment",
173
- "id": 2127301148,
174
- "type": "Comment",
175
- "attachments": []
176
- },
177
- {
178
- "via": {
179
- "channel": "rule",
180
- "source": {
181
- "title": "Assign to first responder",
182
- "rel": "trigger",
183
- "id": 22472716,
184
- "type": "rule"
185
- }
186
- },
187
- "id": 2127301163,
188
- "value": "open",
189
- "type": "Change",
190
- "previous_value": "new",
191
- "field_name": "status"
192
- }
193
- ],
194
- "author_id": 5246746
195
- }
196
- }
197
- ```
198
-
199
- ### Marking an Audit as trusted
200
- `PUT /api/v2/tickets/{ticket_id}/audits/{id}/trust.json`
201
-
202
- #### Allowed For
203
-
204
- * Agents
205
-
206
- #### Using curl
207
-
208
- ```bash
209
- curl https://{subdomain}.zendesk.com/api/v2/tickets/{ticket_id}/audits/{id}/trust.json \
210
- -v -u {email_address}:{password} -X PUT
211
- ```
212
-
213
- #### Example Response
214
- ```http
215
- Status: 200 OK
216
- ```
217
-
218
- ### Change a comment from public to private
219
- `PUT /api/v2/tickets/{ticket_id}/audits/{id}/make_private.json`
220
-
221
- #### Allowed For
222
-
223
- * Agents
224
-
225
- #### Using curl
226
-
227
- ```bash
228
- curl https://{subdomain}.zendesk.com/api/v2/tickets/{ticket_id}/audits/{id}/make_private.json \
229
- -v -u {email_address}:{password} -X PUT
230
- ```
231
-
232
- #### Example Response
233
- ```http
234
- Status: 200 OK
235
- ```
236
-
237
- ### The Via Object
238
-
239
- The via object of a ticket audit or audit event tells you how or why the audit or event was created.
240
- Via Objects can have the following keys:
241
-
242
- | Name | Type | Comment
243
- | ---------- | ------- | -------
244
- | channel | string | This tells you how the ticket or event was created
245
- | source | object | For some channels a source object gives more information about how or why the ticket or event was created
246
-
247
- All via objects have a channel, but not all have a source. These are the different possible values for the channel and source values:
248
-
249
- | channel | source | Description
250
- | ------------ | ------ | -----------
251
- | web | none, feedback_tab or batch | The ticket, audit, or event was created via the web interface
252
- | email | none | The ticket, audit, or event was created via email
253
- | api | none, ticket_sharing or import | The ticket, audit, or event was created via the API
254
- | rule | none | The ticket, audit, or event was created via a trigger or automation
255
- | forum | none | The ticket, audit, or event was created via the forums
256
- | twitter | favorite, mention or direct_message | The ticket, audit, or event was created via Twitter
257
- | chat | none | The ticket, audit, or event was created via chat
258
- | voice | voicemail, inbound or outbound | The ticket, audit, or event was created via a phone call
259
- | sms | none | The ticket, audit, or event was created via a text message
260
- | facebook | post or message | The ticket, audit, or event was created via Facebook
261
- | system | linked_problem, merge, follow_up | The ticket, audit, or event was created by the system
262
-
263
- ### Audit Events
264
-
265
- An Audit contains many Events. These Events represent all activity which occurs on a Ticket, including public and private Comments, field changes, notifications send by business rule execution, and events which send notification to external services via our Targets framework.
266
-
267
- If an Event has a different Via than its Audit, it will have its own Via object.
268
-
269
- #### Ticket Comments
270
- Comments represent the conversation between Requesters, Collaborators and Agents on a ticket. Comments can be public or private.
271
-
272
- Ticket comments have the following keys:
273
-
274
- | Name | Type | Read-only | Comment
275
- | --------------- | ------- | --------- | -------
276
- | id | integer | yes | Automatically assigned when creating events
277
- | type | string | yes | Has the value `Comment`
278
- | body | string | yes | The actual comment made by the author
279
- | html_body | string | yes | The actual comment made by the author formatted to HTML
280
- | public | boolean | yes | If this is a public comment or an internal agents only note
281
- | trusted | boolean | yes | If this comment is trusted or marked as being potentially fraudulent
282
- | author_id | integer | yes | The id of the author of this comment
283
- | attachments | array | yes | The attachments on this comment as [Attachment](attachments.md) objects
284
-
285
- #### Example
286
- ```js
287
- {
288
- "id": 1274,
289
- "type": "Comment"
290
- "body": "Thanks for your help!",
291
- "public": true,
292
- "author_id": 1,
293
- "attachments": [
294
- {
295
- "id": 498483,
296
- "name": "crash.log",
297
- "content_url": "https://company.zendesk.com/attachments/crash.log",
298
- "content_type": "text/plain",
299
- "size": 2532,
300
- "thumbnails": []
301
- }
302
- ]
303
- }
304
- ```
305
-
306
- #### Ticket Voice Comments
307
- Voice Comments are added to a ticket via our integrated Zendesk Voice feature.
308
-
309
- Voice Comments have the following keys:
310
-
311
- | Name | Type | Read-only | Comment
312
- | --------------- | ------- | --------- | -------
313
- | id | integer | yes | Automatically assigned when creating events
314
- | type | string | yes | Has the value `VoiceComment`
315
- | data | string | yes | A hash of properties about the call
316
- | public | boolean | yes | If true, the ticket requester can see this comment
317
- | formatted_from | string | yes | A formatted version of the phone number which dialed the call
318
- | formatted_to | string | yes | A formatted version of the phone number which answered the call
319
- | body | string | yes | The actual comment made by the author
320
- | html_body | string | yes | The actual comment made by the author formatted to HTML
321
- | public | boolean | yes | If this is a public comment or an internal agents only note
322
- | trusted | boolean | yes | If this comment is trusted or marked as being potentially fraudulent
323
- | author_id | integer | yes | The id of the author of this comment
324
- | attachments | array | yes | The attachments on this comment as [Attachment](attachments.md) objects
325
-
326
- #### Example
327
- ```js
328
- {
329
- "id": 1274,
330
- "type": "VoiceComment"
331
- "body": "Thanks for your help!",
332
- "data": {
333
- "from": "+14156973270",
334
- "to": "+14129996294",
335
- "recording_url": "http//api.twilio.com/2010-04-01/Accounts/accountsid/Recordings/recording_sid",
336
- "recording_duration": "7",
337
- "call_duration": 60,
338
- "call_id": 171,
339
- "answered_by_id": 6, # not present for voicemails
340
- "transcription_text": "Hello", # only present for voicemails with transcription enabled
341
- "transcription_status": "completed", # only present for voicemails with transcription enabled
342
- "started_at": 2012-11-16 223622 UTC,
343
- "location": "San Francisco, California, United States",
344
- "voice_transcription": true,
345
- "outbound": false
346
- },
347
- "formatted_from": "+1 (123) 654-7890",
348
- "formatted_to": "+1 (123) 325-7890",
349
- "transcription_visible": true,
350
- "public": true,
351
- "author_id": 1,
352
- "body": "Request #219 "request" was closed and merged into this request.",
353
- "html_body": "<p>Request <a target="_blank" href="/tickets/219">#219</a> &quot;aa&quot; was closed and merged into this request.</p>",
354
- "trusted": true,
355
- "attachments": []
356
- }
357
- ```
358
-
359
- #### Ticket Comment Privacy Change
360
- If an Agent erroneously makes a public comment on a Ticket when they intended for it to be private, they can mark the comment as private. This event tracks the fact that this occurred.
361
-
362
- Ticket comment privacy change events have the following keys:
363
-
364
- | Name | Type | Read-only | Comment
365
- | --------------- | ------- | --------- | -------
366
- | id | integer | yes | Automatically assigned when creating events
367
- | type | string | yes | Has the value `CommentPrivacyChange`
368
- | comment_id | integer | yes | The id if the comment that changed privacy
369
- | public | boolean | yes | Tells if the comment was made public or private
370
-
371
- #### Example
372
- ```js
373
- {
374
- "id": 1274,
375
- "type": "CommentPrivacyChange",
376
- "comment_id": 453,
377
- "public": false
378
- }
379
- ```
380
-
381
- #### Ticket Create Events
382
- Each property that is set on a newly created Ticket is tracked with a Create event.
383
-
384
- Create events have the following keys:
385
-
386
- | Name | Type | Read-only | Comment
387
- | ---------- | --------------- | --------- | -------
388
- | id | integer | yes | Automatically assigned when creating events
389
- | type | string | yes | Has the value `Create`
390
- | field_name | string | yes | The name of the field that was set
391
- | value | string / array | yes | The value of the field that was set
392
-
393
- `value` will always be a string, except when when the `field_name` is `tags`
394
-
395
- #### Example
396
- ```js
397
- {
398
- "id": 1274,
399
- "type": "Create"
400
- "field_name": "status",
401
- "value": "new"
402
- }
403
- ```
404
-
405
- #### Ticket Change Events
406
- When a ticket is updated, Change events track the previous and newly updated value of each ticket property.
407
-
408
- Change events have the following keys:
409
-
410
- | Name | Type | Read-only | Comment
411
- | -------------- | --------------- | --------- | -------
412
- | id | integer | yes | Automatically assigned when creating events
413
- | type | string | yes | Has the value `Change`
414
- | field_name | string | yes | The name of the field that was changed
415
- | value | string / array | yes | The value of the field that was changed
416
- | previous_value | string / array | yes | The previous value of the field that was changed
417
-
418
- `value` and `previous_value` will always be strings, except when when the `field_name` is `tags`
419
-
420
- #### Example
421
- ```js
422
- {
423
- "id": 1274,
424
- "type": "Change"
425
- "field_name": "subject",
426
- "value": "My printer is on fire!",
427
- "previous_value": "I need help!"
428
- }
429
- ```
430
-
431
- #### Notifications
432
- When a Ticket is created or updated, business rules are evaluated against the Ticket. These business rules can be configured to send various notifications.
433
-
434
- Notifications have the following keys:
435
-
436
- | Name | Type | Read-only | Comment
437
- | --------------- | ---------------------- | --------- | -------
438
- | id | integer | yes | Automatically assigned when creating events
439
- | type | string | yes | Has the value `Notification`
440
- | subject | string | yes | The subject of the message sent to the recipients
441
- | body | string | yes | The message sent to the recipients
442
- | recipients | array | yes | A array of simple object holding the ids and names of the recipients of this notification
443
- | via | [Via](#the-via-object) | yes | A reference to the trigger that created this notification
444
-
445
- #### Example
446
- ```js
447
- {
448
- "id": 1275,
449
- "type": "Notification"
450
- "subject": "Your ticket has been updated"
451
- "body": "Ticket #235 has been updated"
452
- "recipients": [847390, 93905],
453
- "via": {
454
- "channel": "system",
455
- "source": {
456
- "type": "rule",
457
- "id": 61,
458
- "title": "Notify assignee of comment update"
459
- }
460
- }
461
- }
462
- ```
463
-
464
- #### Ticket CC Events
465
- When a CC (also known as a Collaborator) is notified of a Ticket update, a CC event is added.
466
-
467
- Ticket CC Events have the following keys:
468
-
469
- | Name | Type | Read-only | Comment
470
- | --------------- | ---------------------- | --------- | -------
471
- | id | integer | yes | Automatically assigned when creating events
472
- | type | string | yes | Has the value `Cc`
473
- | recipients | array | yes | A array of simple object holding the ids and names of the recipients of this notification
474
- | via | [Via](#the-via-object) | yes | A reference to the trigger that created this notification
475
-
476
- #### Example
477
- ```js
478
- {
479
- "id": 1275,
480
- "type": "Cc"
481
- "recipients": [847390, 93905],
482
- "via": {
483
- "channel": "system",
484
- "source": {
485
- "type": "rule",
486
- "id": 61,
487
- "title": "Notify assignee of comment update"
488
- }
489
- }
490
- }
491
- ```
492
-
493
- #### Ticket Errors
494
-
495
- Ticket Error events track any system errors that occur in the processing of a ticket.
496
-
497
- Ticket errors have the following keys:
498
-
499
- | Name | Type | Read-only | Comment
500
- | --------------- | ------- | --------- | -------
501
- | id | integer | yes | Automatically assigned when creating events
502
- | type | string | yes | Has the value `Error`
503
- | message | string | yes | The error message
504
-
505
- #### Example
506
- ```js
507
- {
508
- "id": 1274,
509
- "type": "Error",
510
- "message": 453
511
- }
512
- ```
513
-
514
- #### External Ticket Events
515
-
516
- External ticket events have the following keys:
517
-
518
- | Name | Type | Read-only | Comment
519
- | --------------- | ------- | --------- | -------
520
- | id | integer | yes | Automatically assigned when creating events
521
- | type | string | yes | Has the value `External`
522
- | resource | string | yes | TODO
523
- | body | string | yes | TODO
524
- | success | string | yes | TODO
525
-
526
- #### Example
527
- ```js
528
- {
529
- "id": 1274,
530
- "type": "External",
531
- "resource": "WE NEED A GOOD EXAMPLE", //TODO
532
- "body": "WE NEED A GOOD EXAMPLE", //TODO
533
- "success": "WE NEED A GOOD EXAMPLE" //TODO
534
- }
535
- ```
536
-
537
- #### Facebook Events
538
- Facebook Events track when a Facebook comment was posted back to a Facebook Wall post or Facebook Page private message.
539
-
540
- Facebook Events have the following keys:
541
-
542
- | Name | Type | Read-only | Comment
543
- | --------------- | ------- | --------- | -------
544
- | id | integer | yes | Automatically assigned when creating events
545
- | type | string | yes | Has the value `FacebookEvent`
546
- | page | hash | yes | The name and graph id of the Facebook Page associated with the event
547
- | communication | integer | yes | The Zendesk id of the associated communication (wall post or message)
548
- | ticket_via | string | yes | "post" or "message" depending on association with a Wall Post or a Private Message
549
- | body | string | yes | The value of the message posted to Facebook
550
-
551
- #### Example
552
- ```js
553
- {
554
- "id": 1274,
555
- "type": "FacebookEvent",
556
- "page": {
557
- "name" => "Zendesk",
558
- "graph_id" => "61675732935"
559
- },
560
- "communication" => 5,
561
- "ticket_via" => "post"
562
- "body" => "Thanks!"
563
- }
564
- ```
565
-
566
- #### Log Me In Transcript Events
567
- Log Me In Transcript events have the following keys:
568
-
569
- | Name | Type | Read-only | Comment
570
- | --------------- | ------- | --------- | -------
571
- | id | integer | yes | Automatically assigned when creating events
572
- | type | string | yes | Has the value `LogMeInTranscript`
573
- | body | string | yes | TODO
574
-
575
- #### Example
576
- ```js
577
- {
578
- "id": 1274,
579
- "type": "LogMeInTranscript",
580
- "body": "WE NEED A GOOD EXAMPLE" //TODO
581
- }
582
- ```
583
-
584
- #### Push Events
585
- Push events have the following keys:
586
-
587
- | Name | Type | Read-only | Comment
588
- | --------------- | ------- | --------- | -------
589
- | id | integer | yes | Automatically assigned when creating events
590
- | type | string | yes | Has the value `Push`
591
- | value | string | yes | TODO
592
- | value_reference | string | yes | TODO
593
-
594
- #### Example
595
- ```js
596
- {
597
- "id": 1274,
598
- "type": "Push",
599
- "value": "WE NEED A GOOD EXAMPLE", //TODO
600
- "value_reference": "WE NEED A GOOD EXAMPLE" //TODO
601
- }
602
- ```
603
-
604
- #### Satisfaction Rating Events
605
- Satisfaction rating events have the following keys:
606
-
607
- | Name | Type | Read-only | Comment
608
- | --------------- | ------- | --------- | -------
609
- | id | integer | yes | Automatically assigned when creating events
610
- | type | string | yes | Has the value `SatisfactionRating`
611
- | score | string | yes | The rating state "offered", "unoffered", "good", "bad"
612
- | assignee_id | integer | yes | Who the ticket was assigned to upon rating time
613
- | body | string | yes | The users comment posted during rating
614
-
615
- #### Example
616
- ```js
617
- {
618
- "id": 1274,
619
- "type": "SatisfactionRating",
620
- "score": "good",
621
- "assignee_id": 87374,
622
- "body": "Thanks, you guys are great!"
623
- }
624
- ```
625
-
626
- #### Tweet Events
627
- Tweet events have the following keys:
628
-
629
- | Name | Type | Read-only | Comment
630
- | --------------- | ------- | --------- | -------
631
- | id | integer | yes | Automatically assigned when creating events
632
- | type | string | yes | Has the value `Tweet`
633
- | direct_message | boolean | yes | Whether this tweet was a direct message
634
- | body | string | yes | The body of the tweet
635
- | recipients | array | yes | The recipients of this tweet
636
-
637
- #### Example
638
- ```js
639
- {
640
- "id": 1274,
641
- "type": "Tweet",
642
- "direct_message": false,
643
- "body": "Hi there",
644
- "recipients": [847390, 93905]
645
- }
646
- ```
647
-
648
- #### SMS Events
649
- SMS events have the following keys:
650
-
651
- | Name | Type | Read-only | Comment
652
- | --------------- | ------- | --------- | -------
653
- | id | integer | yes | Automatically assigned when creating events
654
- | type | string | yes | Has the value `SMS`
655
- | body | string | yes | TODO
656
- | phone_number | string | yes | TODO
657
- | recipient_id | string | yes | TODO
658
-
659
- #### Example
660
- ```js
661
- {
662
- "id": 1274,
663
- "type": "SMS",
664
- "body": "There is an update on Zendesk Ticket #5656",
665
- "phone_number": "555 123 4567",
666
- "recipient_id": 9873938
667
- }
668
- ```
669
-
670
- #### Ticket Sharing Events
671
- Ticket sharing events have the following keys:
672
-
673
- | Name | Type | Read-only | Comment
674
- | --------------- | ------- | --------- | -------
675
- | id | integer | yes | Automatically assigned when creating events
676
- | type | string | yes | Has the value `TicketSharingEvent`
677
- | agreement_id | integer | yes | TODO
678
- | action | string | yes | either `shared` or `unshared` TODO
679
-
680
- #### Example
681
- ```js
682
- {
683
- "id": 1274,
684
- "type": "TicketSharingEvent",
685
- "agreement_id": 3454,
686
- "action": "shared"
687
- }
688
- ```