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,212 +0,0 @@
1
- ## Groups
2
-
3
- When support requests arrive in Zendesk, they can be assigned to a Group. Groups serve as the core element of ticket workflow; support agents are organized into Groups and tickets can be assigned to a Group only, or to an assigned agent within a Group. A ticket can never be assigned to an agent without also being assigned to a Group.
4
-
5
- ### JSON Format
6
- Groups are represented as simple flat 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 groups
11
- | url | string | yes | no | The API url of this group
12
- | name | string | no | yes | The name of the group
13
- | deleted | boolean | yes | no | Deleted groups get marked as such
14
- | created_at | date | yes | no | The time the group was created
15
- | updated_at | date | yes | no | The time of the last update of the group
16
-
17
- #### Example
18
- ```js
19
- {
20
- "id": 3432,
21
- "url": "https://company.zendesk.com/api/v2/groups/3432.json",
22
- "deleted", false,
23
- "name": "First Level Support",
24
- "created_at": "2009-07-20T22:55:29Z",
25
- "updated_at": "2011-05-05T10:38:52Z"
26
- }
27
- ```
28
-
29
- ### List Groups
30
- `GET /api/v2/groups.json`
31
-
32
- #### Allowed For:
33
-
34
- * Admins
35
-
36
- #### Using curl
37
-
38
- ```bash
39
- curl https://{subdomain}.zendesk.com/api/v2/groups.json \
40
- -v -u {email_address}:{password}
41
- ```
42
-
43
- #### Example Response
44
-
45
- ```http
46
- Status: 200 OK
47
-
48
- {
49
- "groups": [
50
- {
51
- "name": "DJs",
52
- "created_at": "2009-05-13T00:07:08Z",
53
- "updated_at": "2011-07-22T00:11:12Z",
54
- "id": 211
55
- },
56
- {
57
- "name": "MCs",
58
- "created_at": "2009-08-26T00:07:08Z",
59
- "updated_at": "2010-05-13T00:07:08Z",
60
- "id": 122
61
- }
62
- ]
63
- }
64
- ```
65
-
66
- ### Show assignable groups
67
- `GET /api/v2/groups/assignable.json`
68
-
69
- #### Allowed For
70
-
71
- * Agents
72
-
73
- #### Using curl
74
-
75
- ```bash
76
- curl https://{subdomain}.zendesk.com/api/v2/groups/assignable.json \
77
- -v -u {email_address}:{password}
78
- ```
79
-
80
- #### Example Response
81
-
82
- ```http
83
- Status: 200 OK
84
-
85
- {
86
- "groups": [
87
- {
88
- "name": "DJs",
89
- "created_at": "2009-05-13T00:07:08Z",
90
- "updated_at": "2011-07-22T00:11:12Z",
91
- "id": 211
92
- },
93
- {
94
- "name": "MCs",
95
- "created_at": "2009-08-26T00:07:08Z",
96
- "updated_at": "2010-05-13T00:07:08Z",
97
- "id": 122
98
- }
99
- ]
100
- }
101
- ```
102
-
103
- ### Show Group
104
- `GET /api/v2/groups/{id}.json`
105
-
106
- #### Allowed For
107
-
108
- * Admins
109
- * Agents
110
-
111
- #### Using curl
112
-
113
- ```bash
114
- curl https://{subdomain}.zendesk.com/api/v2/groups/{id}.json \
115
- -v -u {email_address}:{password}
116
- ```
117
-
118
- #### Example Response
119
-
120
- ```http
121
- Status: 200 OK
122
-
123
- {
124
- "group": {
125
- "name": "MCs",
126
- "created_at": "2009-08-26T00:07:08Z",
127
- "updated_at": "2010-05-13T00:07:08Z",
128
- "id": 122
129
- }
130
- }
131
- ```
132
-
133
- ### Create Groups
134
- `POST /api/v2/groups.json`
135
-
136
- #### Allowed For
137
-
138
- * Admins
139
-
140
- #### Using curl
141
-
142
- ```bash
143
- curl https://{subdomain}.zendesk.com/api/v2/groups.json \
144
- -H "Content-Type: application/json" -d '{"group": {"name": "My Group"}}'
145
- -v -u {email_address}:{password} -X POST
146
- ```
147
-
148
- #### Example Response
149
-
150
- ```http
151
- Status: 201 Created
152
- Location: https://{subdomain}.zendesk.com/api/v2/groups/{id}.json
153
-
154
- {
155
- "group": {
156
- "name": "MCs",
157
- "created_at": "2009-08-26T00:07:08Z",
158
- "updated_at": "2010-05-13T00:07:08Z",
159
- "id": 122
160
- }
161
- }
162
- ```
163
-
164
- ### Update Groups
165
- `PUT /api/v2/groups/{id}.json`
166
-
167
- #### Allowed For
168
-
169
- * Admins
170
-
171
- #### Using curl
172
-
173
- ```bash
174
- curl https://{subdomain}.zendesk.com/api/v2/groups/{id}.json \
175
- -H "Content-Type: application/json" -d '{"group": {"name": "Interesting Group"}}' \
176
- -v -u {email_address}:{password} -X PUT
177
- ```
178
-
179
- #### Example Response
180
-
181
- ```http
182
- Status: 200 OK
183
-
184
- {
185
- "group": {
186
- "name": "Interesting Group",
187
- "created_at": "2011-04-20T17:49:00Z",
188
- "updated_at": "2011-07-20T17:49:00Z",
189
- "id": 123
190
- }
191
- }
192
- ```
193
-
194
- ### Delete Group
195
- `DELETE /api/v2/groups/{id}.json`
196
-
197
- #### Allowed For
198
-
199
- * Admins
200
-
201
- #### Using curl
202
-
203
- ```bash
204
- curl https://{subdomain}.zendesk.com/api/v2/groups/{id}.json \
205
- -v -u {email_address}:{password}
206
- ```
207
-
208
- #### Example Response
209
-
210
- ```http
211
- Status: 200 OK
212
- ```
@@ -1,165 +0,0 @@
1
- ## Introduction
2
-
3
- Zendesk is a customer support platform that supports more than 20,000 businesses and 60 million customers in 140 countries around the globe. Many of these businesses use the Zendesk API to automate and enhance their customer support with Zendesk.
4
-
5
- ### The API
6
- This is the documentation for the Zendesk v2 API. Read the introduction contents to understand how to be a good API citizen and to understand general restrictions and concerns.
7
-
8
- When documenting a resource, we use curly braces for identifiers, like `{subdomain}` when talking about the URL for your Zendesk account, i.e. `https://{subdomain}.zendesk.com/api/v2/users/me.json`
9
-
10
- ### Change Policy
11
-
12
- We reserves the right to add new attributes and resources to the API without advance notice. Breaking changes such as removing or renaming an attribute, may happen on an existing version of the API with two weeks notice and deprecation of attributes are tracked in our [Changes Roadmap](changes_roadmap.html). Major structural changes will only happen within the context of a version update.
13
-
14
- ### Security and Authentication
15
-
16
- This API is an SSL-only API, regardless of how you may have your account configured. You can authorize against the API using either basic authentication with your username and password credentials, or with a username and API token. This token is configurable in your Zendesk account under **Settings** > **Channels** > **API**.
17
-
18
- ### Rate Limiting
19
-
20
- This API is rate limited; we only allow a certain number of requests per minute. We reserve the right to adjust the rate limit for given endpoints in order to provide a high quality of service for all clients. As an API consumer, you should expect to be able to make at least 200 requests per minute.
21
-
22
- If the rate limit is exceeded, Zendesk will respond with a HTTP [429 Too Many Requests](http://tools.ietf.org/html/draft-nottingham-http-new-status-02#section-4) response code and a body that details the reason for the rate limiter kicking in. Further, the response will have a `Retry-After` header that tells you for how many seconds to sleep before retrying. You should anticipate this in your API client for the smoothest possible ride.
23
-
24
- ### Headers
25
-
26
- This is a JSON-only API. You *must* supply a `Content-Type: application/json` header on `PUT` and `POST` operations. You *must* set a `Accept: application/json` header on all requests. You *may* get a `text/plain` response in case of error, e.g. in case of a bad request, you *should* treat this as an error you need to take action on.
27
-
28
- ### Common Response Structures
29
-
30
- We respond to successful requests with HTTP status codes in the 200 or 300 range. When you create or update a resource, we will render the resulting JSON representation in the response body and set a `Location` header pointing to the resource, e.g:
31
-
32
- ```http
33
- Status: 201 Created
34
- Location: https://{subdomain}.zendesk.com/api/v2/items/123.json
35
-
36
- {
37
- "item": {
38
- "id": 123,
39
- "url": "https://{subdomain}.zendesk.com/api/v2/items/123.json"
40
- "name": "Wibble",
41
- ...
42
- "created_at": "2012-04-04T09:14:57Z"
43
- }
44
- }
45
- ```
46
-
47
- Our time stamp format follows [ISO8601](http://en.wikipedia.org/wiki/ISO_8601) and we will always be serving UTC.
48
-
49
- We respond to unsuccessful requests with HTTP status codes in the 400 range. The response *may* be content type `text/plain` for API level error messages (e.g. when trying to call the API without SSL). The response will be content type `application/json` for business level error messages. The latter contains a JSON hash with elaborate error messages to supplement the HTTP status code:
50
-
51
- ```js
52
- {
53
- "details": {
54
- "value": [
55
- {
56
- "type": "blank",
57
- "description": "can't be blank"
58
- },
59
- {
60
- "type": "invalid",
61
- "description": " is not properly formatted"
62
- }
63
- ]
64
- },
65
- "description": "RecordValidation errors",
66
- "error": "RecordInvalid"
67
- }
68
- ```
69
-
70
- If you see a response from a known endpoint that looks like plain text, you've probably made a syntax error in your REST call. This is a common response if you try to make a request to a nonexistent Zendesk instance.
71
-
72
- If you ever experience responses with status codes in the 500 range, Zendesk may be experiencing internal issues or having a scheduled maintenance (during which we send a `503 Service Unavailable` status code).
73
-
74
- Please check [@zendeskops](https://twitter.com/zendeskops) and our [status page](http://www.zendesk.com/support/system-status) in such cases for any known issues.
75
-
76
- When building an API client, we advice treating any `500` status codes as a warning/temporary state, if however, the status persists and we do not have an publicly announced maintenance or service disruption, then you should contact us at <a href="mailto:support@zendesk.com">support@zendesk.com</a> to initiate an investigation.
77
-
78
- ### Collections
79
-
80
- Collections return a maximum of 100 records per page, and by default return 100 records per page. You can set this on a per request basis by passing e.g. `per_page=50` in the request parameters. You iterate the collection by incrementing the `page` attribute, e.g. `page=3`. Collections also include links in the response body for easier navigation, generally they are on this structure:
81
-
82
- ```js
83
- {
84
- "users": [ ... ],
85
- "count": 1234,
86
- "next_page": "https://account.zendesk.com/api/v2/users.json?page=2",
87
- "previous_page": null
88
- }
89
- ```
90
-
91
- Stop paging when the `next_page` attribute is `null`.
92
-
93
- Some collections can be ordered by transmitting a `sort_order=desc` or `sort_order=asc` parameter to the end point. Whether a specific collection can be ordered, is specified in the documentation for that specific resource.
94
-
95
- ### Side-loading (BETA)
96
-
97
- Side-loading is an experimental feature that allows you to fetch associated data along with a resource (or resources) in a single request.
98
-
99
- Normally, a request to `/tickets.json` will return ticket resources with a structure similar to:
100
-
101
- ```js
102
- {
103
- "tickets": [
104
- {
105
- "requester_id": 7,
106
- ...
107
- },
108
- ...
109
- ]
110
- }
111
- ```
112
-
113
- To fetch the requester's data you must then make another request to `/users/7.json`.
114
- Using side-loading, you can fetch a partial user resource along with the ticket in a single request. To make a side-load request,
115
- add a comma-separated list of resources to load into the `include` parameter (e.g. `/tickets.json?include=users,groups` or `/tickets/1.json?include=users,groups`).
116
-
117
- The response receieved will then include a top-level array of associated data under the appropriate resource key.
118
-
119
- ```js
120
- {
121
- "tickets": [
122
- {
123
- "requester_id": 7,
124
- ...
125
- },
126
- ...
127
- ],
128
- "users": [
129
- {
130
- "id": 7,
131
- "name": "Bob Bobberson",
132
- ...
133
- }
134
- ]
135
- }
136
- ```
137
-
138
- | Resource | Available associations
139
- | --------------------------------------------------------- | ---------------------------------------------------------------------------
140
- | [Tickets](tickets.html) | users, groups, organizations, last_audits, metric_sets, sharing_agreements
141
- | [Audits](audits.html) | users, organizations, groups, tickets
142
- | [Users](users.html) | organizations, abilities, roles, identities, groups
143
- | [Groups](groups.html) | users
144
- | [Group Memberships](group_memberships.html) | users, groups
145
- | [Organizations](organizations.html) | abilities
146
- | [View Execution / Previewing](views.html#executing-views) | The following are automatically side-loaded if applicable: group, organization, users
147
- | [Topics](topics.html) | users, forums
148
- | [Topic Comments](topic_comments.html) | users
149
- | [Requests](requests.html) | The following are automatically side-loaded: users, organizations
150
-
151
- **Warning: this is still experimental. If you encounter any issues, please contact <a href="mailto:support@zendesk.com">support@zendesk.com</a>. Please do not abuse this feature.**
152
-
153
- ### Official Zendesk API Clients and Guides
154
-
155
- * [Ruby Client](https://github.com/zendesk/zendesk_api_client_rb)
156
- * [PHP Quick Start Guide](https://support.zendesk.com/entries/21462093-php-and-zendesk-quick-start-guide)
157
-
158
- ### API Clients from the Zendesk Developer Community
159
-
160
- * [Python Client Library by Eventbrite](https://github.com/eventbrite/zendesk)
161
- * [.NET Client Library by Eric Neifert](https://github.com/eneifert/ZendeskApi_v2)
162
- * [zendeskR by Basho Technologies (R)](https://github.com/tcash21/zendeskR)
163
- * [node-zendesk by Farrin Reid (node.js)](https://github.com/blakmatrix/node-zendesk)
164
-
165
- We welcome all contributions, please contact [support@zendesk.com](mailto:support@zendesk.com) to add your API client to the list.
@@ -1,86 +0,0 @@
1
- ## Job Statuses
2
-
3
- ### JSON Format
4
- Job statuses have the below attributes
5
-
6
- | Name | Type | Read-only | Mandatory | Comment
7
- | --------------- | ---------------------------------| --------- | --------- | -------
8
- | id | string | yes | no | Automatically assigned as job gets enqueued
9
- | url | string | yes | no | The URL to poll for status updates
10
- | total | integer | yes | no | The total number of tasks this job is batching through
11
- | progress | integer | yes | no | Number of tasks that have already been completed
12
- | status | string | yes | no | The current status, "working", "failed", "completed", "killed"
13
- | message | string | yes | no | Message from the job worker, if any
14
- | results | array | yes | no | Result data from processed tasks
15
-
16
- #### Example
17
- ```js
18
- {
19
- "id": "8b726e606741012ffc2d782bcb7848fe",
20
- "url": "https://company.zendesk.com/api/v2/job_statuses/8b726e606741012ffc2d782bcb7848fe.json",
21
- "total": 2,
22
- "progress": 2,
23
- "status": "completed",
24
- "message": "Completed at Fri Apr 13 02:51:53 +0000 2012",
25
- "results": [
26
- {
27
- "title": "I accidentally the whole bottle",
28
- "action": "update",
29
- "errors": "",
30
- "id": 380,
31
- "success": true,
32
- "status": "Updated"
33
- },
34
- {
35
- "title": "Printer on fire",
36
- "action": "update",
37
- "errors": "",
38
- "id": 90,
39
- "success": true,
40
- "status": "Updated"
41
- }
42
- ]
43
- }
44
- ```
45
-
46
- ### Show Job Status
47
- `GET /api/v2/job_statuses/{id}.json`
48
-
49
- This shows the status of a background job.
50
-
51
- #### Allowed For:
52
-
53
- * Anyone
54
-
55
- #### Using curl
56
-
57
- ```bash
58
- curl https://{subdomain}.zendesk.com/api/v2/job_statuses/{id}.json \
59
- -v -u {email_address}:{password}
60
- ```
61
-
62
- #### Example Response
63
-
64
- ```http
65
- Status: 200 OK
66
-
67
- {
68
- "id": "8b726e606741012ffc2d782bcb7848fe",
69
- "url": "https://company.zendesk.com/api/v2/job_statuses/8b726e606741012ffc2d782bcb7848fe.json",
70
- "total": 2,
71
- "progress": 2,
72
- "status": "completed",
73
- "message": "Completed at Fri Apr 13 02:51:53 +0000 2012",
74
- "results": [
75
- {
76
- "title": "I accidentally the whole bottle",
77
- "action": "update",
78
- "errors": "",
79
- "id": 380,
80
- "success": true,
81
- "status": "Updated"
82
- },
83
- ...
84
- ]
85
- }
86
- ```