config/routes/api/v2.rb in katello-2.2.2 vs config/routes/api/v2.rb in katello-2.4.0.rc1
- old
+ new
@@ -26,10 +26,11 @@
end
end
end
api_resources :activation_keys, :only => [:index, :create, :show, :update, :destroy] do
+ get :auto_complete_search, :on => :collection
member do
match '/product_content' => 'activation_keys#product_content', :via => :get
match '/content_override' => 'activation_keys#content_override', :via => :put
post :copy
put :add_subscriptions
@@ -50,25 +51,29 @@
end
api_resources :systems, :only => [:index]
end
api_resources :content_views do
+ get :auto_complete_search, :on => :collection
member do
post :copy
post :publish
post :refresh
put :remove
get :history
get :available_puppet_modules
get :available_puppet_module_names
match '/environments/:environment_id' => "content_views#remove_from_environment", :via => :delete
end
- api_resources :content_view_puppet_modules
+ api_resources :content_view_puppet_modules do
+ collection do
+ get :auto_complete_search
+ end
+ end
api_resources :filters, :controller => :content_view_filters do
- member do
- get :available_errata
- get :available_package_groups
+ collection do
+ get :auto_complete_search
end
api_resources :errata, :only => [:index]
api_resources :package_groups, :only => [:index]
end
api_resources :puppet_modules, :only => [:index]
@@ -78,21 +83,21 @@
api_resources :content_view_filters do
api_resources :errata, :only => [:index]
api_resources :package_groups, :only => [:index]
api_resources :rules, :controller => :content_view_filter_rules
- member do
- get :available_errata
- get :available_package_groups
+ collection do
+ get :auto_complete_search
end
end
api_resources :content_view_versions, :except => [:create] do
member do
post :promote
end
collection do
+ get :auto_complete_search
post :incremental_update
end
end
api_resources :docker_images, :only => [:index, :show]
@@ -127,10 +132,11 @@
member do
post :copy
put :add_systems
put :remove_systems
end
+ get :auto_complete_search, :on => :collection
api_resources :systems, :only => [:index, :show, :create, :update, :destroy]
end
api_resources :organizations, :only => [:index, :show, :update, :create, :destroy] do
api_resources :activation_keys, :only => [:index]
@@ -152,65 +158,85 @@
end
api_resources :products, :only => [:index]
api_resources :subscriptions, :only => [:index] do
collection do
match '/available' => 'subscriptions#available', :via => :get
+ get :auto_complete_search
get :manifest_history
end
end
api_resources :systems, :only => [:index, :show, :create, :update, :destroy] do
get :report, :on => :collection
end
end
- api_resources :packages, :only => [:index, :show]
+ api_resources :packages, :only => [:index, :show] do
+ collection do
+ get :auto_complete_search
+ get :auto_complete_name
+ end
+ end
- api_resources :package_groups, :only => [:index, :show]
+ api_resources :package_groups, :only => [:index, :show] do
+ collection do
+ get :auto_complete_search
+ end
+ end
api_resources :ping, :only => [:index]
match "/status" => "ping#server_status", :via => :get
api_resources :products, :only => [:index, :show, :create, :update, :destroy] do
member do
post :sync
end
+ collection do
+ get :auto_complete_search
+ end
api_resources :repository_sets, :only => [:index, :show] do
member do
get :available_repositories
put :enable
put :disable
end
end
end
- api_resources :puppet_modules, :only => [:index, :show]
+ api_resources :puppet_modules, :only => [:index, :show] do
+ get :auto_complete_search, :on => :collection
+ end
api_resources :repositories, :only => [:index, :create, :show, :destroy, :update] do
collection do
post :sync_complete
+ get :auto_complete_search
end
end
api_resources :repository_sets, :only => [:index, :show] do
member do
put :enable
put :disable
end
end
- api_resources :subscriptions, :only => [:show]
+ api_resources :subscriptions, :only => [:index, :show] do
+ collection do
+ get :auto_complete_search
+ end
+ end
api_resources :systems, :only => [:index, :show, :create, :update, :destroy] do
member do
get :available_host_collections, :action => :available_host_collections
post :host_collections, :action => :add_host_collections
delete :host_collections, :action => :remove_host_collections
get :packages, :action => :package_profile
- get :errata
get :pools
get :releases
put :refresh_subscriptions
put :content_override
+ get :product_content
end
api_resources :activation_keys, :only => [:index]
api_resources :host_collections, :only => [:index]
api_resources :products, :only => [:index]
api_resources :subscriptions, :only => [:create, :index, :destroy] do
@@ -226,23 +252,24 @@
##############################
api_resources :organizations do
api_resources :sync_plans do
member do
- get :available_products
put :add_products
put :remove_products
end
collection do
get :auto_complete_search
+ match ':sync_plan_id/available_products', :to => 'products#index',
+ :available_for => 'sync_plan'
+ match ':sync_plan_id/products', :to => 'products#index'
end
end
api_resources :systems, :only => [:create] do
get :report, :on => :collection
end
- api_resources :distributors, :only => [:index, :create]
resource :uebercert, :only => [:show]
api_resources :gpg_keys, :only => [:index]
api_resources :content_views, :only => [:index, :create]
@@ -264,10 +291,11 @@
api_resources :systems, :only => [] do
member do
get :events
end
collection do
+ match '/post_index' => 'systems#index', :via => :post
match '/bulk/add_host_collections' => 'systems_bulk_actions#bulk_add_host_collections', :via => :put
match '/bulk/remove_host_collections' => 'systems_bulk_actions#bulk_remove_host_collections', :via => :put
match '/bulk/install_content' => 'systems_bulk_actions#install_content', :via => :put
match '/bulk/applicable_errata' => 'systems_bulk_actions#applicable_errata', :via => :post
match '/bulk/update_content' => 'systems_bulk_actions#update_content', :via => :put
@@ -282,34 +310,23 @@
put :install
put :upgrade
put :upgrade_all
end
end
- api_resources :errata, :only => [:show], :controller => :system_errata do
+ api_resources :errata, :only => [:show, :index], :controller => :system_errata do
collection do
put :apply
+ get :auto_complete_search
end
end
end
- api_resources :distributors, :only => [:show, :destroy, :create, :index, :update] do
- member do
- get :pools
- end
- api_resources :subscriptions, :only => [:create, :index, :destroy] do
- collection do
- match '/' => 'subscriptions#destroy_all', :via => :delete
- match '/serials/:serial_id' => 'subscriptions#destroy_by_serial', :via => :delete
- end
- end
- end
- match "/distributor_versions" => "distributors#versions", :via => :get, :as => :distributor_versions
-
api_resources :repositories, :only => [], :constraints => { :id => /[0-9a-zA-Z\-_.]*/ } do
collection do
match '/bulk/destroy' => 'repositories_bulk_actions#destroy_repositories', :via => :put
match '/bulk/sync' => 'repositories_bulk_actions#sync_repositories', :via => :post
+ get :auto_complete_search
end
api_resources :sync, :only => [:index] do
delete :index, :on => :collection, :action => :cancel
end
@@ -340,10 +357,9 @@
put :import_uploads
end
end
api_resources :environments, :only => [] do
- api_resources :distributors, :only => [:create, :index]
api_resources :products, :only => [:index] do
get :repositories, :on => :member
end
api_resources :content_views, :only => [:index]