Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

/tickets resource #36

Open
solebared opened this issue Jun 9, 2018 · 2 comments
Open

/tickets resource #36

solebared opened this issue Jun 9, 2018 · 2 comments

Comments

@solebared
Copy link
Collaborator

No description provided.

@willmurphyscode
Copy link
Collaborator

Here's our outline from the API:

Tentative API:

GET /ticketing/tickets/

returns a bag of ticket-related information as a giant array

[
  {
    "id": 432,
    "topicOrMessage": "topic"
  }
]

(for additional fields, see the individual routes so that we don't duplicate this all over the place)

GET /ticketing/tickets/:topicOrMessage/:id

returns a bag of ticket-related information derived from ticket tags:

{
  "id": 432,
  "topicOrMessage": "topic",
  "priority": "immediate",
  "status": "waiting",
  "reasons": ["onboarding", "helpdesk"],
  "otherTags": ["location-america", "language-english"],
}

@bhaibel
Copy link
Collaborator

bhaibel commented Jun 9, 2018

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

@h-m-m h-m-m self-assigned this Jun 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants