Revision 88c60cb8
Added by Adi Abramovich almost 3 years ago
app/controllers/api/v2/smart_proxies_controller.rb | ||
---|---|---|
api :GET, "/smart_proxies/", N_("List all smart proxies")
|
||
param_group :taxonomy_scope, ::Api::V2::BaseController
|
||
param_group :search_and_pagination, ::Api::V2::BaseController
|
||
param :include_status, :bool, N_("Flag to indicate whether to include status or not")
|
||
add_scoped_search_description_for(SmartProxy)
|
||
|
||
def index
|
||
@smart_proxies = resource_scope_for_index.includes(:features)
|
||
@status = params[:include_status]
|
||
end
|
||
|
||
api :GET, "/smart_proxies/:id/", N_("Show a smart proxy")
|
||
param :id, :identifier, :required => true
|
||
param :include_status, :bool, N_("Flag to indicate whether to include status or not")
|
||
param :include_version, :bool, N_("Flag to indicate whether to include version or not")
|
||
|
||
def show
|
||
@status = params[:include_status]
|
||
@version = params[:include_version]
|
||
end
|
||
|
||
def_param_group :smart_proxy do
|
Also available in: Unified diff
Fixes #32727 - Added status and version to api call (#8572)