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.
Files changed (153) hide show
  1. data/.gitignore +3 -0
  2. data/.travis.yml +1 -3
  3. data/Gemfile +24 -0
  4. data/Gemfile.lock +75 -10
  5. data/Procfile +1 -0
  6. data/Rakefile +10 -3
  7. data/Readme.md +65 -0
  8. data/bin/zendesk +26 -0
  9. data/config.ru +6 -0
  10. data/config/mongoid.yml +81 -0
  11. data/lib/zendesk_api/actions.rb +2 -2
  12. data/lib/zendesk_api/collection.rb +15 -4
  13. data/lib/zendesk_api/console/base.rb +12 -0
  14. data/lib/zendesk_api/console/console.rb +144 -0
  15. data/lib/zendesk_api/console/extensions.rb +183 -0
  16. data/lib/zendesk_api/console/options.rb +41 -0
  17. data/lib/zendesk_api/resource.rb +12 -1
  18. data/lib/zendesk_api/resources.rb +28 -8
  19. data/lib/zendesk_api/server/base.rb +119 -0
  20. data/lib/zendesk_api/server/docs/account_settings.md +145 -0
  21. data/lib/zendesk_api/server/docs/activity_stream.md +121 -0
  22. data/lib/zendesk_api/server/docs/attachments.md +73 -0
  23. data/lib/zendesk_api/server/docs/autocomplete.md +29 -0
  24. data/lib/zendesk_api/server/docs/categories.md +193 -0
  25. data/lib/zendesk_api/server/docs/custom_roles.md +88 -0
  26. data/lib/zendesk_api/server/docs/forum_subscriptions.md +139 -0
  27. data/lib/zendesk_api/server/docs/forums.md +229 -0
  28. data/lib/zendesk_api/server/docs/group_memberships.md +229 -0
  29. data/lib/zendesk_api/server/docs/groups.md +212 -0
  30. data/lib/zendesk_api/server/docs/introduction.md +159 -0
  31. data/lib/zendesk_api/server/docs/job_statuses.md +86 -0
  32. data/lib/zendesk_api/server/docs/locales.md +124 -0
  33. data/lib/zendesk_api/server/docs/macros.md +287 -0
  34. data/lib/zendesk_api/server/docs/organizations.md +253 -0
  35. data/lib/zendesk_api/server/docs/problems.md +117 -0
  36. data/lib/zendesk_api/server/docs/requests.md +256 -0
  37. data/lib/zendesk_api/server/docs/satisfaction_ratings.md +136 -0
  38. data/lib/zendesk_api/server/docs/search.md +106 -0
  39. data/lib/zendesk_api/server/docs/sharing_agreements.md +57 -0
  40. data/lib/zendesk_api/server/docs/side_loading.md +125 -0
  41. data/lib/zendesk_api/server/docs/suspended_tickets.md +182 -0
  42. data/lib/zendesk_api/server/docs/tags.md +36 -0
  43. data/lib/zendesk_api/server/docs/ticket_audits.md +657 -0
  44. data/lib/zendesk_api/server/docs/ticket_export.md +121 -0
  45. data/lib/zendesk_api/server/docs/ticket_fields.md +277 -0
  46. data/lib/zendesk_api/server/docs/ticket_import.md +65 -0
  47. data/lib/zendesk_api/server/docs/ticket_metrics.md +125 -0
  48. data/lib/zendesk_api/server/docs/tickets.md +622 -0
  49. data/lib/zendesk_api/server/docs/topic_comments.md +221 -0
  50. data/lib/zendesk_api/server/docs/topic_subscriptions.md +140 -0
  51. data/lib/zendesk_api/server/docs/topic_votes.md +154 -0
  52. data/lib/zendesk_api/server/docs/topics.md +335 -0
  53. data/lib/zendesk_api/server/docs/triggers.md +199 -0
  54. data/lib/zendesk_api/server/docs/user_identities.md +279 -0
  55. data/lib/zendesk_api/server/docs/users.md +400 -0
  56. data/lib/zendesk_api/server/docs/views.md +505 -0
  57. data/lib/zendesk_api/server/helper.rb +104 -0
  58. data/lib/zendesk_api/server/html_renderer.rb +98 -0
  59. data/lib/zendesk_api/server/models/user_request.rb +16 -0
  60. data/lib/zendesk_api/server/models/zlib_json.rb +13 -0
  61. data/lib/zendesk_api/server/public/config.rb +26 -0
  62. data/lib/zendesk_api/server/public/favicon.ico +0 -0
  63. data/lib/zendesk_api/server/public/images/glyphicons-halflings-white.png +0 -0
  64. data/lib/zendesk_api/server/public/images/glyphicons-halflings.png +0 -0
  65. data/lib/zendesk_api/server/public/images/spinner.gif +0 -0
  66. data/lib/zendesk_api/server/public/images/zendesk_developers_bg.png +0 -0
  67. data/lib/zendesk_api/server/public/images/zendesk_developers_header.png +0 -0
  68. data/lib/zendesk_api/server/public/javascripts/application.js +186 -0
  69. data/lib/zendesk_api/server/public/javascripts/bootstrap-alert.js +90 -0
  70. data/lib/zendesk_api/server/public/javascripts/bootstrap-button.js +96 -0
  71. data/lib/zendesk_api/server/public/javascripts/bootstrap-carousel.js +169 -0
  72. data/lib/zendesk_api/server/public/javascripts/bootstrap-collapse.js +157 -0
  73. data/lib/zendesk_api/server/public/javascripts/bootstrap-dropdown.js +100 -0
  74. data/lib/zendesk_api/server/public/javascripts/bootstrap-modal.js +218 -0
  75. data/lib/zendesk_api/server/public/javascripts/bootstrap-popover.js +98 -0
  76. data/lib/zendesk_api/server/public/javascripts/bootstrap-scrollspy.js +151 -0
  77. data/lib/zendesk_api/server/public/javascripts/bootstrap-tab.js +135 -0
  78. data/lib/zendesk_api/server/public/javascripts/bootstrap-tooltip.js +275 -0
  79. data/lib/zendesk_api/server/public/javascripts/bootstrap-transition.js +61 -0
  80. data/lib/zendesk_api/server/public/javascripts/bootstrap-typeahead.js +285 -0
  81. data/lib/zendesk_api/server/public/sass/screen.scss +102 -0
  82. data/lib/zendesk_api/server/public/sass/styles.scss +5 -0
  83. data/lib/zendesk_api/server/public/stylesheets/developer.screen.css +836 -0
  84. data/lib/zendesk_api/server/public/stylesheets/screen.css +129 -0
  85. data/lib/zendesk_api/server/public/stylesheets/styles.css +6208 -0
  86. data/lib/zendesk_api/server/templates/footer.haml +13 -0
  87. data/lib/zendesk_api/server/templates/header.haml +20 -0
  88. data/lib/zendesk_api/server/templates/index.haml +68 -0
  89. data/lib/zendesk_api/server/templates/layout.haml +44 -0
  90. data/lib/zendesk_api/server/templates/param.haml +4 -0
  91. data/lib/zendesk_api/server/templates/search.haml +23 -0
  92. data/lib/zendesk_api/server/templates/sidebar.haml +7 -0
  93. data/lib/zendesk_api/version.rb +1 -1
  94. data/spec/{association_spec.rb → core/association_spec.rb} +1 -1
  95. data/spec/{client_spec.rb → core/client_spec.rb} +1 -1
  96. data/spec/{collection_spec.rb → core/collection_spec.rb} +1 -1
  97. data/spec/{configuration_spec.rb → core/configuration_spec.rb} +1 -1
  98. data/spec/{create_resource_spec.rb → core/create_resource_spec.rb} +1 -1
  99. data/spec/{data_resource_spec.rb → core/data_resource_spec.rb} +1 -1
  100. data/spec/{inflection_spec.rb → core/inflection_spec.rb} +1 -1
  101. data/spec/{lru_cache_spec.rb → core/lru_cache_spec.rb} +1 -1
  102. data/spec/{middleware → core/middleware}/request/etag_cache_spec.rb +1 -1
  103. data/spec/{middleware → core/middleware}/request/retry_spec.rb +1 -1
  104. data/spec/{middleware → core/middleware}/request/test.jpg +0 -0
  105. data/spec/{middleware → core/middleware}/request/upload_spec.rb +1 -1
  106. data/spec/{middleware → core/middleware}/response/callback_spec.rb +1 -1
  107. data/spec/{middleware → core/middleware}/response/deflate_spec.rb +1 -1
  108. data/spec/{middleware → core/middleware}/response/gzip_spec.rb +1 -1
  109. data/spec/{middleware → core/middleware}/response/parse_iso_dates_spec.rb +1 -1
  110. data/spec/{read_resource_spec.rb → core/read_resource_spec.rb} +1 -1
  111. data/spec/{rescue_spec.rb → core/rescue_spec.rb} +1 -1
  112. data/spec/{resource_spec.rb → core/resource_spec.rb} +1 -1
  113. data/spec/{search_spec.rb → core/search_spec.rb} +1 -1
  114. data/spec/{spec_helper.rb → core/spec_helper.rb} +5 -5
  115. data/spec/{trackie_spec.rb → core/trackie_spec.rb} +1 -1
  116. data/{live → spec/live}/Readme.md +0 -0
  117. data/{live → spec/live}/activity_spec.rb +1 -1
  118. data/{live → spec/live}/audit_spec.rb +1 -1
  119. data/{live → spec/live}/bookmark_spec.rb +1 -1
  120. data/{live → spec/live}/category_spec.rb +1 -1
  121. data/{live → spec/live}/collection_spec.rb +1 -1
  122. data/{live → spec/live}/crm_spec.rb +1 -1
  123. data/{live → spec/live}/custom_role_spec.rb +1 -1
  124. data/{live → spec/live}/forum_spec.rb +1 -1
  125. data/{live → spec/live}/forum_subscription_spec.rb +1 -1
  126. data/{live → spec/live}/group_membership_spec.rb +1 -1
  127. data/{live → spec/live}/group_spec.rb +1 -1
  128. data/{live → spec/live}/identity_spec.rb +1 -1
  129. data/{live → spec/live}/locale_spec.rb +1 -1
  130. data/{live → spec/live}/macro_spec.rb +1 -1
  131. data/{live → spec/live}/mobile_device_spec.rb +1 -1
  132. data/{live → spec/live}/organization_spec.rb +1 -1
  133. data/{live → spec/live}/request_spec.rb +1 -1
  134. data/{live → spec/live}/satisfaction_rating_spec.rb +1 -1
  135. data/{live → spec/live}/setting_spec.rb +1 -1
  136. data/{live → spec/live}/suspended_ticket_spec.rb +1 -1
  137. data/{live → spec/live}/ticket_field_spec.rb +1 -1
  138. data/{live → spec/live}/ticket_metrics_spec.rb +1 -1
  139. data/{live → spec/live}/ticket_spec.rb +1 -1
  140. data/spec/live/topic_comment_spec.rb +24 -0
  141. data/{live → spec/live}/topic_spec.rb +1 -1
  142. data/{live → spec/live}/topic_subscription_spec.rb +1 -1
  143. data/{live → spec/live}/topic_vote_spec.rb +1 -1
  144. data/{live → spec/live}/upload_spec.rb +1 -1
  145. data/{live → spec/live}/user_spec.rb +1 -1
  146. data/{live → spec/live}/view_spec.rb +1 -1
  147. data/spec/macros/resource_macros.rb +1 -1
  148. data/spec/server/app_spec.rb +140 -0
  149. data/spec/server/helper_spec.rb +97 -0
  150. data/spec/server/html_renderer_spec.rb +130 -0
  151. data/spec/server/spec_helper.rb +43 -0
  152. metadata +198 -77
  153. data/live/topic_comment_spec.rb +0 -13
