Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/netapp/ontap-rest-python
This repository contains sample code illustrating how to access the ONTAP REST API using Python. This Repository also contains ONTAPI Usage reporting code that helps to identify ONTAPI usage in your environment using ONTAP REST APIs.
https://github.com/netapp/ontap-rest-python
api netapp netapp-automation netapp-lab netapp-ontap-cluster netapp-public netappapi netappontap netapprestapi ontap ontap-rest-python ontapautomation ontapi ontapi-usage-reporting-tool python pythonclientlibrary rest rest-api restapi zapi
Last synced: about 1 month ago
JSON representation
This repository contains sample code illustrating how to access the ONTAP REST API using Python. This Repository also contains ONTAPI Usage reporting code that helps to identify ONTAPI usage in your environment using ONTAP REST APIs.
- Host: GitHub
- URL: https://github.com/netapp/ontap-rest-python
- Owner: NetApp
- License: bsd-3-clause
- Created: 2020-02-20T16:04:23.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-10-02T21:06:06.000Z (about 1 year ago)
- Last Synced: 2024-03-26T20:52:45.544Z (9 months ago)
- Topics: api, netapp, netapp-automation, netapp-lab, netapp-ontap-cluster, netapp-public, netappapi, netappontap, netapprestapi, ontap, ontap-rest-python, ontapautomation, ontapi, ontapi-usage-reporting-tool, python, pythonclientlibrary, rest, rest-api, restapi, zapi
- Language: Shell
- Homepage:
- Size: 73.2 MB
- Stars: 58
- Watchers: 24
- Forks: 40
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# ONTAP-REST-Python Examples
NetApp® ONTAP® 9.6 and later versions include support for an expansive RESTful web services API. In comparison to an ONTAPI® application, the REST API offers a vastly simplified and workflow-driven user experience, allowing you to perform multiple operations on the storage objects with a single API. REST is the industry standard for API development and the ONTAP REST API provides a great opportunity to automate your storage deployments.
This repository contains sample scripts illustrating how to use the ONTAP REST API. You can access the API through the Python client library, which is preferable in most situations. If needed, you can also connect directly to the API using the native capabilities provided with Python. See the repository folder **examples** with two subfolders containing sample code by usage type. Also see the folder **lod** for instructions on using the NetApp Lab on Demand (LOD) to run the sample scripts.
## Using the Python client library
The Python client library is a package you can use when writing scripts to access the ONTAP REST API. It provides support for several underlying services, including connection management, asynchronous request processing, and exception handling. By using the Python client library, you can quickly develop robust code to support the automation of your ONTAP deployments.
Before beginning, you need to install the package containing the library. For example:
```
pip install netapp-ontap
```You should also review the [PyPI netapp-ontap](https://pypi.org/project/netapp-ontap/) package web page for detailed system requirements and further instructions, as well as reference documentation for the library.
The repository folder **examples/python_client_library** contains sample scripts to access the ONTAP REST API through the Python client library. You need to run each of the scripts with the appropriate parameters. Use the help provided with each script to get started. For example:
```
python3 list_volume.py -h
```## Directly accessing the ONTAP REST API
The repository folder **examples/rest_api** contains sample scripts to directly access the ONTAP REST API using the `requests` library. You need to run each of the scripts with the appropriate parameters. Use the help provided with each script to get started. For example:
```
python3 create_volume.py -h
```## Running the sample scripts in the Lab on Demand
You can run the sample scripts in the NetApp Lab on Demand (LOD). The repository folder [lod](https://github.com/NetApp/ontap-rest-python/tree/master/lod) contains instructions as well as the initialization script needed to configure the LOD environment.
## Support
Report any issues to: https://github.com/NetApp/ontap-rest-api/issues. For any questions or concerns, send an email to: [email protected], post on the [community forums](https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/bd-p/ONTAP-Rest-API-discussions) or connect with us through [Slack](https://netapppub.slack.com/archives/C1E4AJHDM).
To learn more about ONTAP REST APIs, visit https://devnet.netapp.com/restapi.php