zendesk_api 0.1.11 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +3 -0
- data/.travis.yml +1 -3
- data/Gemfile +24 -0
- data/Gemfile.lock +75 -10
- data/Procfile +1 -0
- data/Rakefile +10 -3
- data/Readme.md +65 -0
- data/bin/zendesk +26 -0
- data/config.ru +6 -0
- data/config/mongoid.yml +81 -0
- data/lib/zendesk_api/actions.rb +2 -2
- data/lib/zendesk_api/collection.rb +15 -4
- data/lib/zendesk_api/console/base.rb +12 -0
- data/lib/zendesk_api/console/console.rb +144 -0
- data/lib/zendesk_api/console/extensions.rb +183 -0
- data/lib/zendesk_api/console/options.rb +41 -0
- data/lib/zendesk_api/resource.rb +12 -1
- data/lib/zendesk_api/resources.rb +28 -8
- data/lib/zendesk_api/server/base.rb +119 -0
- data/lib/zendesk_api/server/docs/account_settings.md +145 -0
- data/lib/zendesk_api/server/docs/activity_stream.md +121 -0
- data/lib/zendesk_api/server/docs/attachments.md +73 -0
- data/lib/zendesk_api/server/docs/autocomplete.md +29 -0
- data/lib/zendesk_api/server/docs/categories.md +193 -0
- data/lib/zendesk_api/server/docs/custom_roles.md +88 -0
- data/lib/zendesk_api/server/docs/forum_subscriptions.md +139 -0
- data/lib/zendesk_api/server/docs/forums.md +229 -0
- data/lib/zendesk_api/server/docs/group_memberships.md +229 -0
- data/lib/zendesk_api/server/docs/groups.md +212 -0
- data/lib/zendesk_api/server/docs/introduction.md +159 -0
- data/lib/zendesk_api/server/docs/job_statuses.md +86 -0
- data/lib/zendesk_api/server/docs/locales.md +124 -0
- data/lib/zendesk_api/server/docs/macros.md +287 -0
- data/lib/zendesk_api/server/docs/organizations.md +253 -0
- data/lib/zendesk_api/server/docs/problems.md +117 -0
- data/lib/zendesk_api/server/docs/requests.md +256 -0
- data/lib/zendesk_api/server/docs/satisfaction_ratings.md +136 -0
- data/lib/zendesk_api/server/docs/search.md +106 -0
- data/lib/zendesk_api/server/docs/sharing_agreements.md +57 -0
- data/lib/zendesk_api/server/docs/side_loading.md +125 -0
- data/lib/zendesk_api/server/docs/suspended_tickets.md +182 -0
- data/lib/zendesk_api/server/docs/tags.md +36 -0
- data/lib/zendesk_api/server/docs/ticket_audits.md +657 -0
- data/lib/zendesk_api/server/docs/ticket_export.md +121 -0
- data/lib/zendesk_api/server/docs/ticket_fields.md +277 -0
- data/lib/zendesk_api/server/docs/ticket_import.md +65 -0
- data/lib/zendesk_api/server/docs/ticket_metrics.md +125 -0
- data/lib/zendesk_api/server/docs/tickets.md +622 -0
- data/lib/zendesk_api/server/docs/topic_comments.md +221 -0
- data/lib/zendesk_api/server/docs/topic_subscriptions.md +140 -0
- data/lib/zendesk_api/server/docs/topic_votes.md +154 -0
- data/lib/zendesk_api/server/docs/topics.md +335 -0
- data/lib/zendesk_api/server/docs/triggers.md +199 -0
- data/lib/zendesk_api/server/docs/user_identities.md +279 -0
- data/lib/zendesk_api/server/docs/users.md +400 -0
- data/lib/zendesk_api/server/docs/views.md +505 -0
- data/lib/zendesk_api/server/helper.rb +104 -0
- data/lib/zendesk_api/server/html_renderer.rb +98 -0
- data/lib/zendesk_api/server/models/user_request.rb +16 -0
- data/lib/zendesk_api/server/models/zlib_json.rb +13 -0
- data/lib/zendesk_api/server/public/config.rb +26 -0
- data/lib/zendesk_api/server/public/favicon.ico +0 -0
- data/lib/zendesk_api/server/public/images/glyphicons-halflings-white.png +0 -0
- data/lib/zendesk_api/server/public/images/glyphicons-halflings.png +0 -0
- data/lib/zendesk_api/server/public/images/spinner.gif +0 -0
- data/lib/zendesk_api/server/public/images/zendesk_developers_bg.png +0 -0
- data/lib/zendesk_api/server/public/images/zendesk_developers_header.png +0 -0
- data/lib/zendesk_api/server/public/javascripts/application.js +186 -0
- data/lib/zendesk_api/server/public/javascripts/bootstrap-alert.js +90 -0
- data/lib/zendesk_api/server/public/javascripts/bootstrap-button.js +96 -0
- data/lib/zendesk_api/server/public/javascripts/bootstrap-carousel.js +169 -0
- data/lib/zendesk_api/server/public/javascripts/bootstrap-collapse.js +157 -0
- data/lib/zendesk_api/server/public/javascripts/bootstrap-dropdown.js +100 -0
- data/lib/zendesk_api/server/public/javascripts/bootstrap-modal.js +218 -0
- data/lib/zendesk_api/server/public/javascripts/bootstrap-popover.js +98 -0
- data/lib/zendesk_api/server/public/javascripts/bootstrap-scrollspy.js +151 -0
- data/lib/zendesk_api/server/public/javascripts/bootstrap-tab.js +135 -0
- data/lib/zendesk_api/server/public/javascripts/bootstrap-tooltip.js +275 -0
- data/lib/zendesk_api/server/public/javascripts/bootstrap-transition.js +61 -0
- data/lib/zendesk_api/server/public/javascripts/bootstrap-typeahead.js +285 -0
- data/lib/zendesk_api/server/public/sass/screen.scss +102 -0
- data/lib/zendesk_api/server/public/sass/styles.scss +5 -0
- data/lib/zendesk_api/server/public/stylesheets/developer.screen.css +836 -0
- data/lib/zendesk_api/server/public/stylesheets/screen.css +129 -0
- data/lib/zendesk_api/server/public/stylesheets/styles.css +6208 -0
- data/lib/zendesk_api/server/templates/footer.haml +13 -0
- data/lib/zendesk_api/server/templates/header.haml +20 -0
- data/lib/zendesk_api/server/templates/index.haml +68 -0
- data/lib/zendesk_api/server/templates/layout.haml +44 -0
- data/lib/zendesk_api/server/templates/param.haml +4 -0
- data/lib/zendesk_api/server/templates/search.haml +23 -0
- data/lib/zendesk_api/server/templates/sidebar.haml +7 -0
- data/lib/zendesk_api/version.rb +1 -1
- data/spec/{association_spec.rb → core/association_spec.rb} +1 -1
- data/spec/{client_spec.rb → core/client_spec.rb} +1 -1
- data/spec/{collection_spec.rb → core/collection_spec.rb} +1 -1
- data/spec/{configuration_spec.rb → core/configuration_spec.rb} +1 -1
- data/spec/{create_resource_spec.rb → core/create_resource_spec.rb} +1 -1
- data/spec/{data_resource_spec.rb → core/data_resource_spec.rb} +1 -1
- data/spec/{inflection_spec.rb → core/inflection_spec.rb} +1 -1
- data/spec/{lru_cache_spec.rb → core/lru_cache_spec.rb} +1 -1
- data/spec/{middleware → core/middleware}/request/etag_cache_spec.rb +1 -1
- data/spec/{middleware → core/middleware}/request/retry_spec.rb +1 -1
- data/spec/{middleware → core/middleware}/request/test.jpg +0 -0
- data/spec/{middleware → core/middleware}/request/upload_spec.rb +1 -1
- data/spec/{middleware → core/middleware}/response/callback_spec.rb +1 -1
- data/spec/{middleware → core/middleware}/response/deflate_spec.rb +1 -1
- data/spec/{middleware → core/middleware}/response/gzip_spec.rb +1 -1
- data/spec/{middleware → core/middleware}/response/parse_iso_dates_spec.rb +1 -1
- data/spec/{read_resource_spec.rb → core/read_resource_spec.rb} +1 -1
- data/spec/{rescue_spec.rb → core/rescue_spec.rb} +1 -1
- data/spec/{resource_spec.rb → core/resource_spec.rb} +1 -1
- data/spec/{search_spec.rb → core/search_spec.rb} +1 -1
- data/spec/{spec_helper.rb → core/spec_helper.rb} +5 -5
- data/spec/{trackie_spec.rb → core/trackie_spec.rb} +1 -1
- data/{live → spec/live}/Readme.md +0 -0
- data/{live → spec/live}/activity_spec.rb +1 -1
- data/{live → spec/live}/audit_spec.rb +1 -1
- data/{live → spec/live}/bookmark_spec.rb +1 -1
- data/{live → spec/live}/category_spec.rb +1 -1
- data/{live → spec/live}/collection_spec.rb +1 -1
- data/{live → spec/live}/crm_spec.rb +1 -1
- data/{live → spec/live}/custom_role_spec.rb +1 -1
- data/{live → spec/live}/forum_spec.rb +1 -1
- data/{live → spec/live}/forum_subscription_spec.rb +1 -1
- data/{live → spec/live}/group_membership_spec.rb +1 -1
- data/{live → spec/live}/group_spec.rb +1 -1
- data/{live → spec/live}/identity_spec.rb +1 -1
- data/{live → spec/live}/locale_spec.rb +1 -1
- data/{live → spec/live}/macro_spec.rb +1 -1
- data/{live → spec/live}/mobile_device_spec.rb +1 -1
- data/{live → spec/live}/organization_spec.rb +1 -1
- data/{live → spec/live}/request_spec.rb +1 -1
- data/{live → spec/live}/satisfaction_rating_spec.rb +1 -1
- data/{live → spec/live}/setting_spec.rb +1 -1
- data/{live → spec/live}/suspended_ticket_spec.rb +1 -1
- data/{live → spec/live}/ticket_field_spec.rb +1 -1
- data/{live → spec/live}/ticket_metrics_spec.rb +1 -1
- data/{live → spec/live}/ticket_spec.rb +1 -1
- data/spec/live/topic_comment_spec.rb +24 -0
- data/{live → spec/live}/topic_spec.rb +1 -1
- data/{live → spec/live}/topic_subscription_spec.rb +1 -1
- data/{live → spec/live}/topic_vote_spec.rb +1 -1
- data/{live → spec/live}/upload_spec.rb +1 -1
- data/{live → spec/live}/user_spec.rb +1 -1
- data/{live → spec/live}/view_spec.rb +1 -1
- data/spec/macros/resource_macros.rb +1 -1
- data/spec/server/app_spec.rb +140 -0
- data/spec/server/helper_spec.rb +97 -0
- data/spec/server/html_renderer_spec.rb +130 -0
- data/spec/server/spec_helper.rb +43 -0
- metadata +198 -77
- data/live/topic_comment_spec.rb +0 -13
@@ -0,0 +1,36 @@
|
|
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
|
+
```
|
@@ -0,0 +1,657 @@
|
|
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
|
+
|
318
|
+
#### Example
|
319
|
+
```js
|
320
|
+
{
|
321
|
+
"id": 1274,
|
322
|
+
"type": "VoiceComment"
|
323
|
+
"body": "Thanks for your help!",
|
324
|
+
"data": TODO
|
325
|
+
"formatted_from": TODO
|
326
|
+
"transcription_visible": TODO
|
327
|
+
"public": true,
|
328
|
+
"attachments": []
|
329
|
+
}
|
330
|
+
```
|
331
|
+
|
332
|
+
#### Ticket Comment Privacy Change
|
333
|
+
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.
|
334
|
+
|
335
|
+
Ticket comment privacy change events have the following keys:
|
336
|
+
|
337
|
+
| Name | Type | Read-only | Comment
|
338
|
+
| --------------- | ------- | --------- | -------
|
339
|
+
| id | integer | yes | Automatically assigned when creating events
|
340
|
+
| type | string | yes | Has the value `CommentPrivacyChange`
|
341
|
+
| comment_id | integer | yes | The id if the comment that changed privacy
|
342
|
+
| public | boolean | yes | Tells if the comment was made public or private
|
343
|
+
|
344
|
+
#### Example
|
345
|
+
```js
|
346
|
+
{
|
347
|
+
"id": 1274,
|
348
|
+
"type": "CommentPrivacyChange",
|
349
|
+
"comment_id": 453,
|
350
|
+
"public": false
|
351
|
+
}
|
352
|
+
```
|
353
|
+
|
354
|
+
#### Ticket Create Events
|
355
|
+
Each property that is set on a newly created Ticket is tracked with a Create event.
|
356
|
+
|
357
|
+
Create events have the following keys:
|
358
|
+
|
359
|
+
| Name | Type | Read-only | Comment
|
360
|
+
| ---------- | ------- | --------- | -------
|
361
|
+
| id | integer | yes | Automatically assigned when creating events
|
362
|
+
| type | string | yes | Has the value `Create`
|
363
|
+
| field_name | string | yes | The name of the field that was set
|
364
|
+
| value | string | yes | The value of the field that was set
|
365
|
+
|
366
|
+
#### Example
|
367
|
+
```js
|
368
|
+
{
|
369
|
+
"id": 1274,
|
370
|
+
"type": "Create"
|
371
|
+
"field_name": "status",
|
372
|
+
"value": "new"
|
373
|
+
}
|
374
|
+
```
|
375
|
+
|
376
|
+
#### Ticket Change Events
|
377
|
+
When a ticket is updated, Change events track the previous and newly updated value of each ticket property.
|
378
|
+
|
379
|
+
Change events have the following keys:
|
380
|
+
|
381
|
+
| Name | Type | Read-only | Comment
|
382
|
+
| -------------- | ------- | --------- | -------
|
383
|
+
| id | integer | yes | Automatically assigned when creating events
|
384
|
+
| type | string | yes | Has the value `Change`
|
385
|
+
| field_name | string | yes | The name of the field that was changed
|
386
|
+
| value | string | yes | The value of the field that was changed
|
387
|
+
| previous_value | string | yes | The previous value of the field that was changed
|
388
|
+
|
389
|
+
#### Example
|
390
|
+
```js
|
391
|
+
{
|
392
|
+
"id": 1274,
|
393
|
+
"type": "Change"
|
394
|
+
"field_name": "subject",
|
395
|
+
"value": "My printer is on fire!",
|
396
|
+
"previous_value": "I need help!"
|
397
|
+
}
|
398
|
+
```
|
399
|
+
|
400
|
+
#### Notifications
|
401
|
+
When a Ticket is created or updated, business rules are evaluated against the Ticket. These business rules can be configured to send various notifications.
|
402
|
+
|
403
|
+
Notifications have the following keys:
|
404
|
+
|
405
|
+
| Name | Type | Read-only | Comment
|
406
|
+
| --------------- | ---------------------- | --------- | -------
|
407
|
+
| id | integer | yes | Automatically assigned when creating events
|
408
|
+
| type | string | yes | Has the value `Notification`
|
409
|
+
| subject | string | yes | The subject of the message sent to the recipients
|
410
|
+
| body | string | yes | The message sent to the recipients
|
411
|
+
| recipients | array | yes | A array of simple object holding the ids and names of the recipients of this notification
|
412
|
+
| via | [Via](#the-via-object) | yes | A reference to the trigger that created this notification
|
413
|
+
|
414
|
+
#### Example
|
415
|
+
```js
|
416
|
+
{
|
417
|
+
"id": 1275,
|
418
|
+
"type": "Notification"
|
419
|
+
"subject": "Your ticket has been updated"
|
420
|
+
"body": "Ticket #235 has been updated"
|
421
|
+
"recipients": [847390, 93905],
|
422
|
+
"via": {
|
423
|
+
"channel": "system",
|
424
|
+
"source": {
|
425
|
+
"type": "rule",
|
426
|
+
"id": 61,
|
427
|
+
"title": "Notify assignee of comment update"
|
428
|
+
}
|
429
|
+
}
|
430
|
+
}
|
431
|
+
```
|
432
|
+
|
433
|
+
#### Ticket CC Events
|
434
|
+
When a CC (also known as a Collaborator) is notified of a Ticket update, a CC event is added.
|
435
|
+
|
436
|
+
Ticket CC Events have the following keys:
|
437
|
+
|
438
|
+
| Name | Type | Read-only | Comment
|
439
|
+
| --------------- | ---------------------- | --------- | -------
|
440
|
+
| id | integer | yes | Automatically assigned when creating events
|
441
|
+
| type | string | yes | Has the value `Cc`
|
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": "Cc"
|
450
|
+
"recipients": [847390, 93905],
|
451
|
+
"via": {
|
452
|
+
"channel": "system",
|
453
|
+
"source": {
|
454
|
+
"type": "rule",
|
455
|
+
"id": 61,
|
456
|
+
"title": "Notify assignee of comment update"
|
457
|
+
}
|
458
|
+
}
|
459
|
+
}
|
460
|
+
```
|
461
|
+
|
462
|
+
#### Ticket Errors
|
463
|
+
|
464
|
+
Ticket Error events track any system errors that occur in the processing of a ticket.
|
465
|
+
|
466
|
+
Ticket errors have the following keys:
|
467
|
+
|
468
|
+
| Name | Type | Read-only | Comment
|
469
|
+
| --------------- | ------- | --------- | -------
|
470
|
+
| id | integer | yes | Automatically assigned when creating events
|
471
|
+
| type | string | yes | Has the value `Error`
|
472
|
+
| message | string | yes | The error message
|
473
|
+
|
474
|
+
#### Example
|
475
|
+
```js
|
476
|
+
{
|
477
|
+
"id": 1274,
|
478
|
+
"type": "Error",
|
479
|
+
"message": 453
|
480
|
+
}
|
481
|
+
```
|
482
|
+
|
483
|
+
#### External Ticket Events
|
484
|
+
|
485
|
+
External ticket events have the following keys:
|
486
|
+
|
487
|
+
| Name | Type | Read-only | Comment
|
488
|
+
| --------------- | ------- | --------- | -------
|
489
|
+
| id | integer | yes | Automatically assigned when creating events
|
490
|
+
| type | string | yes | Has the value `External`
|
491
|
+
| resource | string | yes | TODO
|
492
|
+
| body | string | yes | TODO
|
493
|
+
| success | string | yes | TODO
|
494
|
+
|
495
|
+
#### Example
|
496
|
+
```js
|
497
|
+
{
|
498
|
+
"id": 1274,
|
499
|
+
"type": "External",
|
500
|
+
"resource": "WE NEED A GOOD EXAMPLE", //TODO
|
501
|
+
"body": "WE NEED A GOOD EXAMPLE", //TODO
|
502
|
+
"success": "WE NEED A GOOD EXAMPLE" //TODO
|
503
|
+
}
|
504
|
+
```
|
505
|
+
|
506
|
+
#### Facebook Events
|
507
|
+
Facebook Events track when a Facebook comment was posted back to a Facebook Wall post or Facebook Page private message.
|
508
|
+
|
509
|
+
Facebook Events have the following keys:
|
510
|
+
|
511
|
+
| Name | Type | Read-only | Comment
|
512
|
+
| --------------- | ------- | --------- | -------
|
513
|
+
| id | integer | yes | Automatically assigned when creating events
|
514
|
+
| type | string | yes | Has the value `FacebookEvent`
|
515
|
+
| page | hash | yes | The name and graph id of the Facebook Page associated with the event
|
516
|
+
| communication | integer | yes | The Zendesk id of the associated communication (wall post or message)
|
517
|
+
| ticket_via | string | yes | "post" or "message" depending on association with a Wall Post or a Private Message
|
518
|
+
| body | string | yes | The value of the message posted to Facebook
|
519
|
+
|
520
|
+
#### Example
|
521
|
+
```js
|
522
|
+
{
|
523
|
+
"id": 1274,
|
524
|
+
"type": "FacebookEvent",
|
525
|
+
"page": {
|
526
|
+
"name" => "Zendesk",
|
527
|
+
"graph_id" => "61675732935"
|
528
|
+
},
|
529
|
+
"communication" => 5,
|
530
|
+
"ticket_via" => "post"
|
531
|
+
"body" => "Thanks!"
|
532
|
+
}
|
533
|
+
```
|
534
|
+
|
535
|
+
#### Log Me In Transcript Events
|
536
|
+
Log Me In Transcript events have the following keys:
|
537
|
+
|
538
|
+
| Name | Type | Read-only | Comment
|
539
|
+
| --------------- | ------- | --------- | -------
|
540
|
+
| id | integer | yes | Automatically assigned when creating events
|
541
|
+
| type | string | yes | Has the value `LogMeInTranscript`
|
542
|
+
| body | string | yes | TODO
|
543
|
+
|
544
|
+
#### Example
|
545
|
+
```js
|
546
|
+
{
|
547
|
+
"id": 1274,
|
548
|
+
"type": "LogMeInTranscript",
|
549
|
+
"body": "WE NEED A GOOD EXAMPLE" //TODO
|
550
|
+
}
|
551
|
+
```
|
552
|
+
|
553
|
+
#### Push Events
|
554
|
+
Push events have the following keys:
|
555
|
+
|
556
|
+
| Name | Type | Read-only | Comment
|
557
|
+
| --------------- | ------- | --------- | -------
|
558
|
+
| id | integer | yes | Automatically assigned when creating events
|
559
|
+
| type | string | yes | Has the value `Push`
|
560
|
+
| value | string | yes | TODO
|
561
|
+
| value_reference | string | yes | TODO
|
562
|
+
|
563
|
+
#### Example
|
564
|
+
```js
|
565
|
+
{
|
566
|
+
"id": 1274,
|
567
|
+
"type": "Push",
|
568
|
+
"value": "WE NEED A GOOD EXAMPLE", //TODO
|
569
|
+
"value_reference": "WE NEED A GOOD EXAMPLE" //TODO
|
570
|
+
}
|
571
|
+
```
|
572
|
+
|
573
|
+
#### Satisfaction Rating Events
|
574
|
+
Satisfaction rating events have the following keys:
|
575
|
+
|
576
|
+
| Name | Type | Read-only | Comment
|
577
|
+
| --------------- | ------- | --------- | -------
|
578
|
+
| id | integer | yes | Automatically assigned when creating events
|
579
|
+
| type | string | yes | Has the value `SatisfactionRating`
|
580
|
+
| score | string | yes | The rating state "offered", "unoffered", "good", "bad"
|
581
|
+
| assignee_id | integer | yes | Who the ticket was assigned to upon rating time
|
582
|
+
| body | string | yes | The users comment posted during rating
|
583
|
+
|
584
|
+
#### Example
|
585
|
+
```js
|
586
|
+
{
|
587
|
+
"id": 1274,
|
588
|
+
"type": "SatisfactionRating",
|
589
|
+
"score": "good",
|
590
|
+
"assignee_id": 87374,
|
591
|
+
"body": "Thanks, you guys are great!"
|
592
|
+
}
|
593
|
+
```
|
594
|
+
|
595
|
+
#### Tweet Events
|
596
|
+
Tweet events have the following keys:
|
597
|
+
|
598
|
+
| Name | Type | Read-only | Comment
|
599
|
+
| --------------- | ------- | --------- | -------
|
600
|
+
| id | integer | yes | Automatically assigned when creating events
|
601
|
+
| type | string | yes | Has the value `Tweet`
|
602
|
+
| direct_message | boolean | yes | Whether this tweet was a direct message
|
603
|
+
| body | string | yes | The body of the tweet
|
604
|
+
| recipients | array | yes | The recipients of this tweet
|
605
|
+
|
606
|
+
#### Example
|
607
|
+
```js
|
608
|
+
{
|
609
|
+
"id": 1274,
|
610
|
+
"type": "Tweet",
|
611
|
+
"direct_message": false,
|
612
|
+
"body": "Hi there",
|
613
|
+
"recipients": [847390, 93905]
|
614
|
+
}
|
615
|
+
```
|
616
|
+
|
617
|
+
#### SMS Events
|
618
|
+
SMS events have the following keys:
|
619
|
+
|
620
|
+
| Name | Type | Read-only | Comment
|
621
|
+
| --------------- | ------- | --------- | -------
|
622
|
+
| id | integer | yes | Automatically assigned when creating events
|
623
|
+
| type | string | yes | Has the value `SMS`
|
624
|
+
| body | string | yes | TODO
|
625
|
+
| phone_number | string | yes | TODO
|
626
|
+
| recipient_id | string | yes | TODO
|
627
|
+
|
628
|
+
#### Example
|
629
|
+
```js
|
630
|
+
{
|
631
|
+
"id": 1274,
|
632
|
+
"type": "SMS",
|
633
|
+
"body": "There is an update on Zendesk Ticket #5656",
|
634
|
+
"phone_number": "555 123 4567",
|
635
|
+
"recipient_id": 9873938
|
636
|
+
}
|
637
|
+
```
|
638
|
+
|
639
|
+
#### Ticket Sharing Events
|
640
|
+
Ticket sharing events have the following keys:
|
641
|
+
|
642
|
+
| Name | Type | Read-only | Comment
|
643
|
+
| --------------- | ------- | --------- | -------
|
644
|
+
| id | integer | yes | Automatically assigned when creating events
|
645
|
+
| type | string | yes | Has the value `TicketSharingEvent`
|
646
|
+
| agreement_id | integer | yes | TODO
|
647
|
+
| action | string | yes | either `shared` or `unshared` TODO
|
648
|
+
|
649
|
+
#### Example
|
650
|
+
```js
|
651
|
+
{
|
652
|
+
"id": 1274,
|
653
|
+
"type": "TicketSharingEvent",
|
654
|
+
"agreement_id": 3454,
|
655
|
+
"action": "shared"
|
656
|
+
}
|
657
|
+
```
|