@@ -0,0 +1,117 @@
1
+ ## Problems
2
+
3
+ ### JSON Format
4
+ Tickets are represented as JSON objects which have the following keys:
5
+
6
+ | Name | Type | Read-only | Mandatory | Comment
7
+ | --------------------- | ---------------------------------------- | --------- | --------- | -------
8
+ | id | integer | yes | no | Automatically assigned when creating tickets
9
+ | url | string | yes | no | The API url of this ticket
10
+ | external_id | string | no | no | A unique external id, you can use this to link Zendesk tickets to local records
11
+ | type | string | no | no | The type of this ticket, i.e. "problem", "incident", "question" or "task"
12
+ | subject | string | no | no | The value of the subject field for this ticket
13
+ | description | string | yes | no | The first comment on the ticket
14
+ | priority | string | no | no | Priority, defines the urgency with which the ticket should be addressed: "urgent", "high", "normal", "low"
15
+ | status | string | no | no | The state of the ticket, "new", "open", "pending", "hold", "solved", "closed"
16
+ | recipient | string | yes | no | The original recipient e-mail address of the ticket
17
+ | requester_id | integer | no | yes | The user who requested this ticket
18
+ | submitter_id | integer | yes | no | The user who submitted the ticket; this is the currently authenticated API user
19
+ | assignee_id | integer | no | no | What agent is currently assigned to the ticket
20
+ | organization_id | integer | yes | no | The organization of the requester
21
+ | group_id | integer | no | no | The group this ticket is assigned to
22
+ | collaborator_ids | array | no | no | Who are currently CC'ed on the ticket
23
+ | forum_topic_id | integer | no | no | The topic this ticket originated from, if any
24
+ | problem_id | integer | no | no | The problem this incident is linked to, if any
25
+ | has_incidents | boolean | yes | no | Is true of this ticket has been marked as a problem, false otherwise
26
+ | 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.
27
+ | tags | array | no | no | The array of tags applied to this ticket
28
+ | via | [Via](ticket_audits.html#the-via-object) | yes | no | This object explains how the ticket was created
29
+ | custom_fields | array | no | no | The custom fields of the ticket
30
+ | satisfaction_rating | object | yes | no | The satisfaction rating of the ticket, if it exists
31
+ | sharing_agreement_ids | array | yes | no | The ids of the sharing agreements used for this ticket
32
+ | created_at | date | yes | no | When this record was created
33
+ | updated_at | date | yes | no | When this record last got updated
34
+
35
+ #### Example
36
+ ```js
37
+ {
38
+ "id": 35436,
39
+ "url": "https://company.zendesk.com/api/v2/tickets/35436.json",
40
+ "external_id": "ahg35h3jh",
41
+ "created_at": "2009-07-20T22:55:29Z",
42
+ "updated_at": "2011-05-05T10:38:52Z",
43
+ "type": "incident",
44
+ "subject": "Help, my printer is on fire!",
45
+ "description": "The fire is very colorful.",
46
+ "priority": "high",
47
+ "status": "open",
48
+ "recipient": "support@company.com",
49
+ "requester_id": 20978392,
50
+ "submitter_id": 76872,
51
+ "assignee_id": 235323,
52
+ "organization_id": 509974,
53
+ "group_id": 98738,
54
+ "collaborator_ids": [35334, 234],
55
+ "forum_topic_id": 72648221,
56
+ "problem_id": 9873764,
57
+ "has_incidents": false,
58
+ "due_at": null,
59
+ "tags": ["enterprise", "other_tag"],
60
+ "via": {
61
+ "channel": "web"
62
+ },
63
+ "custom_fields": [
64
+ {
65
+ "id": 27642,
66
+ "value": "745"
67
+ },
68
+ {
69
+ "id": 27648,
70
+ "value": "yes"
71
+ }
72
+ ],
73
+ "satisfaction_rating": {
74
+ "score": "good",
75
+ "comment": "Great support!"
76
+ },
77
+ "sharing_agreement_ids": [84432]
78
+ }
79
+ ```
80
+
81
+ ### Listing Ticket Problems
82
+ `GET /api/v2/problems.json`
83
+
84
+ #### Allowed For
85
+
86
+ * Agents
87
+
88
+ #### Using curl
89
+
90
+ ```bash
91
+ curl https://{subdomain}.zendesk.com/api/v2/problems.json \
92
+ -v -u {email_address}:{password}
93
+ ```
94
+
95
+ #### Example Response
96
+ ```http
97
+ Status: 200 OK
98
+
99
+ {
100
+ "tickets": [
101
+ {
102
+ "id": 33,
103
+ "subject": "My printer is on fire",
104
+ "description": "The fire is very colorful.",
105
+ "status": "open",
106
+ ...
107
+ },
108
+ {
109
+ "id": 34,
110
+ "subject": "The printer is on fire over here too",
111
+ "description": "The fire is very colorful as well!",
112
+ "status": "pending",
113
+ ...
114
+ },
115
+ ]
116
+ }
117
+ ```
@@ -0,0 +1,256 @@
1
+ ## Requests
2
+
3
+ A request is an end-users perspective on a ticket, this API end point is thus for end-users to view, update and create tickets they have access to. End-users can only see public comments and certain fields of a ticket, and you should use the API token to impersonate an end-user when using this end point.
4
+
5
+ ### JSON Format
6
+ Requests are represented as JSON objects which have the following keys:
7
+
8
+ | Name | Type | Read-only | Mandatory | Comment
9
+ | ---------------- | ---------------------------------------- | --------- | --------- | -------
10
+ | id | integer | yes | no | Automatically assigned when creating requests
11
+ | url | string | yes | no | The API url of this request
12
+ | subject | string | no | no | The value of the subject field for this request
13
+ | description | string | yes | no | The first comment on the request
14
+ | status | string | no | no | The state of the request, "new", "open", "pending", "hold", "solved", "closed"
15
+ | custom_fields | Array | no | no | The fields and entries for this request
16
+ | organization_id | integer | yes | no | The organization of the requester
17
+ | via | [Via](ticket_audits.html#the-via-object) | yes | no | This object explains how the request was created
18
+ | created_at | date | yes | no | When this record was created
19
+ | updated_at | date | yes | no | When this record last got updated
20
+
21
+ #### Example
22
+ ```js
23
+ {
24
+ "id": 35436,
25
+ "url": "https://company.zendesk.com/api/v2/requests/35436.json",
26
+ "created_at": "2009-07-20T22:55:29Z",
27
+ "updated_at": "2011-05-05T10:38:52Z",
28
+ "subject": "Help, my printer is on fire!",
29
+ "description": "The fire is very colorful.",
30
+ "status": "open",
31
+ "organization_id": 509974,
32
+ "via": {
33
+ "channel": "web"
34
+ }
35
+ }
36
+ ```
37
+
38
+ #### Request Comments
39
+ Comments represent the public conversation between Requesters, Collaborators and Agents on a request.
40
+
41
+ Ticket comments have the following keys:
42
+
43
+ | Name | Type | Read-only | Comment
44
+ | --------------- | ------- | --------- | -------
45
+ | id | integer | yes | Automatically assigned when creating events
46
+ | body | string | yes | The actual comment made by the author
47
+ | attachments | array | yes | The attachments on this comment as [Attachment](attachments.md) objects
48
+ | created_at | date | yes | When this comment was created
49
+
50
+ #### Example
51
+ ```js
52
+ {
53
+ "id": 1274,
54
+ "body": "Thanks for your help!",
55
+ "attachments": [
56
+ {
57
+ "id": 498483,
58
+ "name": "crash.log",
59
+ "content_url": "https://company.zendesk.com/attachments/crash.log",
60
+ "content_type": "text/plain",
61
+ "size": 2532,
62
+ "thumbnails": []
63
+ }
64
+ ],
65
+ "created_at": "2009-07-20T22:55:29Z"
66
+ }
67
+ ```
68
+
69
+ ### Listing Requests
70
+ `GET /api/v2/requests.json`
71
+
72
+ `GET /api/v2/requests/open.json`
73
+
74
+ `GET /api/v2/requests/solved.json`
75
+
76
+ `GET /api/v2/requests/ccd.json`
77
+
78
+ `GET /api/v2/users/{id}/requests.json`
79
+
80
+ #### Allowed For
81
+
82
+ * End Users
83
+
84
+ #### Using curl
85
+
86
+ ```bash
87
+ curl https://{subdomain}.zendesk.com/api/v2/requests.json \
88
+ -v -u {email_address}:{password}
89
+ ```
90
+
91
+ #### Example Response
92
+ ```http
93
+ Status: 200 OK
94
+
95
+ {
96
+ "requests": [
97
+ {
98
+ "id": 33,
99
+ "status": "open",
100
+ "description": "My printer is on fire!",
101
+ ...
102
+ }
103
+ {
104
+ "id": 34,
105
+ "status": "closed",
106
+ "description": "I can't find my keys",
107
+ ...
108
+ },
109
+ ]
110
+ }
111
+ ```
112
+
113
+ ### Getting Requests
114
+ `GET /api/v2/requests/{id}.json`
115
+
116
+ #### Allowed For
117
+
118
+ * End Users
119
+
120
+ #### Using curl
121
+
122
+ ```bash
123
+ curl https://{subdomain}.zendesk.com/api/v2/requests/{id}.json \
124
+ -v -u {email_address}:{password}
125
+ ```
126
+
127
+ #### Example Response
128
+ ```http
129
+ Status: 200 OK
130
+
131
+ {
132
+ "request": {
133
+ "id": 33,
134
+ "status": "open",
135
+ "description": "My printer is on fire!",
136
+ ...
137
+ }
138
+ }
139
+ ```
140
+
141
+ ### Creating Requests
142
+ `POST /api/v2/requests.json`
143
+
144
+ #### Allowed For
145
+
146
+ * End Users
147
+
148
+ #### Using curl
149
+
150
+ ```bash
151
+ curl https://{subdomain}.zendesk.com/api/v2/requests.json \
152
+ -d '{"request": {"subject": "Help!", "comment": {"body": "My printer is on fire!", "uploads": [...]}}}' \
153
+ -v -u {email_address}:{password} -X POST -H "Content-Type: application/json"
154
+ ```
155
+
156
+ #### Example Response
157
+
158
+ ```http
159
+ Status: 201 Created
160
+ Location: https://{subdomain}.zendesk.com/api/v2/requests/{id}.json
161
+
162
+ {
163
+ "request": {
164
+ "id": 33,
165
+ "status": "new",
166
+ "description": "My printer is on fire!",
167
+ ...
168
+ }
169
+ }
170
+ ```
171
+
172
+ ### Updating Requests
173
+ `PUT /api/v2/requests/{id}.json`
174
+
175
+ #### Allowed For
176
+
177
+ * End Users
178
+
179
+ #### Using curl
180
+
181
+ ```bash
182
+ curl https://{subdomain}.zendesk.com/api/v2/requests/{id}.json \
183
+ -d '{"request": {"comment": {"body": "Thanks!"}}}' \
184
+ -v -u {email_address}:{password} -X PUT -H "Content-Type: application/json"
185
+ ```
186
+
187
+ #### Example Response
188
+ ```http
189
+ Status: 200 OK
190
+
191
+ {
192
+ "request": {
193
+ "id": 33,
194
+ "status": "new",
195
+ "description": "My printer is on fire!",
196
+ ...
197
+ }
198
+ }
199
+ ```
200
+
201
+ ### Listing Comments
202
+ `GET /api/v2/requests/{id}/comments.json`
203
+
204
+ #### Allowed For
205
+
206
+ * End Users
207
+
208
+ #### Using curl
209
+
210
+ ```bash
211
+ curl https://{subdomain}.zendesk.com/api/v2/requests/{id}/comments.json \
212
+ -v -u {email_address}:{password}
213
+ ```
214
+
215
+ #### Example Response
216
+ ```http
217
+ Status: 200 OK
218
+
219
+ {
220
+ "comments": [
221
+ {
222
+ "id": 43,
223
+ "body": "Thanks for your help!",
224
+ ...
225
+ },
226
+ ...
227
+ ]
228
+ }
229
+ ```
230
+
231
+ ### Getting Comments
232
+ `GET /api/v2/requests/{request_id}/comments/{id}.json`
233
+
234
+ #### Allowed For
235
+
236
+ * End Users
237
+
238
+ #### Using curl
239
+
240
+ ```bash
241
+ curl https://{subdomain}.zendesk.com/api/v2/requests/{request_id}/comments/{id}.json \
242
+ -v -u {email_address}:{password}
243
+ ```
244
+
245
+ #### Example Response
246
+ ```http
247
+ Status: 200 OK
248
+
249
+ {
250
+ "comment": {
251
+ "id": 43,
252
+ "body": "Thanks!",
253
+ ...
254
+ }
255
+ }
256
+ ```
@@ -0,0 +1,136 @@
1
+ ## Satisfaction Ratings
2
+
3
+ If you have enabled satisfaction ratings for your account, this end point allows you to quickly retrieve all ratings.
4
+
5
+ ### JSON Format
6
+
7
+ | Name | Type | Read-only | Mandatory | Comment
8
+ | --------------- | ------- | --------- | --------- | -------
9
+ | id | integer | yes | no | Automatically assigned upon creation
10
+ | url | string | yes | no | The API url of this rating
11
+ | assignee_id | integer | yes | yes | The id of agent assigned to at the time of rating
12
+ | group_id | integer | yes | yes | The id of group assigned to at the time of rating
13
+ | requester_id | integer | yes | yes | The id of ticket requester submitting the rating
14
+ | ticket_id | integer | yes | yes | The id of ticket being rated
15
+ | score | string | yes | yes | The rating: "offered", "unoffered", "good" or "bad"
16
+ | created_at | date | yes | no | The time the satisfaction rating got created
17
+ | updated_at | date | yes | no | The time the satisfaction rating got updated
18
+ | comment | string | yes | no | The comment received with this rating, if available
19
+
20
+ #### Example
21
+ ```js
22
+ {
23
+ "id": 35436,
24
+ "url": "https://company.zendesk.com/api/v2/satisfaction_ratings/62.json",
25
+ "assignee_id": 135,
26
+ "group_id": 44,
27
+ "requester_id": 7881,
28
+ "ticket_id": 208,
29
+ "score": "good",
30
+ "updated_at": "2011-07-20T22:55:29Z",
31
+ "created_at": "2011-07-20T22:55:29Z"
32
+ }
33
+ ```
34
+
35
+ ### List Satisfaction Ratings
36
+ `GET /api/v2/satisfaction_ratings.json`
37
+
38
+ Lists all received satisfaction rating requests ever issued for your account. To only list
39
+ the satisfaction ratings submitted by your customers, use the "received" end point below instead.
40
+
41
+ #### Allowed For:
42
+
43
+ * Admins
44
+
45
+ #### Using curl
46
+
47
+ ```bash
48
+ curl https://{subdomain}.zendesk.com/api/v2/satisfaction_ratings.json \
49
+ -v -u {email_address}:{password}
50
+ ```
51
+
52
+ #### Example Response
53
+
54
+ ```http
55
+ Status: 200 OK
56
+
57
+ {
58
+ "satisfaction_ratings": [
59
+ {
60
+ "id": 35436,
61
+ "url": "https://company.zendesk.com/api/v2/satisfaction_ratings/35436.json",
62
+ "assignee_id": 135,
63
+ "group_id": 44,
64
+ "requester_id": 7881,
65
+ "ticket_id": 208,
66
+ "score": "good",
67
+ "updated_at": "2011-07-20T22:55:29Z",
68
+ "created_at": "2011-07-20T22:55:29Z",
69
+ "comment": "Awesome support!"
70
+ },
71
+ {
72
+ "id": 120447,
73
+ ...
74
+ "created_at": "2012-02-01T04:31:29Z",
75
+ "updated_at": "2012-02-02T10:32:59Z"
76
+ }
77
+ ]
78
+ }
79
+ ```
80
+
81
+
82
+ ### List Received Satisfaction Ratings
83
+ `GET /api/v2/satisfaction_ratings/received.json`
84
+
85
+ Lists ratings provided by customers.
86
+
87
+ #### Allowed For:
88
+
89
+ * Admins
90
+
91
+ #### Using curl
92
+
93
+ ```bash
94
+ curl https://{subdomain}.zendesk.com/api/v2/satisfaction_ratings/received.json \
95
+ -v -u {email_address}:{password}
96
+ ```
97
+
98
+ #### Example Response
99
+
100
+ As above.
101
+
102
+
103
+ ### Show Satisfaction Rating
104
+ `GET /api/v2/satisfaction_ratings/{id}.json`
105
+
106
+ #### Allowed For:
107
+
108
+ * Admins
109
+
110
+ #### Using curl
111
+
112
+ ```bash
113
+ curl https://{subdomain}.zendesk.com/api/v2/satisfaction_ratings/{id}.json \
114
+ -v -u {email_address}:{password}
115
+ ```
116
+
117
+ #### Example Response
118
+
119
+ ```http
120
+ Status: 200 OK
121
+
122
+ {
123
+ "satisfaction_rating": {
124
+ "id": 35436,
125
+ "url": "https://company.zendesk.com/api/v2/satisfaction_ratings/35436.json",
126
+ "assignee_id": 135,
127
+ "group_id": 44,
128
+ "requester_id": 7881,
129
+ "ticket_id": 208,
130
+ "score": "good",
131
+ "updated_at": "2011-07-20T22:55:29Z",
132
+ "created_at": "2011-07-20T22:55:29Z",
133
+ "comment": { ... }
134
+ }
135
+ }
136
+ ```