webhook.rb 957 B

123456789101112131415161718
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. Zammad::Application.routes.draw do
  3. api_path = Rails.configuration.api_path
  4. # webhooks (custom) payload replacements
  5. match api_path + '/webhooks/payload/replacements', to: 'webhooks#replacements', via: :get
  6. # webhooks
  7. match api_path + '/webhooks/preview', to: 'webhooks#preview', via: :get
  8. match api_path + '/webhooks/pre_defined', to: 'webhooks#pre_defined_webhooks', via: :get
  9. match api_path + '/webhooks', to: 'webhooks#index', via: :get
  10. match api_path + '/webhooks/search', to: 'webhooks#search', via: %i[get post]
  11. match api_path + '/webhooks/:id', to: 'webhooks#show', via: :get
  12. match api_path + '/webhooks', to: 'webhooks#create', via: :post
  13. match api_path + '/webhooks/:id', to: 'webhooks#update', via: :put
  14. match api_path + '/webhooks/:id', to: 'webhooks#destroy', via: :delete
  15. end