user-feedback.json 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166
  1. {
  2. "get": {
  3. "tags": ["Projects"],
  4. "description": "Return a list of user feedback items within this project.",
  5. "operationId": "List a project's user feedback",
  6. "parameters": [
  7. {
  8. "name": "organization_slug",
  9. "in": "path",
  10. "description": "The slug of the organization.",
  11. "required": true,
  12. "schema": {
  13. "type": "string"
  14. }
  15. },
  16. {
  17. "name": "project_slug",
  18. "in": "path",
  19. "description": "The slug of the project.",
  20. "required": true,
  21. "schema": {
  22. "type": "string"
  23. }
  24. }
  25. ],
  26. "responses": {
  27. "200": {
  28. "description": "Success.",
  29. "content": {
  30. "application/json": {
  31. "schema": {
  32. "type": "array",
  33. "items": {
  34. "$ref": "../../components/schemas/user-feedback.json#/UserFeedback"
  35. }
  36. },
  37. "example": [
  38. {
  39. "comments": "It broke!",
  40. "dateCreated": "2018-11-06T21:20:11.468Z",
  41. "email": "jane@example.com",
  42. "event": {
  43. "eventID": "14bad9a2e3774046977a21440ddb39b2",
  44. "id": null
  45. },
  46. "eventID": "14bad9a2e3774046977a21440ddb39b2",
  47. "id": "1",
  48. "issue": null,
  49. "name": "Jane Smith",
  50. "user": null
  51. }
  52. ]
  53. }
  54. }
  55. },
  56. "403": {
  57. "description": "Forbidden"
  58. }
  59. },
  60. "security": [
  61. {
  62. "auth_token": ["project:read"]
  63. }
  64. ]
  65. },
  66. "post": {
  67. "tags": ["Projects"],
  68. "description": "Submit and associate user feedback with an issue.\n\nFeedback must be received by the server no more than 30 minutes after the event was saved.\n\nAdditionally, within 5 minutes of submitting feedback it may also be overwritten. This is useful in situations where you may need to retry sending a request due to network failures.\n\nIf feedback is rejected due to a mutability threshold, a 409 status code will be returned.\n\nNote: Feedback may be submitted with DSN authentication (see auth documentation).",
  69. "operationId": "Submit user feedback",
  70. "parameters": [
  71. {
  72. "name": "organization_slug",
  73. "in": "path",
  74. "description": "The slug of the organization.",
  75. "required": true,
  76. "schema": {
  77. "type": "string"
  78. }
  79. },
  80. {
  81. "name": "project_slug",
  82. "in": "path",
  83. "description": "The slug of the project.",
  84. "required": true,
  85. "schema": {
  86. "type": "string"
  87. }
  88. }
  89. ],
  90. "requestBody": {
  91. "content": {
  92. "application/json": {
  93. "schema": {
  94. "required": ["event_id", "name", "email", "comments"],
  95. "type": "object",
  96. "properties": {
  97. "event_id": {
  98. "type": "string",
  99. "description": "The event ID."
  100. },
  101. "name": {
  102. "type": "string",
  103. "description": "User's name."
  104. },
  105. "email": {
  106. "type": "string",
  107. "description": "User's email address."
  108. },
  109. "comments": {
  110. "type": "string",
  111. "description": "Comments supplied by user."
  112. }
  113. }
  114. },
  115. "example": {
  116. "comments": "It broke!",
  117. "email": "jane@example.com",
  118. "event_id": "14bad9a2e3774046977a21440ddb39b2",
  119. "name": "Jane Smith"
  120. }
  121. }
  122. },
  123. "required": false
  124. },
  125. "responses": {
  126. "201": {
  127. "description": "Success.",
  128. "content": {
  129. "application/json": {
  130. "schema": {
  131. "$ref": "../../components/schemas/user-feedback.json#/UserFeedback"
  132. },
  133. "example": {
  134. "comments": "It broke!",
  135. "dateCreated": "2018-11-06T21:20:11.468Z",
  136. "email": "jane@example.com",
  137. "event": {
  138. "eventID": "14bad9a2e3774046977a21440ddb39b2",
  139. "id": null
  140. },
  141. "eventID": "14bad9a2e3774046977a21440ddb39b2",
  142. "id": "1",
  143. "issue": null,
  144. "name": "Jane Smith",
  145. "user": null
  146. }
  147. }
  148. }
  149. },
  150. "403": {
  151. "description": "Forbidden"
  152. },
  153. "404": {
  154. "description": "The requested resource does not exist"
  155. }
  156. },
  157. "security": [
  158. {
  159. "auth_token": ["project:write"]
  160. },
  161. {
  162. "dsn": []
  163. }
  164. ]
  165. }
  166. }