version.rb 336 Bytes
Newer Older
1 2
# frozen_string_literal: true

3 4 5 6 7 8 9 10
module API
  class Version < Grape::API
    before { authenticate! }

    desc 'Get the version information of the GitLab instance.' do
      detail 'This feature was introduced in GitLab 8.13.'
    end
    get '/version' do
11
      { version: Gitlab::VERSION, revision: Gitlab.revision }
12 13 14
    end
  end
end