Commit eaa99478 authored by Riyad Preukschas's avatar Riyad Preukschas

Up API version to v3

parent 8f01190e
:javascript
$(function() {
GitLab.GfmAutoComplete.Members.url = "#{ "/api/v2/projects/#{@project.id}/members" if @project }";
GitLab.GfmAutoComplete.Members.url = "#{ "/api/v3/projects/#{@project.id}/members" if @project }";
GitLab.GfmAutoComplete.Members.params.private_token = "#{current_user.private_token}";
GitLab.GfmAutoComplete.Emoji.data = #{raw emoji_autocomplete_source};
......
......@@ -15,7 +15,7 @@ API requests should be prefixed with `api` and the API version. The API version
Example of a valid API request:
```
GET http://example.com/api/v2/projects?private_token=QVy1PB7sTxfy4pqfZM1U
GET http://example.com/api/v3/projects?private_token=QVy1PB7sTxfy4pqfZM1U
```
The API uses JSON to serialize data. You don't need to specify `.json` at the end of API URL.
......
......@@ -2,7 +2,7 @@ Dir["#{Rails.root}/lib/api/*.rb"].each {|file| require file}
module Gitlab
class API < Grape::API
version 'v2', using: :path
version 'v3', using: :path
rescue_from ActiveRecord::RecordNotFound do
rack_response({'message' => '404 Not found'}.to_json, 404)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment