NetApp OnCommand Insight 7.3 REST API +

REST = Representational state transfer

OCI 7.0+ has a single API for retrieval of data from the system: REST + JSON

If you log into your OnCommand Insight Server’s Web Portal at https://OCI_SVR_FQDN and click on the (?) you’ll see a link to ‘REST API Documentation’; which takes you to the ‘Insight REST API documentation 1.4.0’ (https://OCI_SVR_FQDN/rest/v1/documentation/). This live (generated from code) and interactive (has a ‘Try it out’ button) documentation is the primary source of reference information for the OCI 7.3 REST API - it tells you all you need to create your request payload.

Image: Displaying REST API Documentation


List of ‘Global collection URLs’

These paths will display the raw JSON. You can drill deeper for ‘Individual object URLs’ and ‘Nested collection URLs’.


https://OCI_SVR_FQDN/rest/v1/admin/acquisitionUnits
https://OCI_SVR_FQDN/rest/v1/admin/certificates
https://OCI_SVR_FQDN/rest/v1/admin/datasources
https://OCI_SVR_FQDN/rest/v1/admin/ldap
https://OCI_SVR_FQDN/rest/v1/admin/licenses
https://OCI_SVR_FQDN/rest/v1/admin/patches
https://OCI_SVR_FQDN/rest/v1/admin/users

https://OCI_SVR_FQDN/rest/v1/assets/annotations
https://OCI_SVR_FQDN/rest/v1/assets/applications
https://OCI_SVR_FQDN/rest/v1/assets/businessEntities
https://OCI_SVR_FQDN/rest/v1/assets/dataStores
https://OCI_SVR_FQDN/rest/v1/assets/disks
https://OCI_SVR_FQDN/rest/v1/assets/fabrics
https://OCI_SVR_FQDN/rest/v1/assets/fileSystems
https://OCI_SVR_FQDN/rest/v1/assets/hosts
https://OCI_SVR_FQDN/rest/v1/assets/internalVolumes
https://OCI_SVR_FQDN/rest/v1/assets/ports
https://OCI_SVR_FQDN/rest/v1/assets/qtrees
https://OCI_SVR_FQDN/rest/v1/assets/shares
https://OCI_SVR_FQDN/rest/v1/assets/storageNodes
https://OCI_SVR_FQDN/rest/v1/assets/storagePools
https://OCI_SVR_FQDN/rest/v1/assets/storages
https://OCI_SVR_FQDN/rest/v1/assets/switches
https://OCI_SVR_FQDN/rest/v1/assets/virtualMachines
https://OCI_SVR_FQDN/rest/v1/assets/vmdks
https://OCI_SVR_FQDN/rest/v1/assets/volumes

https://OCI_SVR_FQDN/rest/v1/login
https://OCI_SVR_FQDN/rest/v1/search



Supported REST Verbs

  POST: create new objects*
   GET: retrieve object information**
   PUT: update/replace object*
 PATCH: update/modify object*
DELETE: delete object*

*Requires administrative permissions.
**Every authenticated user can GET info.


Expand

It is possible to expand on ‘Nested collection URLs’ to reduce API calls. For example:
https://OCI_SVR_FQDN/rest/v1/assets/storages/2702026?expand=storageNodes
https://OCI_SVR_FQDN/rest/v1/assets/storages/2702026?expand=performance

To get information on everything you can expand by _expands:
https://OCI_SVR_FQDN/rest/v1/assets/storages/2702026?expand=_expands

Furthermore you can use commas and dots to get even more:
https://OCI_SVR_FQDN/rest/v1/assets/storages/2702026?expand=_expands,storagePools
https://OCI_SVR_FQDN/rest/v1/assets/storages/2702026?expand=storagePools.volumes
https://OCI_SVR_FQDN/rest/v1/assets/storages/2702026?expand=storagePools.volumes.performance

You can go as wide (comma) and as deep (dot) as you want.

performance.history gives all the counters stored in the Cassandra database back as JSON.
https://OCI_SVR_FQDN/rest/v1/assets/storages/2702026?expand=performance.history

Can filter on times using fromTime and toTime (these are time stamps in milliseconds in the epoch):
https://OCI_SVR_FQDN/rest/v1/assets/storages/2702026?expand=performance.history&fromTime=XX&toTime=YY


API Samples and Getting Started with API

The ‘Insight REST API documentation 1.4.0’ also has links to ‘API samples’ and ‘Getting Started...’.

Image: Insight REST API documentation 1.4.0: ‘API samples’ and ‘Getting started... (with API)’
The ‘API samples’ button downloads a samples.zip file with code samples for:
- Java (1 sample)
- PowerShell (1 sample)
- Python (14 samples)

The ‘Getting started...’ button opens:
https://ocisvr.lab.priv/documentation/Getting_started_with_NetApp_OnCommand_Insight_REST_API.html


REST API Related Links

Representational State Transfer

HATEOAS

Learn REST: A RESTful Tutorial

YouTube: OnCommand Insight REST API (Jul 17, 2015) 50 minutes
Note: The demo starts around the 33 minutes.

Postman App/Tool (great tool to work with REST APIs)


OCI Links

Storage Automation Store: OnCommand Insight (Reports)

NetApp Community: OnCommand Storage Management Software Discussions - Insight

OnCommand Insight 7.3 Product Documentation
- Release Notes
- Configuration and Administration Guide
- Data Warehouse Administration Guide
- Frequently Asked Questions
- How To Guides
- Installation Guide for Linux
- Installation Guide for Microsoft Windows
- Reporting Guide


Links for NetApp Employees and Partners

Especially of interest:
- OCI Deployment Guidelines and Best Practices
- OCI Operational Guidelines and Best Practices
- OCI Reporting Workshop Best Practices

Comments

  1. Hi! Thanls a lot for your great job.
    I'm not able to fild the "especially of interest" docs you've cited. Nevertheless as partner I've access to the FieldPortal I cannot find and a search on the web report a couple of link belonging to forums.stage.netapp.com page with no access with my NetApp credentials.
    Regards,

    ReplyDelete
  2. tx buddy. great article and just what i was looking for !

    ReplyDelete
    Replies
    1. ouch, thought it was ocum, but i oci... not what I was looking for :(

      Delete

Post a Comment