2873: add /permissions API method
[arvados.git] / services / api / config / routes.rb
1 Server::Application.routes.draw do
2   themes_for_rails
3
4   # See http://guides.rubyonrails.org/routing.html
5
6   namespace :arvados do
7     namespace :v1 do
8       resources :api_client_authorizations do
9         post 'create_system_auth', on: :collection
10       end
11       resources :api_clients
12       resources :authorized_keys
13       resources :collections do
14         get 'provenance', on: :member
15         get 'used_by', on: :member
16       end
17       resources :groups do
18         get 'contents', on: :member
19       end
20       resources :humans
21       resources :job_tasks
22       resources :jobs do
23         get 'queue', on: :collection
24         post 'cancel', on: :member
25       end
26       resources :keep_disks do
27         post 'ping', on: :collection
28       end
29       resources :keep_services do
30         get 'accessible', on: :collection
31       end
32       resources :links
33       resources :logs
34       resources :nodes do
35         post 'ping', on: :member
36       end
37       resources :pipeline_instances
38       resources :pipeline_templates
39       resources :repositories do
40         get 'get_all_permissions', on: :collection
41       end
42       resources :specimens
43       resources :traits
44       resources :user_agreements do
45         get 'signatures', on: :collection
46         post 'sign', on: :collection
47       end
48       resources :users do
49         get 'current', on: :collection
50         get 'system', on: :collection
51         post 'activate', on: :member
52         post 'setup', on: :collection
53         post 'unsetup', on: :member
54       end
55       resources :virtual_machines do
56         get 'logins', on: :member
57         get 'get_all_logins', on: :collection
58       end
59       get '/permissions/:uuid', :to => 'links#get_permissions'
60     end
61   end
62
63   # omniauth
64   match '/auth/:provider/callback', :to => 'user_sessions#create'
65   match '/auth/failure', :to => 'user_sessions#failure'
66
67   # Custom logout
68   match '/login', :to => 'user_sessions#login'
69   match '/logout', :to => 'user_sessions#logout'
70
71   match '/discovery/v1/apis/arvados/v1/rest', :to => 'arvados/v1/schema#index'
72
73   match '/static/login_failure', :to => 'static#login_failure', :as => :login_failure
74
75   # Send unroutable requests to an arbitrary controller
76   # (ends up at ApplicationController#render_not_found)
77   match '*a', :to => 'static#render_not_found'
78
79   root :to => 'static#home'
80 end