1 Server::Application.routes.draw do
4 # See http://guides.rubyonrails.org/routing.html
6 # OPTIONS requests are not allowed at routes that use cookies.
7 ['/auth/*a', '/login', '/logout'].each do |nono|
8 match nono, :to => 'user_sessions#cross_origin_forbidden', :via => 'OPTIONS'
10 # OPTIONS at discovery and API paths get an empty response with CORS headers.
11 match '/discovery/v1/*a', :to => 'static#empty', :via => 'OPTIONS'
12 match '/arvados/v1/*a', :to => 'static#empty', :via => 'OPTIONS'
16 resources :api_client_authorizations do
17 post 'create_system_auth', on: :collection
19 resources :api_clients
20 resources :authorized_keys
21 resources :collections do
22 get 'provenance', on: :member
23 get 'used_by', on: :member
26 get 'contents', on: :collection
27 get 'contents', on: :member
32 resources :container_requests
34 get 'queue', on: :collection
35 get 'queue_size', on: :collection
36 post 'cancel', on: :member
37 post 'lock', on: :member
39 resources :keep_disks do
40 post 'ping', on: :collection
42 resources :keep_services do
43 get 'accessible', on: :collection
48 post 'ping', on: :member
50 resources :pipeline_instances
51 resources :pipeline_templates
52 resources :repositories do
53 get 'get_all_permissions', on: :collection
57 resources :user_agreements do
58 get 'signatures', on: :collection
59 post 'sign', on: :collection
62 get 'current', on: :collection
63 get 'system', on: :collection
64 post 'activate', on: :member
65 post 'setup', on: :collection
66 post 'unsetup', on: :member
68 resources :virtual_machines do
69 get 'logins', on: :member
70 get 'get_all_logins', on: :collection
72 get '/permissions/:uuid', :to => 'links#get_permissions'
76 if Rails.env == 'test'
77 post '/database/reset', to: 'database#reset'
81 match '/auth/:provider/callback', :to => 'user_sessions#create'
82 match '/auth/failure', :to => 'user_sessions#failure'
83 # not handled by omniauth provider -> 403 with no CORS headers.
84 get '/auth/*a', :to => 'user_sessions#cross_origin_forbidden'
87 match '/login', :to => 'user_sessions#login'
88 match '/logout', :to => 'user_sessions#logout'
90 match '/discovery/v1/apis/arvados/v1/rest', :to => 'arvados/v1/schema#index'
92 match '/static/login_failure', :to => 'static#login_failure', :as => :login_failure
94 # Send unroutable requests to an arbitrary controller
95 # (ends up at ApplicationController#render_not_found)
96 match '*a', :to => 'static#render_not_found'
98 root :to => 'static#home'