Class: Dcm4chee::Api::V1::ModalitiesController

Inherits:
BaseController show all
Defined in:
app/controllers/dcm4chee/api/v1/modalities_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject

List modalities

Examples:

# Request
GET /api/modalities HTTP/1.1
Accept: application/vnd.menglifang.org; version=1

# Response
HTTP/1.1 200 OK
{
  "modalities": [{
    "name": ...
  }, ...]
}


21
22
23
24
25
# File 'app/controllers/dcm4chee/api/v1/modalities_controller.rb', line 21

def index
  modalities = Modality.all

  render json: { modalities: modalities }
end