Print Email PDF

Getting Started with Qumulo Core REST API


Outlines how to get started with the the Qumulo Core REST API


  • Cluster running Qumulo Core
  • Command line (CLI) tools installed via API & Tools tab
  • Python client library wrappers 


What is the Qumulo REST API?

On your cluster is a dashboard application that shows cluster analytics, lets you define shares, and provides links to support. There is also a link to ‘API and Tools’ which lets you download the python client library wrappers and CLI for the Qumulo Core REST API and also provides direct navigable “live” documentation where you can read about the different APIs and experiment by trying things out directly in place.

Qumulo API Concepts

The Qumulo REST API covers cluster concepts including authentication, cluster and node state, cluster analytics, files and resources, sharing/permissions and more. On your cluster, navigate to the cluster hostname followed by /api to view the documentation for the REST API. You can also try out the code live on this page!

Getting the Qumulo REST API

There are several ways to obtain the python client wrapper and CLI for Qumulo Core REST API:

  • On your cluster, click the APIs & Tools button and then click Download Command-Line Tools
  • Sign up for a Qumulo virtual machine/ virtual cluster and download as outlined above
  • Create a python application and add a reference to the public Qumulo REST API python library in your application requirements.txt file, like this:

If you do not specify a version number, you will get the latest version of the library. 

Example Code

You can find sample code for the Qumulo REST API on GitHub along with a starter template to begin creating your own projects.

To give you a taste of what you can do with the Qumulo REST API, here are some example calls and the result (this example is using our provided RestClient wrapper class -- you can run these and more samples yourself using the example here):

api_cli = RestClient(cluster, 8000)
api_cli.login(username=username, password=password)

# Filesystem stats
raw_size_bytes -> 102420130627584
free_size_bytes -> 38224544026624
total_size_bytes -> 41977936609280
block_size_bytes -> 4096
# File Attributes
api_cli.fs.get_attr(path = file_samples[0]['name'])
datablocks -> 1
metablocks -> 1
group -> 17179869184
name -> f2951woseo.acun
modification_time -> 2015-09-28T23:20:38.067862498Z
creation_time -> 2015-09-28T23:20:38.063504462Z
num_links -> 1
blocks -> 2
change_time -> 2015-09-28T23:20:38.067862498Z
child_count -> 0
mode -> 0100666
owner -> 12884901888
path -> /CL2/d7mru/d98btti/f2951woseo.acun
size -> 4096
id -> 4361665
file_number -> 4361665

# Cluster system config
node_label -> f4:52:14:54:da:c0
node_serial_number -> sCC121500C
node_model_number -> Q0626
node_infos -> [{u'node_info': {u'raw_capacity': u'6251228676', u'model_number': u'Q0626',
u'label': u'f4:52:14:88:f3:50'}, u'uuid': u'317c99d4-ab51-4ff5-82e4-384c6e378c5b'},
{u'node_info': {u'raw_capacity': u'6251228676', u'model_number': u'Q0626', u'label':
u'f4:52:14:54:da:c0'}, u'uuid': u'82381861-ce0a-48bb-ad0c-9817041d87c8'}, {u'node_info':
{u'raw_capacity': u'6251228676', u'model_number': u'Q0626', u'label': u'f4:52:14:8f:24:30'},
u'uuid': u'd6605902-f5bd-45e0-a151-8f98abdb6aea'}, {u'node_info': {u'raw_capacity': u'6251228676',
u'model_number': u'Q0626', u'label': u'f4:52:14:88:f3:f0'},
u'uuid': u'fdfb8815-c598-4f0c-a913-4e582b7e98a7'}]
persistent_failpoints -> []
ino_range_end -> 0
local -> {u'raw_capacity': u'6251228676', u'next_virtual_disk_id': 4, u'next_physical_disk_id': 6,
u'backing_disks': [{u'state': u'DEVICE_UI_STATE_HEALTHY', u'disk_id': u'1.3'}, {u'state':
u'DEVICE_UI_STATE_HEALTHY', u'disk_id': u'1.4'}, {u'state': u'DEVICE_UI_STATE_HEALTHY',
u'disk_id': u'1.5'}, {u'state': u'DEVICE_UI_STATE_HEALTHY', u'disk_id': u'1.6'}], u'working_disks':
[{u'state': u'DEVICE_UI_STATE_HEALTHY', u'disk_id': u'1.1'}, {u'state': u'DEVICE_UI_STATE_HEALTHY',
u'disk_id': u'1.2'}]}
log_levels -> []
ino_range_begin -> 0

{u'ip': u'', u'rate': 0.8833333333333333, u'type': u'write', u'id': u'2471806'}
{u'ip': u'', u'rate': 0.85, u'type': u'write', u'id': u'2481757'}
{u'ip': u'', u'rate': 1.1333333333333333, u'type': u'write', u'id': u'2551748'}

# Directory Aggregates

api_cli.fs.read_dir_aggregates("/", max_entries=10, recursive=True)
{u'files': [{u'capacity_usage': u'3625993621504',
u'data_usage': u'3625953251328',
u'id': u'3',
u'max_change_time': u'2015-09-29T16:41:58.190090229Z',
u'meta_usage': u'40370176',
u'name': u'tv-shows',
u'num_directories': u'38',
u'num_files': u'965',
u'num_other_objects': u'0',
u'num_symlinks': u'0',
u'id': u'2',
u'max_change_time': u'2015-09-29T16:41:58.190090229Z',
u'path': u'/',
u'total_capacity': u'3745291919360',
u'total_data': u'3744670523392',
u'total_directories': u'4569',
u'total_files': u'137881',
u'total_meta': u'621395968',
u'total_other_objects': u'0',
u'total_symlinks': u'120'}


You should now successfully be able to begin working and utilizing the Qumulo Core API


QQ CLI: Comprehensive List of Commands



Like what you see? Share this article with your network!


Was this article helpful?
1 out of 1 found this helpful



Please sign in to leave a comment.

Have more questions?
Open a Case
Share it, if you like it.