Merge branch 'master' into 3634-tab-state
[arvados.git] / services / api / config / routes.rb
1 Server::Application.routes.draw do
2   themes_for_rails
3
4   # See http://guides.rubyonrails.org/routing.html
5
6   namespace :arvados do
7     namespace :v1 do
8       resources :api_client_authorizations do
9         post 'create_system_auth', on: :collection
10       end
11       resources :api_clients
12       resources :authorized_keys
13       resources :collections do
14         get 'provenance', on: :member
15         get 'used_by', on: :member
16       end
17       resources :groups do
18         get 'contents', on: :collection
19         get 'contents', on: :member
20       end
21       resources :humans
22       resources :job_tasks
23       resources :jobs do
24         get 'queue', on: :collection
25         get 'queue_size', on: :collection
26         post 'cancel', on: :member
27         post 'lock', on: :member
28       end
29       resources :keep_disks do
30         post 'ping', on: :collection
31       end
32       resources :keep_services do
33         get 'accessible', on: :collection
34       end
35       resources :links
36       resources :logs
37       resources :nodes do
38         post 'ping', on: :member
39       end
40       resources :pipeline_instances
41       resources :pipeline_templates
42       resources :repositories do
43         get 'get_all_permissions', on: :collection
44       end
45       resources :specimens
46       resources :traits
47       resources :user_agreements do
48         get 'signatures', on: :collection
49         post 'sign', on: :collection
50       end
51       resources :users do
52         get 'current', on: :collection
53         get 'system', on: :collection
54         post 'activate', on: :member
55         post 'setup', on: :collection
56         post 'unsetup', on: :member
57       end
58       resources :virtual_machines do
59         get 'logins', on: :member
60         get 'get_all_logins', on: :collection
61       end
62       get '/permissions/:uuid', :to => 'links#get_permissions'
63     end
64   end
65
66   # omniauth
67   match '/auth/:provider/callback', :to => 'user_sessions#create'
68   match '/auth/failure', :to => 'user_sessions#failure'
69
70   # Custom logout
71   match '/login', :to => 'user_sessions#login'
72   match '/logout', :to => 'user_sessions#logout'
73
74   match '/discovery/v1/apis/arvados/v1/rest', :to => 'arvados/v1/schema#index'
75
76   match '/static/login_failure', :to => 'static#login_failure', :as => :login_failure
77
78   # Send unroutable requests to an arbitrary controller
79   # (ends up at ApplicationController#render_not_found)
80   match '*a', :to => 'static#render_not_found'
81
82   root :to => 'static#home'
83 end