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,212 @@
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
+ ```
@@ -0,0 +1,159 @@
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. 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 your 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 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).
71
+
72
+ 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.
73
+
74
+ 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.
75
+
76
+ ### Collections
77
+
78
+ 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:
79
+
80
+ ```js
81
+ {
82
+ "users": [ ... ],
83
+ "count": 1234,
84
+ "next_page": "https://account.zendesk.com/api/v2/users.json?page=2",
85
+ "prev_page": null
86
+ }
87
+ ```
88
+
89
+ Stop paging when the `next_page` attribute is `null`.
90
+
91
+ 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.
92
+
93
+ ### Side-loading (BETA)
94
+
95
+ Side-loading is an experimental feature that allows you to fetch associated data along with a resource (or resources) in a single request.
96
+
97
+ Normally, a request to `/tickets.json` will return ticket resources with a structure similar to:
98
+
99
+ ```js
100
+ {
101
+ "tickets": [
102
+ {
103
+ "requester_id": 7,
104
+ ...
105
+ },
106
+ ...
107
+ ]
108
+ }
109
+ ```
110
+
111
+ To fetch the requester's data you must then make another request to `/users/7.json`.
112
+ Using side-loading, you can fetch a partial user resource along with the ticket in a single request. To make a side-load request,
113
+ 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`).
114
+
115
+ The response receieved will then include a top-level array of associated data under the appropriate resource key.
116
+
117
+ ```js
118
+ {
119
+ "tickets": [
120
+ {
121
+ "requester_id": 7,
122
+ ...
123
+ },
124
+ ...
125
+ ],
126
+ "users": [
127
+ {
128
+ "id": 7,
129
+ "name": "Bob Bobberson",
130
+ ...
131
+ }
132
+ ]
133
+ }
134
+ ```
135
+
136
+ | Resource | Available associations
137
+ | --------------------------------------------------------- | ---------------------------------------------------------------------------
138
+ | [Tickets](tickets.html) | users, groups, organizations, last_audits, metric_sets, sharing_agreements
139
+ | [Audits](audits.html) | users, organizations, groups, tickets
140
+ | [Users](users.html) | organizations, abilities, roles, identities, groups
141
+ | [Group Memberships](group_memberships.html) | users, groups
142
+ | [Organizations](organizations.html) | abilities
143
+ | [View Execution / Previewing](views.html#executing-views) | The following are automatically side-loaded if applicable: group, organization, users
144
+ | [Topics](topics.html) | users, forums
145
+ | [Topic Comments](topic_comments.html) | users
146
+
147
+ **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.**
148
+
149
+ ### Official Zendesk API Clients and Guides
150
+
151
+ * [Ruby Client](https://github.com/zendesk/zendesk_api_client_rb)
152
+ * [PHP Quick Start Guide](https://support.zendesk.com/entries/21462093-php-and-zendesk-quick-start-guide)
153
+
154
+ ### API Clients from the Zendesk Developer Community
155
+
156
+ * [zendeskR by Basho Technologies (R)](https://github.com/tcash21/zendeskR)
157
+ * [node-zendesk by Farrin Reid (node.js)](https://github.com/blakmatrix/node-zendesk)
158
+
159
+ We welcome all contributions, please contact [support@zendesk.com](mailto:support@zendesk.com) to add your API client to the list.
@@ -0,0 +1,86 @@
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
+ ```