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