Skip to content

Commit 1d769f6

Browse files
feat(feedback): blueprint for category generation endpoint (#96560)
1 parent 0d0440b commit 1d769f6

File tree

1 file changed

+54
-0
lines changed
  • src/sentry/feedback/blueprints

1 file changed

+54
-0
lines changed

src/sentry/feedback/blueprints/api.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,3 +321,57 @@ See https://develop.sentry.dev/sdk/event-payloads/types/ for more information
321321
}
322322
}
323323
```
324+
325+
## Feedback Category Generation [/organizations/<organization_id_or_slug>/feedback-categories/]
326+
327+
- Parameters
328+
- project (optional, string)
329+
- statsPeriod (optional, string) - A positive integer suffixed with a unit type. Default: 7d, Members
330+
- s
331+
- m
332+
- h
333+
- d
334+
- w
335+
- start (optional, string) - ISO 8601 format (`YYYY-MM-DDTHH:mm:ss.sssZ`)
336+
- end (optional, string) - ISO 8601 format. Required if `start` is set.
337+
- utc (optional, boolean) - Whether start/end should use the UTC timezone.
338+
339+
### Fetch Categories [GET]
340+
341+
Retrieves a list of categories, which comprise of a primary label, along with their associated labels, which are either directly interchangeable or children of the primary label (based on the feedbacks as context for what "interchangeable" means). Categories are returned in descending order with respect to the feedback count.
342+
343+
**Attributes**
344+
345+
| Column | Type | Description |
346+
| ------------------------------ | --------------- | -------------------------------------------------------------------------------------- |
347+
| categories | optional[array] | Array with each item representing a category |
348+
| categories[i].primaryLabel | str | The primary label of the category |
349+
| categories[i].associatedLabels | list[str] | The list of associated labels for a given primary label |
350+
| categories[i].feedbackCount | int | Number of feedbacks that have either the primary label or any of the associated labels |
351+
| numFeedbacksContext | int | Number of feedbacks given as context to the LLM |
352+
| success | boolean | - |
353+
354+
- Response 200
355+
```json
356+
{
357+
"success": true,
358+
"categories": [
359+
{
360+
"primaryLabel": "User Interface",
361+
"associatedLabels": ["UI", "User Experience", "Look", "Display", "Navigation"],
362+
"feedbackCount": 450
363+
},
364+
{
365+
"primaryLabel": "Integrations",
366+
"associatedLabels": ["Jira", "GitHub", "Workflow", "Webhook", "GitLab"],
367+
"feedbackCount": 300
368+
},
369+
{
370+
"primaryLabel": "Navigation",
371+
"associatedLabels": ["Discoverability", "Sidebar", "Selection"],
372+
"feedbackCount": 150
373+
}
374+
],
375+
"numFeedbacksContext": 400
376+
}
377+
```

0 commit comments

Comments
 (0)