Open solebared opened 6 years ago
updates to tentative API based on dashboard frontend needs:
GET /ticketing/tickets/
parameters:
order: "priority", "status", "dateCreated", "dateDue"
ascending: boolean
page: integer
query: "status:complete" or the like -- used for filtering, github-style
[
{
....generic-ticket-fields (see GET /ticketing/tickets/:topicOrPost/:id)
}
]
GET /ticketing/tickets/:id
(where :id is any string other than 'topic' or 'post')
da
404
GET /ticketing/tickets/:topicOrPost
404
GET /ticketing/tickets/:topicOrPost/:id
(:topicOrPost is a string that is either 'topic' or 'post')
{
"ticket": {
"id": 3424,
"topicOrPost": 'post',
"priority": 'high',
"status": 'waiting',
"dateCreated": [datestamp],
"dateDue": [datestamp],
"involvedUsers": {
... generic serialized fields stolen from normal discourse serializer
}
"href": 'https://example.com/ticketing/tickets/post/3424'
}
}
PATCH /ticketing/tickets/:topicOrPost/:id
send same JSON blob as for the parallel GET request
Here's our outline from the API: