Sun Microsystems, Inc.  Oracle System Handbook - ISO 7.0 May 2018 Internal/Partner Edition
   Home | Current Systems | Former STK Products | EOL Systems | Components | General Info | Search | Feedback

Asset ID: 1-71-1988216.1
Update Date:2017-10-05
Keywords:

Solution Type  Technical Instruction Sure

Solution  1988216.1 :   Oracle ZFS Storage Appliance: RESTful API on ZFS Storage Appliance  


Related Items
  • Sun ZFS Storage 7320
  •  
  • Oracle ZFS Storage ZS3-2
  •  
  • Oracle ZFS Storage ZS3-4
  •  
  • Sun ZFS Storage 7420
  •  
  • Oracle ZFS Storage ZS4-4
  •  
  • Sun ZFS Storage 7120
  •  
Related Categories
  • PLA-Support>Sun Systems>DISK>ZFS Storage>SN-DK: 7xxx NAS
  •  




In this Document
Goal
Solution


Applies to:

Sun ZFS Storage 7320 - Version All Versions to All Versions [Release All Releases]
Oracle ZFS Storage ZS4-4 - Version All Versions to All Versions [Release All Releases]
Sun ZFS Storage 7420 - Version All Versions to All Versions [Release All Releases]
Sun ZFS Storage 7120 - Version All Versions to All Versions [Release All Releases]
Oracle ZFS Storage ZS3-2 - Version All Versions to All Versions [Release All Releases]
7000 Appliance OS (Fishworks)

Goal

 Preview of RESTful Interface in Oracle ZFS Storage Appliance.

Solution

ZFS Storage Appliance now provides the capability to interact using RESTful API from 2013.1.2.0 onwards.

REST can be used for managing and monitoring the systems with manual or automated means. So the administration can be done using REST apart from BUI/CLI.
You can also use programming languages, for example Curl and Python, on the client side to write scripts and utilize this interface - which can be helpful to complete more complex tasks.

Apart from just listing simple results we can also perform more complex and iterative tasks.  We can perform the GET(retrieve information), PUT (modify), POST(create), DELETE(destroy) operations.  In case of errors, the API will return the error codes that can be useful for further troubleshooting.

Authentication is done using the same mechanism - which is used for BUI/CLI and a session is created.

For example you can try simply running the following in your browser :

https://<Appliance_IP>:215/api
Confirm user/pass


list the pools  using href: "/api/storage/v1/pools"
https://<Appliance_IP>:215/api/storage/v1/pools
{"pools":[{"status": "online", "profile": "mirror", "name": "pool1", "usage": {}, "peer": "00000000-0000-0000-0000-000000000000", "href": "/api/storage/v1/pools/pool1", "owner": "zfsvm", "asn": "ada56676-c04a-45cc-d197-c86a791acf65"}]}


You can also use the add-ons in the browser as a REST client :

Note: Oracle DO NOT recommend any specific add-on or third party client for this purpose.
        Below example is only for demonstration purpose only.


 Example : Response Header

Response Header

Response Body: All response data is encoded in JavaScript Object Notation (JSON)

Example: Response Body

Response Body


For listing Services you can use :

href: /api/service/v1/services/


 


Attachments
This solution has no attachment
  Copyright © 2018 Oracle, Inc.  All rights reserved.
 Feedback