Open-E Knowledgebase

[JDSS] RESTapi - HowTo

Article ID: 2871
Last updated: 05 May, 2020

Additional information:

  • product name: JovianDSS
  • product version: all
  • build: all

Subject:

RESTapi - HowTo

Contents:
​​​​

1. Un-pack JovianDSS API REST Client.zip  (in the attachment of this article)

2. Make sure you have installed "requests" Python library
     $ pip install requests

3. Read documentation
     ClientREST/jovianapi_docs/build/html/jovianapi.html

4. Read example scripts in
     ClientREST/jovianapi_scripts

5. Make sure that node which API you want to use have enabled REST proxy access
     GUI: System Settings > Administration > REST (credentials admin, admin)

6. Example of driver usage

         >>> from jovianapi import API
         >>> api = API.via_rest('192.168.251.20', 82, 'admin', 'admin')
         >>>
         >>> api.driver.get('/time')
         {u'data': {u'daemon': False,
           u'servers': [u'0.pool.ntp.org', u'1.pool.ntp.org', u'2.pool.ntp.org'],
           u'sync_at_boot': False,
           u'timestamp': 1477047212295,
           u'timezone': u'Europe/Berlin'},
           u'error': None}

         >>> api.driver.put('/time', dict(servers=['pl.pool.ntp.org']))
          {u'data': None, u'error': None}

         >>> api.driver.get('/time')
          {u'data': {u'daemon': False,
           u'servers': [u'pl.pool.ntp.org'],
           u'sync_at_boot': False,
           u'timestamp': 1477047259023,
           u'timezone': u'Europe/Berlin'},
           u'error': None}

This article was:   Helpful | Not helpful Report an issue


Article ID: 2871
Last updated: 05 May, 2020
Revision: 2
Views: 725
Posted: 16 May, 2017 by Stolarczyk M.
Updated: 05 May, 2020 by Rybak M.
print  Print email  Subscribe email  Email to friend share  Share pool  Add to pool
Tags
jdss api restapi
Attached files
item Jovian API REST Client.zip (48 kb) Download

Prev     Next
[JDSS][DSS V7]"Meltdown" and "Spectre" vulnerabilities in Open-E...       [JDSS] JovianDSS capabilities - maximum users / groups, opened...

The Knowledge base is managed by Open-E data storage software company.