summaryrefslogtreecommitdiff
path: root/lib/api/v3/system_hooks.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/v3/system_hooks.rb')
-rw-r--r--lib/api/v3/system_hooks.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/lib/api/v3/system_hooks.rb b/lib/api/v3/system_hooks.rb
new file mode 100644
index 00000000000..391510b9ee0
--- /dev/null
+++ b/lib/api/v3/system_hooks.rb
@@ -0,0 +1,19 @@
+module API
+ module V3
+ class SystemHooks < Grape::API
+ before do
+ authenticate!
+ authenticated_as_admin!
+ end
+
+ resource :hooks do
+ desc 'Get the list of system hooks' do
+ success ::API::Entities::Hook
+ end
+ get do
+ present SystemHook.all, with: ::API::Entities::Hook
+ end
+ end
+ end
+ end
+end