Get file system storage space information

get

/rest/{version}/system/storage

Retrieves the remaining and used amount of space in the boot directory, code, and ramdrv devices.

Request

Path Parameters
Query Parameters
Header Parameters
  • The value in the Authorization header must be the string "Bearer {access token}", where {access token} is a valid, unexpired token received in response to a prior /rest/{version}/auth/token request.
Back to Top

Response

200 Response

OK - Requested data is returned in response body

400 Response

The request is malformed in some way or is missing required information and therefore cannot be processed.

401 Response

Unauthorized - Request lacks valid authentication credentials.

404 Response

Resource not found
Back to Top

Examples

Examples of Accessing the API

See Authenticate for how to acquire a token.

The following example shows how to get file system storage space information using curl.

curl -X GET \
    --header "Accept: application/xml" \
    --header "Authorization: Bearer $TOKEN" \
    "https://${SBCIP}/rest/v1.2/system/storage"

The following example shows how to get file system storage space information using Python.

import requests
headers = { "Accept":"application/xml", "Authorization":"Bearer " + token }
url  = "https://" + sbcip + "/rest/v1.2/system/storage"
resp = requests.get(url, headers=headers)

Example of the Response Body

The following example shows the contents of the response body in XML.

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<response>
  <data>
    <storage>
      <volume>/opt</volume>
      <totalBytes>15614533632</totalBytes>
      <availableBytes>11936608256</availableBytes>
      <usedBytes>3677925376</usedBytes>
    </storage>
    <storage>
      <volume>/code</volume>
      <totalBytes>1950601216</totalBytes>
      <availableBytes>1947521024</availableBytes>
      <usedBytes>3080192</usedBytes>
    </storage>
    <storage>
      <volume>/boot</volume>
      <totalBytes>1949552640</totalBytes>
      <availableBytes>1853411328</availableBytes>
      <usedBytes>96141312</usedBytes>
    </storage>
  </data>
  <messages/>
  <links/>
</response>
Back to Top