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