Class: Dcm4chee::Api::V1::InstancesController
- Inherits:
-
BaseController
- Object
- ActionController::Base
- Dcm4chee::ApplicationController
- BaseController
- Dcm4chee::Api::V1::InstancesController
- Defined in:
- app/controllers/dcm4chee/api/v1/instances_controller.rb
Instance Method Summary collapse
-
#create ⇒ Object
Restore an instance from the trash.
-
#index ⇒ Object
Search for instances.
Instance Method Details
#create ⇒ Object
Restore an instance from the trash.
59 60 61 62 63 64 |
# File 'app/controllers/dcm4chee/api/v1/instances_controller.rb', line 59 def create trashed_instance = TrashedInstance.get!(params[:trashed_instance_id]) trashed_instance.restore_from_trash head :created end |
#index ⇒ Object
Search for instances. Supported querying conditions:
series_id ID of a series
Check DataMapper::Searcher::ClassMethods for supported querying operators.
41 42 43 44 45 |
# File 'app/controllers/dcm4chee/api/v1/instances_controller.rb', line 41 def index instances = Instance.search(params[:q]) respond_with instances: instances end |