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,117 +0,0 @@
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
- ```
@@ -1,274 +0,0 @@
1
- ## Requests
2
-
3
- A _request_ is an end-user's perspective on a ticket. End-users can only see public comments and certain fields of a ticket. Use this API to let end-users view, update, and create tickets they have access to.
4
-
5
- ####Authentication
6
-
7
- You must use the following authentication credentials with this API:
8
- * Use the end-user's email address, _not_ an agent's email address as is the case with all other API end-points.
9
- * Use your API token as the password, and append `/token` to the email address.
10
-
11
- To get your API token, go to Manage > Channels in Zendesk, and then click the Edit link in the API channel.
12
-
13
- __Example__
14
-
15
- ```js
16
- -u joe_enduser@zendesk.com/token:{YOUR_API_TOKEN}
17
- ```
18
-
19
- ### JSON Format
20
- Requests are represented as JSON objects which have the following keys:
21
-
22
- | Name | Type | Read-only | Mandatory | Comment
23
- | ---------------- | ---------------------------------------- | --------- | --------- | -------
24
- | id | integer | yes | no | Automatically assigned when creating requests
25
- | url | string | yes | no | The API url of this request
26
- | subject | string | no | yes | The value of the subject field for this request
27
- | description | string | yes | yes | The first comment on the request
28
- | status | string | no | no | The state of the request, "new", "open", "pending", "hold", "solved", "closed"
29
- | custom_fields | Array | no | no | The fields and entries for this request
30
- | organization_id | integer | yes | no | The organization of the requester
31
- | requester_id | integer | yes | no | The id of the requester
32
- | via | [Via](ticket_audits.html#the-via-object) | yes | no | This object explains how the request was created
33
- | created_at | date | yes | no | When this record was created
34
- | updated_at | date | yes | no | When this record last got updated
35
-
36
- #### Example
37
- ```js
38
- {
39
- "id": 35436,
40
- "url": "https://company.zendesk.com/api/v2/requests/35436.json",
41
- "created_at": "2009-07-20T22:55:29Z",
42
- "updated_at": "2011-05-05T10:38:52Z",
43
- "subject": "Help, my printer is on fire!",
44
- "description": "The fire is very colorful.",
45
- "status": "open",
46
- "organization_id": 509974,
47
- "requester_id": 1462,
48
- "via": {
49
- "channel": "web"
50
- }
51
- }
52
- ```
53
-
54
- #### Request Comments
55
- Comments represent the public conversation between Requesters, Collaborators and Agents on a request.
56
-
57
- Ticket comments have the following keys:
58
-
59
- | Name | Type | Read-only | Comment
60
- | --------------- | ------- | --------- | -------
61
- | id | integer | yes | Automatically assigned when creating events
62
- | body | string | yes | The actual comment made by the author
63
- | author_id | integer | yes | The id of the author
64
- | attachments | array | yes | The attachments on this comment as [Attachment](attachments.md) objects
65
- | created_at | date | yes | When this comment was created
66
-
67
- #### Example
68
- ```js
69
- {
70
- "id": 1274,
71
- "body": "Thanks for your help!",
72
- "author_id": 1,
73
- "attachments": [
74
- {
75
- "id": 498483,
76
- "name": "crash.log",
77
- "content_url": "https://company.zendesk.com/attachments/crash.log",
78
- "content_type": "text/plain",
79
- "size": 2532,
80
- "thumbnails": []
81
- }
82
- ],
83
- "created_at": "2009-07-20T22:55:29Z"
84
- }
85
- ```
86
-
87
- ### Listing Requests
88
- `GET /api/v2/requests.json`
89
-
90
- `GET /api/v2/requests/open.json`
91
-
92
- `GET /api/v2/requests/solved.json`
93
-
94
- `GET /api/v2/requests/ccd.json`
95
-
96
- `GET /api/v2/users/{id}/requests.json`
97
-
98
- #### Allowed For
99
-
100
- * End Users
101
-
102
- #### Using curl
103
-
104
- ```bash
105
- curl https://{subdomain}.zendesk.com/api/v2/requests.json \
106
- -v -u {email_address}/token:{api_token}
107
- ```
108
-
109
- #### Example Response
110
- ```http
111
- Status: 200 OK
112
-
113
- {
114
- "requests": [
115
- {
116
- "id": 33,
117
- "status": "open",
118
- "description": "My printer is on fire!",
119
- ...
120
- }
121
- {
122
- "id": 34,
123
- "status": "closed",
124
- "description": "I can't find my keys",
125
- ...
126
- },
127
- ]
128
- }
129
- ```
130
-
131
- ### Getting Requests
132
- `GET /api/v2/requests/{id}.json`
133
-
134
- #### Allowed For
135
-
136
- * End Users
137
-
138
- #### Using curl
139
-
140
- ```bash
141
- curl https://{subdomain}.zendesk.com/api/v2/requests/{id}.json \
142
- -v -u {email_address}/token:{api_token}
143
- ```
144
-
145
- #### Example Response
146
- ```http
147
- Status: 200 OK
148
-
149
- {
150
- "request": {
151
- "id": 33,
152
- "status": "open",
153
- "description": "My printer is on fire!",
154
- ...
155
- }
156
- }
157
- ```
158
-
159
- ### Creating Requests
160
- `POST /api/v2/requests.json`
161
-
162
- #### Allowed For
163
-
164
- * End Users
165
-
166
- #### Using curl
167
-
168
- ```bash
169
- curl https://{subdomain}.zendesk.com/api/v2/requests.json \
170
- -d '{"request": {"subject": "Help!", "comment": {"body": "My printer is on fire!", "uploads": [...]}}}' \
171
- -v -u {email_address}/token:{api_token} -X POST -H "Content-Type: application/json"
172
- ```
173
-
174
- #### Example Response
175
-
176
- ```http
177
- Status: 201 Created
178
- Location: https://{subdomain}.zendesk.com/api/v2/requests/{id}.json
179
-
180
- {
181
- "request": {
182
- "id": 33,
183
- "status": "new",
184
- "description": "My printer is on fire!",
185
- ...
186
- }
187
- }
188
- ```
189
-
190
- ### Updating Requests
191
- `PUT /api/v2/requests/{id}.json`
192
-
193
- #### Allowed For
194
-
195
- * End Users
196
-
197
- #### Using curl
198
-
199
- ```bash
200
- curl https://{subdomain}.zendesk.com/api/v2/requests/{id}.json \
201
- -d '{"request": {"comment": {"body": "Thanks!"}}}' \
202
- -v -u {email_address}/token:{api_token} -X PUT -H "Content-Type: application/json"
203
- ```
204
-
205
- #### Example Response
206
- ```http
207
- Status: 200 OK
208
-
209
- {
210
- "request": {
211
- "id": 33,
212
- "status": "new",
213
- "description": "My printer is on fire!",
214
- ...
215
- }
216
- }
217
- ```
218
-
219
- ### Listing Comments
220
- `GET /api/v2/requests/{id}/comments.json`
221
-
222
- #### Allowed For
223
-
224
- * End Users
225
-
226
- #### Using curl
227
-
228
- ```bash
229
- curl https://{subdomain}.zendesk.com/api/v2/requests/{id}/comments.json \
230
- -v -u {email_address}/token:{api_token}
231
- ```
232
-
233
- #### Example Response
234
- ```http
235
- Status: 200 OK
236
-
237
- {
238
- "comments": [
239
- {
240
- "id": 43,
241
- "body": "Thanks for your help!",
242
- ...
243
- },
244
- ...
245
- ]
246
- }
247
- ```
248
-
249
- ### Getting Comments
250
- `GET /api/v2/requests/{request_id}/comments/{id}.json`
251
-
252
- #### Allowed For
253
-
254
- * End Users
255
-
256
- #### Using curl
257
-
258
- ```bash
259
- curl https://{subdomain}.zendesk.com/api/v2/requests/{request_id}/comments/{id}.json \
260
- -v -u {email_address}/token:{api_token}
261
- ```
262
-
263
- #### Example Response
264
- ```http
265
- Status: 200 OK
266
-
267
- {
268
- "comment": {
269
- "id": 43,
270
- "body": "Thanks!",
271
- ...
272
- }
273
- }
274
- ```
@@ -1,172 +0,0 @@
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
- ```
137
-
138
- ### Create a Satisfaction Rating
139
- `POST /api/v2/tickets/{ticket_id}/satisfaction_rating.json`
140
-
141
- #### Allowed For:
142
-
143
- * Requester of the ticket
144
-
145
- #### Using curl
146
-
147
- ```bash
148
- curl https://{subdomain}.zendesk.com/api/v2/tickets/{ticket_id}/satisfaction_rating.json \
149
- -X POST -d '{"satisfaction_rating": {"score": "good", "comment": "Awesome support."}}' \
150
- -v -u {email_address}:{password} -H "Content-Type: application/json"
151
- ```
152
-
153
- #### Example Response
154
-
155
- ```http
156
- Status: 200 OK
157
-
158
- {
159
- "satisfaction_rating": {
160
- "id": 35436,
161
- "url": "https://company.zendesk.com/api/v2/satisfaction_ratings/35436.json",
162
- "assignee_id": 135,
163
- "group_id": 44,
164
- "requester_id": 7881,
165
- "ticket_id": 208,
166
- "score": "good",
167
- "updated_at": "2011-07-20T22:55:29Z",
168
- "created_at": "2011-07-20T22:55:29Z",
169
- "comment": { ... }
170
- }
171
- }
172
- ```