ticket.rb 4.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. Zammad::Application.routes.draw do
  2. api_path = Rails.configuration.api_path
  3. # tickets
  4. match api_path + '/tickets/search', to: 'tickets#search', via: %i[get post]
  5. match api_path + '/tickets/selector', to: 'tickets#selector', via: :post
  6. match api_path + '/tickets', to: 'tickets#index', via: :get
  7. match api_path + '/tickets/:id', to: 'tickets#show', via: :get
  8. match api_path + '/tickets', to: 'tickets#create', via: :post
  9. match api_path + '/tickets/:id', to: 'tickets#update', via: :put
  10. match api_path + '/tickets/:id', to: 'tickets#destroy', via: :delete
  11. match api_path + '/ticket_create', to: 'tickets#ticket_create', via: :get
  12. match api_path + '/ticket_split', to: 'tickets#ticket_split', via: :get
  13. match api_path + '/ticket_history/:id', to: 'tickets#ticket_history', via: :get
  14. match api_path + '/ticket_customer', to: 'tickets#ticket_customer', via: :get
  15. match api_path + '/ticket_related/:ticket_id', to: 'tickets#ticket_related', via: :get
  16. match api_path + '/ticket_recent', to: 'tickets#ticket_recent', via: :get
  17. match api_path + '/ticket_merge/:slave_ticket_id/:master_ticket_number', to: 'tickets#ticket_merge', via: :get
  18. match api_path + '/ticket_stats', to: 'tickets#stats', via: :get
  19. # ticket overviews
  20. match api_path + '/ticket_overviews', to: 'ticket_overviews#show', via: :get
  21. # ticket priority
  22. match api_path + '/ticket_priorities', to: 'ticket_priorities#index', via: :get
  23. match api_path + '/ticket_priorities/:id', to: 'ticket_priorities#show', via: :get
  24. match api_path + '/ticket_priorities', to: 'ticket_priorities#create', via: :post
  25. match api_path + '/ticket_priorities/:id', to: 'ticket_priorities#update', via: :put
  26. match api_path + '/ticket_priorities/:id', to: 'ticket_priorities#destroy', via: :delete
  27. # ticket state
  28. match api_path + '/ticket_states', to: 'ticket_states#index', via: :get
  29. match api_path + '/ticket_states/:id', to: 'ticket_states#show', via: :get
  30. match api_path + '/ticket_states', to: 'ticket_states#create', via: :post
  31. match api_path + '/ticket_states/:id', to: 'ticket_states#update', via: :put
  32. match api_path + '/ticket_states/:id', to: 'ticket_states#destroy', via: :delete
  33. # ticket articles
  34. match api_path + '/ticket_articles', to: 'ticket_articles#index', via: :get
  35. match api_path + '/ticket_articles/:id', to: 'ticket_articles#show', via: :get
  36. match api_path + '/ticket_articles/by_ticket/:id', to: 'ticket_articles#index_by_ticket', via: :get
  37. match api_path + '/ticket_articles', to: 'ticket_articles#create', via: :post
  38. match api_path + '/ticket_articles/:id', to: 'ticket_articles#update', via: :put
  39. match api_path + '/ticket_articles/:id', to: 'ticket_articles#destroy', via: :delete
  40. match api_path + '/ticket_attachment/:ticket_id/:article_id/:id', to: 'ticket_articles#attachment', via: :get
  41. match api_path + '/ticket_attachment_upload_clone_by_article/:article_id', to: 'ticket_articles#ticket_attachment_upload_clone_by_article', via: :post
  42. match api_path + '/ticket_article_plain/:id', to: 'ticket_articles#article_plain', via: :get
  43. end