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