webhook.rb 871 B

1234567891011121314151617
  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/:id', to: 'webhooks#show', via: :get
  11. match api_path + '/webhooks', to: 'webhooks#create', via: :post
  12. match api_path + '/webhooks/:id', to: 'webhooks#update', via: :put
  13. match api_path + '/webhooks/:id', to: 'webhooks#destroy', via: :delete
  14. end