2776: Added controller and route for keep_services, fixed tests.
[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: :member
19       end
20       resources :humans
21       resources :job_tasks
22       resources :jobs do
23         get 'queue', on: :collection
24         get 'log_tail_follow', on: :member
25         post 'cancel', on: :member
26       end
27       resources :keep_disks do
28         post 'ping', on: :collection
29       end
30       resources :keep_services
31       resources :links
32       resources :logs
33       resources :nodes do
34         post 'ping', on: :member
35       end
36       resources :pipeline_instances
37       resources :pipeline_templates
38       resources :repositories do
39         get 'get_all_permissions', on: :collection
40       end
41       resources :specimens
42       resources :traits
43       resources :user_agreements do
44         get 'signatures', on: :collection
45         post 'sign', on: :collection
46       end
47       resources :users do
48         get 'current', on: :collection
49         get 'system', on: :collection
50         get 'event_stream', on: :member
51         post 'activate', on: :member
52         post 'setup', on: :collection
53         post 'unsetup', on: :member
54       end
55       resources :virtual_machines do
56         get 'logins', on: :member
57         get 'get_all_logins', on: :collection
58       end
59     end
60   end
61
62   # omniauth
63   match '/auth/:provider/callback', :to => 'user_sessions#create'
64   match '/auth/failure', :to => 'user_sessions#failure'
65
66   # Custom logout
67   match '/login', :to => 'user_sessions#login'
68   match '/logout', :to => 'user_sessions#logout'
69
70   match '/discovery/v1/apis/arvados/v1/rest', :to => 'arvados/v1/schema#index'
71
72   match '/static/login_failure', :to => 'static#login_failure', :as => :login_failure
73
74   # Send unroutable requests to an arbitrary controller
75   # (ends up at ApplicationController#render_not_found)
76   match '*a', :to => 'static#render_not_found'
77
78   root :to => 'static#home'
79 end