summaryrefslogtreecommitdiff
path: root/lib/api/deploy_tokens.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-02-20 03:08:57 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-02-20 03:08:57 +0000
commit852f4a85dd199751e4652748461163de85ecda53 (patch)
treeb4160aa19c23582b5ab5ac02f9860b5498007c43 /lib/api/deploy_tokens.rb
parent82cd20acf9f4cceecf222abe718a9e23cef55687 (diff)
downloadgitlab-ce-852f4a85dd199751e4652748461163de85ecda53.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/api/deploy_tokens.rb')
-rw-r--r--lib/api/deploy_tokens.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/api/deploy_tokens.rb b/lib/api/deploy_tokens.rb
new file mode 100644
index 00000000000..bf82c63260d
--- /dev/null
+++ b/lib/api/deploy_tokens.rb
@@ -0,0 +1,20 @@
+# frozen_string_literal: true
+
+module API
+ class DeployTokens < Grape::API
+ include PaginationParams
+
+ before { authenticated_as_admin! }
+
+ desc 'Return all deploy tokens' do
+ detail 'This feature was introduced in GitLab 12.9.'
+ success Entities::DeployToken
+ end
+ params do
+ use :pagination
+ end
+ get 'deploy_tokens' do
+ present paginate(DeployToken.all), with: Entities::DeployToken
+ end
+ end
+end