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