Merge branch '1692-redesign-dashboard'
[arvados.git] / services / api / config / routes.rb
1 Server::Application.routes.draw do
2   resources :humans
3   resources :traits
4   resources :repositories
5   resources :virtual_machines
6   resources :authorized_keys
7   resources :keep_disks
8   resources :commit_ancestors
9   resources :commits
10   resources :job_tasks
11   resources :jobs
12   resources :api_client_authorizations
13   resources :api_clients
14   resources :logs
15   resources :groups
16   resources :specimens
17   resources :collections
18   resources :links
19   resources :nodes
20   resources :pipeline_templates
21   resources :pipeline_instances
22
23   # The priority is based upon order of creation:
24   # first created -> highest priority.
25
26   # Sample of regular route:
27   #   match 'products/:id' => 'catalog#view'
28   # Keep in mind you can assign values other than :controller and :action
29
30   # Sample of named route:
31   #   match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
32   # This route can be invoked with purchase_url(:id => product.id)
33
34   # Sample resource route (maps HTTP verbs to controller actions automatically):
35   #   resources :products
36
37   # Sample resource route with options:
38   #   resources :products do
39   #     member do
40   #       get 'short'
41   #       post 'toggle'
42   #     end
43   #
44   #     collection do
45   #       get 'sold'
46   #     end
47   #   end
48
49   # Sample resource route with sub-resources:
50   #   resources :products do
51   #     resources :comments, :sales
52   #     resource :seller
53   #   end
54
55   # Sample resource route with more complex sub-resources
56   #   resources :products do
57   #     resources :comments
58   #     resources :sales do
59   #       get 'recent', :on => :collection
60   #     end
61   #   end
62
63   # Sample resource route within a namespace:
64   #   namespace :admin do
65   #     # Directs /admin/products/* to Admin::ProductsController
66   #     # (app/controllers/admin/products_controller.rb)
67   #     resources :products
68   #   end
69
70   # You can have the root of your site routed with "root"
71   # just remember to delete public/index.html.
72   # root :to => 'welcome#index'
73
74   # See how all your routes lay out with "rake routes"
75
76   # This is a legacy wild controller route that's not recommended for RESTful applications.
77   # Note: This route will make all actions in every controller accessible via GET requests.
78   # match ':controller(/:action(/:id(.:format)))'
79
80   namespace :arvados do
81     namespace :v1 do
82       match '/schema' => 'schema#show'
83       match '/nodes/:uuid/ping' => 'nodes#ping', :as => :ping_node
84       match '/keep_disks/ping' => 'keep_disks#ping', :as => :ping_keep_disk
85       match '/links/from/:tail_uuid' => 'links#index', :as => :arvados_v1_links_from
86       match '/users/current' => 'users#current'
87       match '/users/system' => 'users#system'
88       match '/jobs/queue' => 'jobs#queue'
89       match '/jobs/:uuid/log_tail_follow' => 'jobs#log_tail_follow'
90       post '/jobs/:uuid/cancel' => 'jobs#cancel'
91       match '/users/:uuid/event_stream' => 'users#event_stream'
92       post '/users/:uuid/activate' => 'users#activate'
93       match '/virtual_machines/get_all_logins' => 'virtual_machines#get_all_logins'
94       match '/virtual_machines/:uuid/logins' => 'virtual_machines#logins'
95       post '/api_client_authorizations/create_system_auth' => 'api_client_authorizations#create_system_auth'
96       match '/repositories/get_all_permissions' => 'repositories#get_all_permissions'
97       get '/user_agreements/signatures' => 'user_agreements#signatures'
98       post '/user_agreements/sign' => 'user_agreements#sign'
99       resources :collections
100       resources :links
101       resources :nodes
102       resources :pipeline_templates
103       resources :pipeline_instances
104       resources :specimens
105       resources :groups
106       resources :logs
107       resources :users
108       resources :api_clients
109       resources :api_client_authorizations
110       resources :jobs
111       resources :job_tasks
112       resources :keep_disks
113       resources :authorized_keys
114       resources :virtual_machines
115       resources :repositories
116       resources :traits
117       resources :humans
118       resources :user_agreements
119     end
120   end
121
122   # omniauth
123   match '/auth/:provider/callback', :to => 'user_sessions#create'
124   match '/auth/failure', :to => 'user_sessions#failure'
125
126   # Custom logout
127   match '/login', :to => 'user_sessions#login'
128   match '/logout', :to => 'user_sessions#logout'
129
130   match '/discovery/v1/apis/arvados/v1/rest', :to => 'arvados/v1/schema#discovery_rest_description'
131
132   match '/static/login_failure', :to => 'static#login_failure', :as => :login_failure
133
134   # Send unroutable requests to an arbitrary controller
135   # (ends up at ApplicationController#render_not_found)
136   match '*a', :to => 'arvados/v1/links#render_not_found'
137
138   root :to => 'static#home'
139 end