Class: Dcm4chee::Api::V1::FileSystemsController

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

Instance Method Summary collapse

Instance Method Details

#indexObject

List the file systems including the status of them.

Examples:

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

# 响应
HTTP/1.1 200 OK
{
  "file_systems": [{
    "id": ...,
    "path": ...,
    "total_space": ...,
    "free_space": ...,
    "used_space": ...,
    "min_free_space": ...,
    "expected_space_per_day": ...,
    "remaining_days": ...
  }, ...]
}


29
30
31
32
33
# File 'app/controllers/dcm4chee/api/v1/file_systems_controller.rb', line 29

def index
  file_systems = FileSystem.online

  respond_with file_systems: file_systems
end