{"id":21526393,"url":"https://github.com/netapp/ontap-rest-python","last_synced_at":"2025-04-09T23:33:22.262Z","repository":{"id":45524334,"uuid":"241927447","full_name":"NetApp/ontap-rest-python","owner":"NetApp","description":"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.","archived":false,"fork":false,"pushed_at":"2024-04-19T16:41:31.000Z","size":76714,"stargazers_count":68,"open_issues_count":5,"forks_count":42,"subscribers_count":23,"default_branch":"master","last_synced_at":"2025-03-24T01:23:22.017Z","etag":null,"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"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NetApp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2020-02-20T16:04:23.000Z","updated_at":"2025-03-20T11:05:08.000Z","dependencies_parsed_at":"2023-10-03T02:44:39.059Z","dependency_job_id":null,"html_url":"https://github.com/NetApp/ontap-rest-python","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NetApp%2Fontap-rest-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NetApp%2Fontap-rest-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NetApp%2Fontap-rest-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NetApp%2Fontap-rest-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NetApp","download_url":"https://codeload.github.com/NetApp/ontap-rest-python/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248129975,"owners_count":21052671,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["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"],"created_at":"2024-11-24T01:44:48.721Z","updated_at":"2025-04-09T23:33:22.237Z","avatar_url":"https://github.com/NetApp.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ONTAP-REST-Python Examples\r\n\r\nNetApp® 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.\r\n\r\nThis 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.\r\n\r\n## Using the Python client library\r\n\r\nThe 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.\r\n\r\nBefore beginning, you need to install the package containing the library. For example:\r\n\r\n```\r\npip install netapp-ontap\r\n```\r\n\r\nYou 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.\r\n\r\nThe 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:\r\n\r\n```\r\npython3 list_volume.py -h\r\n```\r\n\r\n## Directly accessing the ONTAP REST API\r\n\r\nThe 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:\r\n\r\n```\r\npython3 create_volume.py -h\r\n```\r\n\r\n## Running the sample scripts in the Lab on Demand\r\n\r\nYou 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.\r\n\r\n## Support\r\n\r\nReport any issues to: https://github.com/NetApp/ontap-rest-api/issues. For any questions or concerns, send an email to: ng-ontap-restapi-queries@netapp.com, 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).\r\n\r\nTo learn more about ONTAP REST APIs, visit https://devnet.netapp.com/restapi.php \r\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetapp%2Fontap-rest-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnetapp%2Fontap-rest-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetapp%2Fontap-rest-python/lists"}