netapp-ontap 9.18.1.0
A library for working with ONTAP's REST APIs simply in Python
Requires Python: >=3.10
Keywords: NetApp ONTAP REST API development

# NetApp ONTAP

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.

# Getting started

The Python client library is available as the package **netapp_ontap** at the Python Package
Index (PyPi) web site at https://pypi.org/project/netapp-ontap

## Software requirements

Before installing the Python client library, you must make sure the following packages are
installed on your system:

* python 3.10 or later
* requests 2.32.4 or later, but earler than 3.0.0
* requests-toolbelt 1.0.0 or later, but earlier than 2.0.0
* marshmallow 3.21.3 or later, but earlier than 4.0.0
* apipkg version 3.0.2 or later

The library strongly suggests version 2.2.3 or later of urllib3 due to outstanding CVEs against
older versions. It also recommends version 2024.8.30 or later of certifi due to a CVE that removed
root certificates from the root store. However, it will still work with older
versions of urllib3 and certifi as long as the versions of urllib3 and certifi are compatible
with the requests package.

## Installing and importing the package

You must install the package using the pip utility:

```shell
pip install netapp-ontap
```

After installing the package, you can import the objects you need into your application:

```python
from netapp_ontap.resources import Volume, Snapshot
```

## Creating an object

You can create an object in several different ways. Here are three examples of
creating an equivalent `Volume` object.

```python
from netapp_ontap.resources import Volume

# Example 1 - keyword arguments
volume = Volume(name='vol1', svm={'name': 'vs1'}, aggregates=[{'name': 'aggr1'}])

# Example 2 - dict as keyword arguments
data = {
    'name': 'vol1',
    'svm': {'name': 'vs1'},
    'aggregates': [{'name': 'aggr1'}],
}
volume = Volume(**data)

# Example 3 - using the from_dict() method
volume = Volume.from_dict({
    'name': 'vol1',
    'svm': {'name': 'vs1'},
    'aggregates': [{'name': 'aggr1'}],
})
```

## Performing actions on an object

After you create an object, you can perform actions on the object based
on the purpose and design of your application. The example below illustrates
how to create a new volume and then take a snapshot.

Note that when using the library, in all cases you must first establish a
connection to the management LIF of the ONTAP system using the
`netapp_ontap.host_connection.HostConnection` object. In the example below,
the connection is created and then set as the global default.
This means that all objects and the associated actions reuse
this same connection. See *Host connections* for more information.

```python
from netapp_ontap import config, HostConnection
from netapp_ontap.resources import Volume, Snapshot

config.CONNECTION = HostConnection('myhost.mycompany.com', 'username', 'password')

volume = Volume(name='vol1', svm={'name': 'vs1'}, aggregates=[{'name': 'aggr1'}])
volume.post()
snapshot = Snapshot.from_dict({
    'name': '%s_snapshot' % volume.name,
    'comment': 'A snapshot of %s' % volume.name,
    'volume': volume.to_dict(),
})
snapshot.post()
```

# Host connections

The `netapp_ontap.host_connection.HostConnection` object allows a client application
to store credentials once and reuse them for each subsequent operation.
You can do this in any of the following ways:

* Call the function `set_connection()` on a specific resource so the connection is used for
all actions on the resource.

* Set the `netapp_ontap.config.CONNECTION` variable to establish a single connection instance for all
operations within the scope of that block. This allows you to connect to ONTAP once
and use the same connection everywhere, instead of providing credentials every time you make a
request.

Note that you can call `get_connection()` to get the connection used by an object and use it for
subsequent operations.

By default, every operation attempts to verify the SSL certificate for the connection. If a
certificate cannot be verified, the **SSLError** exception is thrown. You can disable this
verification by setting `netapp_ontap.host_connection.HostConnection.verify` to false when creating the
`netapp_ontap.host_connection.HostConnection` instance.

## Custom headers

In some cases, you might want to set and send custom headers with the REST request.
This can be done at the connection level. For a specific connection, you can pass in
the headers you would like to send for each request within the scope of that connection object.
The library provides full access to the request headers so that you can update, add, or delete
headers from the same connection object at any point. If a header is not recognized by ONTAP,
it is ignored.

```python
from netapp_ontap import config, HostConnection
headers = {'my-header1':'my-header-value1', 'my-header2':'my-header-value2'}

# Initialize a connection object with custom headers
config.CONNECTION = HostConnection('myhost.mycompany.com', 'username', 'password', headers=headers)

# Delete a header from a connection object
conn = HostConnection('myhost.mycompany.com', 'username', 'password', headers=headers)
del conn.request_headers['my-header1']

# Add a header to a connection object using the assignment operator
conn = HostConnection('myhost.mycompany.com', 'username', 'password', headers=headers)
conn.request_headers['mynew-header'] = 'mynew-header-value'

# Add headers to a connection object
config.CONNECTION = HostConnection('myhost.mycompany.com', 'username' 'password')
config.CONNECTION.request_headers = headers

# Update an existing header using the assignment operator
config.CONNECTION = HostConnection('myhost.mycompany.com','username','password', headers=headers)
config.CONNECTION.request_headers['my-header1'] = 'my-new-header'
```

# Asynchronous processing and jobs

All POST, PATCH, and DELETE requests that can take more than two seconds to complete are
designed to run asynchronously as non-blocking operations. These operations are executed
as background jobs at the ONTAP cluster. The HTTP response generated by an
asynchronous request always contains a link to the associated job object. By default, an
asynchronous request automatically polls the job using the unique job identifier in the link.
Control is returned to your script when a terminal state is reached (success or failure) or
the configured timeout value expires. However, you can override this behavior by setting the
**poll** value to false when calling the function, causing control to return before the job
completes. Forcing an immediate return can be useful when a job might take a long time to
complete and you want to continue execution of the script.

# Responses

A request always returns a `netapp_ontap.response.NetAppResponse` object which contains the details
of the HTTP response. It contains information such as whether the response is an error
or a job. Refer to `netapp_ontap.response.NetAppResponse` for further information on how
to check the details of the response.

# Exception handling

By default, an exception is returned if a request returns an HTTP status code of 400 or greater.
The exception object, which is of type `netapp_ontap.error.NetAppRestError`,
holds the HTTP response object so that the exception can be handled in the client code.
If you wish not to raise exceptions, you can set `netapp_ontap.config.RAISE_API_ERRORS` to false. In this case,
it is up to the client to check the HTTP response from the `netapp_ontap.response.NetAppResponse`
object and handle any errors. Refer to `netapp_ontap.error.NetAppRestError` for further information.

```python
# Set RAISE_API_ERRORS to False and check the HTTP response.
config.RAISE_API_ERRORS = False
response = Svm.find(name="nonexistent_vs")
assert "entry doesn't exist" in response.http_response.text
```

# Debugging

While writing your application, it can often be useful to see the raw HTTP request and response
text that the library is sending to and from the server. There are two flags that can be set
to help with this.

## DEBUG flag

The first is the DEBUG flag. This can be set either by setting DEBUG=1 in the environment prior
to executing your application or by setting `netapp_ontap.utils.DEBUG` to 1 inside of your application.
This flag, when set, will cause the library to log the request and response for any failed
API call. This will be logged at DEBUG level (see the section on logging for setting up your
application). Here's an example of setting this value inside of your application:

```python
import logging

from netapp_ontap import HostConnection, NetAppRestError, config, utils
from netapp_ontap.resources import Volume

logging.basicConfig(level=logging.DEBUG)
config.CONNECTION = HostConnection('10.100.200.50', username='admin', password='password', verify=False)

# Set the DEBUG flag to 1
utils.DEBUG = 1

# this API call will fail with a 404
try:
    volume = Volume(uuid="1", name='does_not_exist')
    volume.get()
except NetAppRestError:
    print('We got an expected exception')
```

Here is what the output would look like:

```
$ python test_debug.py
DEBUG:urllib3.util.retry:Converted retries value: 5 -> Retry(total=5, connect=None, read=None, redirect=None, status=None)
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): 10.100.200.50:443
DEBUG:urllib3.connectionpool:https://10.100.200.50:443 "GET /api/storage/volumes/1 HTTP/1.1" 404 130
DEBUG:netapp_ontap.utils:
-----------REQUEST-----------
GET https://10.100.200.50:443/api/storage/volumes/1
Accept: */*
User-Agent: python-requests/2.21.0
Connection: keep-alive
Accept-Encoding: gzip, deflate
X-Dot-Client-App: netapp-ontap-python-9.8.0
Authorization: Basic YWRtaW46cGFzc3dvcmQK
None
-----------------------------

-----------RESPONSE-----------
404 Not Found
Date:Tue, 12 Nov 2019 13:00:24 GMT
Server:libzapid-httpd
X-Content-Type-Options: nosniff
Cache-Control: no-cache,no-store,must-revalidate
Content-Length: 130
Content-Type: application/hal+json
Keep-Alive: timeout=5, max=100
Connection:Keep-Alive
{
  "error": {
    "message": "\"1\" is an invalid value for field \"uuid\" (<UUID>)",
    "code": "2",
    "target": "uuid"
  }
}
------------------------------
We got an expected exception
$
```

## LOG_ALL_API_CALLS flag

There is also a LOG_ALL_API_CALLS flag which can be set in the same ways. You can
set it in the environment or during script execution by setting `netapp_ontap.utils.LOG_ALL_API_CALLS`
to 1. This flag will produce the same output as above, but it will log the call no
matter if there was a failure or not. Here's an example of what that would look
like if we got an existing volume:

```python
import logging

from netapp_ontap import HostConnection, config, utils
from netapp_ontap.resources import Volume

logging.basicConfig(level=logging.DEBUG)
config.CONNECTION = HostConnection('10.100.200.50', username='admin', password='password', verify=False)

# Set the LOG_ALL_API_CALLS flag to 1
utils.LOG_ALL_API_CALLS = 1

# this API call will succeed and be logged
volume = list(Volume.get_collection())[0]
```

Here is what the output would look like:

```
$ python test_debug.py
DEBUG:urllib3.util.retry:Converted retries value: 5 -> Retry(total=5, connect=None, read=None, redirect=None, status=None)
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): 10.100.200.50:443
DEBUG:urllib3.connectionpool:https://10.100.200.50:443 "GET /api/storage/volumes HTTP/1.1" 200 567
DEBUG:netapp_ontap.utils:
-----------REQUEST-----------
GET https://10.100.200.50:443/api/storage/volumes
User-Agent: python-requests/2.21.0
Connection: keep-alive
Accept: */*
Accept-Encoding: gzip, deflate
X-Dot-Client-App: netapp-ontap-python-9.8.0
Authorization: Basic YWRtaW46cGFzc3dvcmQK
None
-----------------------------

-----------RESPONSE-----------
200 OK
Date:Tue, 12 Nov 2019 13:14:01 GMT
Server:libzapid-httpd
X-Content-Type-Options: nosniff
Cache-Control: no-cache,no-store,must-revalidate
Content-Length: 567
Content-Type: application/hal+json
Keep-Alive: timeout=5, max=100
Connection:Keep-Alive
{
  "records": [
    {
      "uuid": "c68bdca8-d090-11e9-bb29-005056bb7f42",
      "name": "vs0_root",
      "_links": {
        "self": {
          "href": "/api/storage/volumes/c68bdca8-d090-11e9-bb29-005056bb7f42"
        }
      }
    },
    {
      "uuid": "ed3b6ebf-d48e-11e9-bb29-005056bb7f42",
      "name": "vs1_root",
      "_links": {
        "self": {
          "href": "/api/storage/volumes/ed3b6ebf-d48e-11e9-bb29-005056bb7f42"
        }
      }
    }
  ],
  "num_records": 2,
  "_links": {
    "self": {
      "href": "/api/storage/volumes"
    }
  }
}
------------------------------
$
```

# Additional considerations

In most cases, the objects and actions in the library can be mapped directly
to equivalent cURL commands run against the ONTAP REST interface. However, there are a few
exceptions you should be aware of.

## Property names

If a property of a resource is named the same as one of the Python reserved names,
the name is transposed when accessing the member of the resource. For example,
if there is a resource named "Foo" that has a property defined in the API named "class",
the property name would instead be "class_" when using the library. For example:

```python
from netapp_ontap.resources import Foo

foo = Foo()
foo.class_ = "high"
```

## Action methods

Some resources may have additional methods aside from the generic get(), post(),
patch(), etc. These are known as "action methods" and will send requests to an
endpoint matching the same name. For example, the `netapp_ontap.resources.security_certificate.SecurityCertificate`
resource has the `netapp_ontap.resources.security_certificate.SecurityCertificate.sign()` method.
Using this method will make a POST call to /api/security/certificates/{uuid}/sign.

If a resource has a field with the same name as an action method, then the name of
the action method will be changed so as to not conflict. In the above example, if
the SecurityCertificate object had a field called `sign`, then the name of the action
method would be `sign_action()` instead.

# Documentation

To view the latest documentation, visit https://docs.netapp.com/us-en/ontap-automation/python/learn-about-pcl.html ,
and then choose the latest version of the documentation from Packages and Documentation subsection.
You can also view the ONTAP REST API docs linked from the same page.

If you want to view this library's docs offline, then you can locate the copy installed in
`<python_environment>/lib/<python_version>/site_packages/netapp_ontap/docs`.

# Compatibility

The version assigned to the library consists of the major ONTAP release it is generated
from and a minor version for the library within that release. For example: within the
ONTAP 9.7 product family, the library may ship several fix releases by incrementing the
minor index: 9.7.0, 9.7.1, 9.7.2. The minor version
allows the library to be updated at a cadence separate from ONTAP.

Client libraries that have the same major version as ONTAP are completely compatible.
For example, the libraries netapp-ontap-9.6.1 and netapp-ontap-9.6.4 are fully
compatible with both ONTAP 9.6 and ONTAP 9.6P1.

A client library will support N-1 major versions of ONTAP with full backwards compatibility
of all APIs and fields. For example, a program written using client library 9.6.1 and
talking to ONTAP 9.6 will continue to function consistently when the client library is
updated to 9.7.0.

A client library with a major version less than the ONTAP release can still be
used, however it will not be able to access any of the new REST APIs. For example, the library
netapp-ontap-9.6.4 is only partially compatible with ONTAP 9.7. In this case, the library will
not have access to the newer APIs or fields offered by ONTAP, but scripts can continue to
access any of the same 9.6 fields they were before without issue.

For example a new property **volume.is_svm_root** was added with ONTAP 9.7.
The following behaviors would be seen with different libraries and ONTAP combinations:

* library 9.6.0 would ignore the value coming from an ONTAP 9.7 response

* library 9.7.0 would fully support the property coming from an ONTAP 9.7+ response

* library 9.7.0 would not produce any errors for that property coming from an ONTAP 9.6 response

# Changelog

There are several changes to the Python Client Library and the ONTAP REST API, which are organized by release below.

## 9.18.1 library updates

**Changes to library dependencies**

The library now requires:

* Python version 3.10.0 or later
* apipkg version 3.0.2 or later

Note that due to lazy loading of submodules, "models" are no longer importable from "resources". Users will need to
explicitly import "models" from netapp_ontap.models:

```python
from netapp_ontap.resources import Account
from netapp_ontap.models AccountApplication
```

instead of:

```python
from netapp_ontap.resources import Account, AccountApplication
```

**New endpoints**

* Endpoint: /security/anti-ransomware/auto-enable  
  Object: `netapp_ontap.resources.anti_ransomware_auto_enable`  
  HTTP methods: GET, PATCH  
  This API retrives and modifies the anti-ransomware auto enablement setting.  

* Endpoint: /security/authentication/cluster/oidc  
  Object: `netapp_ontap.resources.security_oidc`  
  HTTP methods: GET, POST, PATCH, DELETE  
  This API retrives, creates, modifies and deletes the OIDC configuration in the cluster.  

* Endpoint: /security/cluster-network  
  Object: `netapp_ontap.resources.security_cluster_network`  
  HTTP methods: GET, PATCH  
  This API retrives and updates the cluster network security configuration.  

* Endpoint: /security/cluster-network/certificates  
  Object: `netapp_ontap.resources.security_cluster_network_certificates`  
  HTTP methods: GET, POST  
  This API retrives and creates certificate configuration used for cluster network security.  

* Endpoint: /security/cluster-network/certificates/{node.uuid}  
  Object: `netapp_ontap.resources.security_cluster_network_certificates`  
  HTTP methods: GET, PATCH, DELETE  
  This API retrives, updates and deletes the certificate configuration used for cluster network security for a specified node.  

* Endpoint: /security/ha-network  
  Object: `netapp_ontap.resources.security_ha_network`  
  HTTP methods: GET, PATCH  
  This API retrives and updates the HA network security configuration.  

* Endpoint: /security/login/whoami  
  Object: `netapp_ontap.resources.whoami`  
  HTTP methods: GET  
  This API retrives the username, role, and permissions information for the logged-in user.  

* Endpoint: /storage/flexcache/connection-status  
  Object: `netapp_ontap.resources.connection_status`  
  HTTP methods: GET  
  This API retrives attributes of the connection status between cache and origin volumes.  

* Endpoint: /storage/flexcache/connection-status/{node}/{svm}/{local_fg_msid}/{remote_svm_uuid}/{remote_vol_const_msid}  
  Object: `netapp_ontap.resources.connection_status`  
  HTTP methods: GET  
  This API retrives connection status between a cache and origin volume.  

* Endpoint: /dcn/security/client  
  Object: `netapp_ontap.resources.dcn_certificate`  
  HTTP methods: GET, PATCH  
  This API retrieves and updates the client certificate that ONTAP uses for communication with DCN nodes.  

* Endpoint: /dcn/security/cluster/certificate  
  Object: `netapp_ontap.resources.dcn_cluster_certificate`  
  HTTP methods: GET, PATCH  
  This API retrieves and updates the certificate that is used by the Kubernetes cluster.  

* Endpoint: /dcn/security/node/certificates  
  Object: `netapp_ontap.resources.dcn_node_certificate`  
  HTTP methods: GET  
  This API retrieves the certificate that is used by DCN nodes.  

* Endpoint: /dcn/security/node/certificates/{dcn-node-name}  
  Object: `netapp_ontap.resources.dcn_node_certificate`  
  HTTP methods: GET, PATCH  
  This API retrieves and updates the certificate that is used by a specific DCN node.  

* Endpoint: /dcn/cluster  
  Object: `netapp_ontap.resources.dcn_cluster`  
  HTTP methods: GET, POST, PATCH, DELETE  
  This API retrieves, creates, modifies and deletes the compute cluster configuration.  

* Endpoint: /dcn/cluster/nodes  
  Object: `netapp_ontap.resources.dcn_node`  
  HTTP methods: GET, POST  
  This API retrieves and creates data compute nodes.  

* Endpoint: /dcn/cluster/nodes/{uuid}  
  Object: `netapp_ontap.resources.dcn_node`  
  HTTP methods: GET, PATCH, DELETE  
  This API retrieves, modifies and deletes the compute node.  

* Endpoint: /dcn/cluster/nodes/{node.uuid}/metrics  
  Object: `netapp_ontap.resources.dcn_node_metrics`  
  HTTP methods: GET  
  This API retrieves historical performance metrics for a node.  

* Endpoint: /dcn/cluster/software/packages  
  Object: `netapp_ontap.resources.dcn_cluster_software_package`  
  HTTP methods: GET  
  This API retrieves the DCN software packages on the ONTAP cluster.  

* Endpoint: /dcn/cluster/software/packages/{uuid}  
  Object: `netapp_ontap.resources.dcn_cluster_software_package`  
  HTTP methods: GET, PATCH  
  This API retrieves and updates the DCN software package information for a specified package UUID.  

* Endpoint: /dcn/cluster/software/upload  
  Object: `netapp_ontap.resources.dcn_cluster_software_upload`  
  HTTP methods: POST  
  This API creates the DCN software package on the ONTAP cluster.  

* Endpoint: /data-engine  
  Object: `netapp_ontap.resources.data_engine`  
  HTTP methods: POST  
  This API retrieves data engine information and cluster level metrics.  

* Endpoint: /data-engine/data-sources  
  Object: `netapp_ontap.resources.data_source`  
  HTTP methods: GET  
  This API retrieves a list of data sources.  

* Endpoint: /data-engine/data-sources/{uuid}  
  Object: `netapp_ontap.resources.data_source`  
  HTTP methods: GET  
  This API retrieves a data source by UUID.  

* Endpoint: /data-engine/events  
  Object: `netapp_ontap.resources.data_engine_event`  
  HTTP methods: GET  
  This API retrieves a list of data engine events.  

* Endpoint: /data-engine/events/{uuid}  
  Object: `netapp_ontap.resources.data_engine_event`  
  HTTP methods: GET  
  This API retrieves the details of a specific data engine event.  

* Endpoint: /data-engine/governance/aggregation  
  Object: `netapp_ontap.resources.governance_aggregations`  
  HTTP methods: GET  
  This API retrieves aggregation data across all workspaces.  

* Endpoint: /data-engine/governance/aggregation/workspaces  
  Object: `netapp_ontap.resources.governance_workspace_aggregations`  
  HTTP methods: GET  
  This API retrieves aggregation data for workspaces.  

* Endpoint: /data-engine/governance/aggregation/workspaces/{uuid}  
  Object: `netapp_ontap.resources.governance_workspace_aggregations`  
  HTTP methods: GET  
  This API retrieves aggregation data for a specific workspace.  

* Endpoint: /data-engine/governance/audit/data-collections/{workspace.uuid}/{data_collection.uuid}  
  Object: `netapp_ontap.resources.data_engine_governance_audit_datacollection_count`  
  HTTP methods: GET  
  This API retrieves the governance audit impacted files count for a data collection.  

* Endpoint: /data-engine/governance/audit/files  
  Object: `nnetapp_ontap.resources.data_engine_governance_audit_impacted_files`  
  HTTP methods: GET  
  This API retrieves governance audit information for impacted files associated with a specific guardrail policy within a workspace.  

* Endpoint: /data-engine/governance/audit/policies/{workspace.uuid}/{guardrail_policy.uuid}  
  Object: `netapp_ontap.resources.data_engine_governance_audit_count`  
  HTTP methods: GET  
  This API retrieves the governance audit impacted files count.  

* Endpoint: /data-engine/governance/file-preview/file-content  
  Object: `netapp_ontap.resources.data_engine_governance_file_preview_file_content_request`  
  HTTP methods: POST  
  This API retrieves the anonymized content of a file.  

* Endpoint: /data-engine/governance/file-preview/jobs  
  Object: `netapp_ontap.resources.data_engine_governance_file_preview_job`  
  HTTP methods: POST  
  This API creates a job for retrieving file information.  

* Endpoint: /data-engine/governance/file-preview/jobs/{uuid}  
  Object: `netapp_ontap.resources.data_engine_governance_file_preview_job`  
  HTTP methods: GET  
  This API retrieves information about a file preview job by its UUID.  

* Endpoint: /data-engine/governance/policies/classification/categories  
  Object: `netapp_ontap.resources.data_engine_governance_policies_classification_category`  
  HTTP methods: GET, POST  
  This API retrieves and creates classification categories.  

* Endpoint: /data-engine/governance/policies/classification/categories/{uuid}  
  Object: `netapp_ontap.resources.data_engine_governance_policies_classification_category`  
  HTTP methods: GET, PATCH, DELETE  
  This API retrieves, creates and deletes the specified category.  

* Endpoint: /data-engine/governance/policies/classification/classifiers  
  Object: `netapp_ontap.resources.data_engine_governance_policies_classification_classifier`  
  HTTP methods: GET  
  This API retrieves a list of classifiers.  

* Endpoint: /data-engine/governance/policies/classification/classifiers/{uuid}  
  Object: `netapp_ontap.resources.data_engine_governance_policies_classification_classifier`  
  HTTP methods: GET, PATCH  
  This API retrieves and updates the specified classifier.  

* Endpoint: /data-engine/governance/policies/guardrails  
  Object: `netapp_ontap.resources.data_engine_governance_policies_guardrail`  
  HTTP methods: GET, POST  
  This API retrieves and creates guardrails.  

* Endpoint: /data-engine/governance/policies/guardrails/{uuid}  
  Object: `netapp_ontap.resources.data_engine_governance_policies_guardrail`  
  HTTP methods: GET, PATCH, DELETE  
  This API retrieves, updates and deletes the specified guardrail.  

* Endpoint: /data-engine/jobs  
  Object: `netapp_ontap.resources.data_engine_job`  
  HTTP methods: GET  
  This API retrieves a list of DCN jobs.  

* Endpoint: /data-engine/jobs/{uuid}  
  Object: `netapp_ontap.resources.data_engine_job`  
  HTTP methods: GET  
  This API retrieves a specified DCN job.  

* Endpoint: /data-engine/policies  
  Object: `netapp_ontap.resources.data_engine_policy`  
  HTTP methods: GET, POST  
  This API retrieves and creates data engine policies.  

* Endpoint: /data-engine/policies/{uuid}  
  Object: `netapp_ontap.resources.data_engine_policy`  
  HTTP methods: GET, PATCH  
  This API retrieves and updates a specified data engine policy.  

* Endpoint: /data-engine/policies/{data_engine_policy.uuid}/versions  
  Object: `netapp_ontap.resources.data_engine_policy_version`  
  HTTP methods: GET, PATCH  
  This API retrieves all the versions of the specified data engine policy.  

* Endpoint: /data-engine/policies/{data_engine_policy.uuid}/versions/{uuid}  
  Object: `netapp_ontap.resources.data_engine_policy_version`  
  HTTP methods: GET, PATCH  
  This API retrieves and updates the details of the specified version of the data engine policy.  

* Endpoint: /data-engine/workspaces  
  Object: `netapp_ontap.resources.workspace`  
  HTTP methods: GET, POST  
  This API retrieves and creates workspaces.  

* Endpoint: /data-engine/workspaces/{uuid}  
  Object: `netapp_ontap.resources.workspace`  
  HTTP methods: GET, PATCH, DELETE  
  This API retrieves, modifies and deletes a workspace.  

* Endpoint: /data-engine/workspaces/{workspace.uuid}/acls  
  Object: `netapp_ontap.resources.data_engine_acl`  
  HTTP methods: GET, POST  
  This API retrieves and creates ACLs for the workspace.  

* Endpoint: /data-engine/workspaces/{workspace.uuid}/acls/{user_or_group.name}  
  Object: `netapp_ontap.resources.data_engine_acl`  
  HTTP methods: GET, DELETE  
  This API retrieves and deletes the ACL for the workspace.  

* Endpoint: /data-engine/workspaces/{workspace.uuid}/data-collections/  
  Object: `netapp_ontap.resources.datacollection`  
  HTTP methods: GET, POST  
  This API retrieves and creates data collections in a workspace.  

* Endpoint: /data-engine/workspaces/{workspace.uuid}/data-collections/{uuid}  
  Object: `netapp_ontap.resources.datacollection`  
  HTTP methods: GET, PATCH, DELETE  
  This API retrieves, modifies and deletes a data collection in a workspace.  

* Endpoint: /data-engine/workspaces/{workspace.uuid}/data-collections/{datacollection.uuid}/acls  
  Object: `netapp_ontap.resources.data_engine_datacollection_acl`  
  HTTP methods: GET, POST  
  This API retrieves and creates ACLs for the data collection.  

* Endpoint: /data-engine/workspaces/{workspace.uuid}/data-collections/{datacollection.uuid}/acls/{user_or_group.name}  
  Object: `netapp_ontap.resources.data_engine_datacollection_acl`  
  HTTP methods: GET, DELETE  
  This API retrieves and deletes an ACL for the data collection.  

* Endpoint: /data-engine/workspaces/{workspace.uuid}/data-collections/{datacollection.uuid}/entities  
  Object: `netapp_ontap.resources.datacollection_entity`  
  HTTP methods: GET, POST  
  This API retrieves and creates entities in a data collection.  

* Endpoint: /data-engine/workspaces/{workspace.uuid}/data-collections/{datacollection.uuid}/entities/{uuid}  
  Object: `netapp_ontap.resources.datacollection_entity`  
  HTTP methods: GET, DELETE  
  This API retrieves and deletes an entity in a data collection.  

* Endpoint: /data-engine/workspaces/{workspace.uuid}/data-collections/{datacollection.uuid}/search  
  Object: `netapp_ontap.resources.datacollection_search_data`  
  HTTP methods: GET  
  This API performs a similarity search of the given prompt against the entities in a data collection.  

* Endpoint: /data-engine/workspaces/{workspace.uuid}/data-collections/{datacollection.uuid}/versions  
  Object: `netapp_ontap.resources.datacollection_version`  
  HTTP methods: GET  
  This API retrieves all versions of a data collection in a workspace.  

* Endpoint: /data-engine/workspaces/{workspace.uuid}/data-collections/{datacollection.uuid}/versions/{uuid}  
  Object: `netapp_ontap.resources.datacollection_version`  
  HTTP methods: GET  
  This API retrieves a data collection version in a workspace.  

* Endpoint: /data-engine/workspaces/{workspace.uuid}/data-collections/{datacollection.uuid}/versions/{datacollection_version.uuid}/diffs  
  Object: `netapp_ontap.resources.datacollection_version_diff`  
  HTTP methods: GET, POST  
  This API retrieves and creates data collection version diff in a workspace.  

* Endpoint: /data-engine/workspaces/{workspace.uuid}/data-sources  
  Object: `netapp_ontap.resources.workspace_data_source`  
  HTTP methods: GET, POST  
  This API retrieves and creates data sources in a workspace.  

* Endpoint: /data-engine/workspaces/{workspace.uuid}/data-sources/{uuid}  
  Object: `netapp_ontap.resources.workspace_data_source`  
  HTTP methods: GET, DELETE  
  This API retrieves and deletes a data source in a workspace.  

* Endpoint: /data-engine/workspaces/{workspace.uuid}/entities  
  Object: `netapp_ontap.resources.data_engine_entity`  
  HTTP methods: GET  
  This API retrieves a list of entities within a workspace.  

* Endpoint: /data-engine/workspaces/{workspace.uuid}/entities/{uuid}  
  Object: `netapp_ontap.resources.data_engine_entity`  
  HTTP methods: GET  
  This API retrieves an entities within a workspace.  

* Endpoint: /data-engine/workspaces/{workspace.uuid}/entities/{data_engine_entity.uuid}/custom-attributes  
  Object: `netapp_ontap.resources.data_engine_entity_custom_attribute`  
  HTTP methods: GET, POST  
  This API retrieves and creates custom attributes of an entity in a workspace.  

* Endpoint: /data-engine/workspaces/{workspace.uuid}/entities/{data_engine_entity.uuid}/custom-attributes/{key}  
  Object: `netapp_ontap.resources.data_engine_entity_custom_attribute`  
  HTTP methods: GET, DELETE  
  This API retrieves and deletes a custom attribute of an entity in a workspace.  

* Endpoint: /data-engine/workspaces/{workspace.uuid}/queries  
  Object: `netapp_ontap.resources.workspace_query`  
  HTTP methods: GET, POST  
  This API retrieves and creates queries in a workspace.  

* Endpoint: /data-engine/workspaces/{workspace.uuid}/queries/{uuid}  
  Object: `netapp_ontap.resources.workspace_query`  
  HTTP methods: GET, PATCH, DELETE  
  This API retrieves, modifies and deletes a query in a workspace.  

* Endpoint: /data-engine/workspaces/{workspace.uuid}/queries/{workspace_query.uuid}/entities  
  Object: `netapp_ontap.resources.workspace_query_entity`  
  HTTP methods: GET  
  This API retrieves entities from the workspace that match the specified query criteria.  

* Endpoint: /data-engine/workspaces/{workspace.uuid}/versions 
  Object: `netapp_ontap.resources.workspace_version`  
  HTTP methods: GET  
  This API retrieves a list of workspace versions.  

* Endpoint: /data-engine/workspaces/{workspace.uuid}/versions/{uuid} 
  Object: `netapp_ontap.resources.workspace_version`  
  HTTP methods: GET  
  This API retrieves a workspace version.  

* Endpoint: /data-engine/workspaces/{workspace.uuid}/versions/{workspace_version.uuid}/diffs 
  Object: `netapp_ontap.resources.workspace_version_diff`  
  HTTP methods: GET, POST  
  This API retrieves and creates workspace version.  

## 9.17.1 library updates

**Changes to library dependencies**

The library now requires:

* marshmallow version later than 3.21.3 but earlier than 4.0.0

**New endpoints**

* Endpoint: /cluster/mediator-ping  
  Object: `netapp_ontap.resources.cluster.Cluster`  
  HTTP methods: POST  
  This API pings BlueXP cloud service.

* Endpoint: /cluster/mediators/{uuid}  
  Object: `netapp_ontap.resources.mediator.Mediator`  
  HTTP methods: PATCH  
  This API modifies mediator configurations based on their uuid.

* Endpoint: /protocols/nvme/subsystems/{subsystem.uuid}/hosts/{nqn}  
  Object: `netapp_ontap.resources.nvme_subsystem_host.NvmeSubsystemHost`  
  HTTP methods: PATCH  
  This API updates an NVMe subsystem host based on their uuid.

* Endpoint: /application/containers  
  Object: `netapp_ontap.resources.container.Container`  
  HTTP methods: POST  
  This API creates application containers.

* Endpoint: /security/anti-ransomware/storage-unit/entropy-stats  
  Object: `netapp_ontap.resources.storage_unit_anti_ransomware_entropy_stats.StorageUnitAntiRansomwareEntropyStats`  
  HTTP methods: GET  
  This API retrieves the data-entropy statistics for the storage units.

* Endpoint: /security/anti-ransomware/storage-unit/entropy-stats/{storage_unit.uuid}/{entropy_stats_type}/{timestamp}  
  Object: `netapp_ontap.resources.storage_unit_anti_ransomware_entropy_stats.StorageUnitAntiRansomwareEntropyStats`  
  HTTP methods: GET  
  This API retrieves a data-entropy statistic for the storage unit.

* Endpoint: /security/anti-ransomware/storage-unit/suspects  
  Object: `netapp_ontap.resources.storage_unit_anti_ransomware_suspect.StorageUnitAntiRansomwareSuspect`  
  HTTP methods: GET  
  This API retrieves information about the storage units on which a ransomware attack is detected.

* Endpoint: /security/anti-ransomware/storage-unit/suspects/{storage_unit.uuid}  
  Object: `netapp_ontap.resources.storage_unit_anti_ransomware_suspect.StorageUnitAntiRansomwareSuspect`  
  HTTP methods: GET, DELETE  
  This API retrieves and clears the ransomware attack detected on a storage unit specified by the UUID.

* Endpoint: /security/anti-ransomware/volume/entropy-stats  
  Object: `netapp_ontap.resources.anti_ransomware_volume_entropy_stats.AntiRansomwareVolumeEntropyStats`  
  HTTP methods: GET  
  This API retrieves the data-entropy statistics for the volumes.

* Endpoint: /security/anti-ransomware/volume/entropy-stats/{volume.uuid}/{entropy_stats_type}/{timestamp}  
  Object: `netapp_ontap.resources.anti_ransomware_volume_entropy_stats.AntiRansomwareVolumeEntropyStats`  
  HTTP methods: GET  
  This API retrieves a data-entropy statistic for the volumes.

* Endpoint: /security/authentication/cluster/saml-sp/default-metadata  
  Object: `netapp_ontap.resources.security_saml_def_metadata.SecuritySamlDefMetadata`  
  HTTP methods: GET, POST, DELETE  
  This API retrieves, creates and deletes the SAML default metadata configuration.

* Endpoint: /security/barbican-kms  
  Object: `netapp_ontap.resources.barbican.Barbican`  
  HTTP methods: GET, POST  
  This API retrieves and creates a Barbican KMS configuration for the SVM.

* Endpoint: /security/barbican-kms/{uuid}  
  Object: `netapp_ontap.resources.barbican.Barbican`  
  HTTP methods: GET, PATCH  
  This API retrieves and updates the Barbican KMS configuration for the SVM specified by the UUID.

* Endpoint: /security/barbican-kms/{uuid}/rekey-internal  
  Object: `netapp_ontap.resources.barbican.Barbican`  
  HTTP methods: POST  
  This API rekeys the internal key in the key hierarchy for an SVM with a Barbican KMS configuration.

* Endpoint: /security/barbican-kms/{uuid}/restore 
  Object: `netapp_ontap.resources.barbican.Barbican`  
  HTTP methods: POST  
  This API restores the keys for an SVM from a configured Barbican KMS.

* Endpoint: /security/jit-privilege-users  
  Object: `netapp_ontap.resources.security_jit_privilege_user.SecurityJitPrivilegeUser`  
  HTTP methods: GET, POST  
  This API retrieves and creates the JIT privilege user configurations for an SVM.

* Endpoint: /security/jit-privilege-users/{owner.uuid}/{account.name}/{application}  
  Object: `netapp_ontap.resources.security_jit_privilege_user.SecurityJitPrivilegeUser`  
  HTTP methods: GET, DELETE  
  This API retrieves and deletes the JIT privilege user configurations for an SVM.

* Endpoint: /security/jit-privileges  
  Object: `netapp_ontap.resources.security_jit_privilege.SecurityJitPrivilege`  
  HTTP methods: GET  
  This API retrieves global JIT privilege configurations on an SVM.

* Endpoint: /security/jit-privileges/{owner.uuid}/{application}  
  Object: `netapp_ontap.resources.security_jit_privilege.SecurityJitPrivilege`  
  HTTP methods: GET, PATCH  
  This API retrieves and modifies the JIT privilege configurations for an SVM.

## 9.16.1 library updates

**Changes to library dependencies**

The library now requires:

* Python 3.10 or later
* requests 2.32.2 or later due to [CVE-2024-35195](https://nvd.nist.gov/vuln/detail/CVE-2024-35195)
* requests-toolbelt 1.0.0 or later
* marshmallow 3.21.3 or later

Other dependency highlights:

* urllib3 2.2.3 or later is recommended (but not required) due to [CVE-2024-37891](https://nvd.nist.gov/vuln/detail/CVE-2024-37891)
* certifi 2024.8.30 or later is recommended due to [CVE-2023-37920](https://nvd.nist.gov/vuln/detail/CVE-2023-37920)

**New endpoints**

* Endpoint: /storage/storage-units  
  Object: `netapp_ontap.resources.storage_unit.StorageUnit`  
  HTTP methods: GET, POST  
  This API retrieves and creates storage-units.

* Endpoint: /storage/storage-units/{uuid}  
  Object: `netapp_ontap.resources.storage_unit.StorageUnit`  
  HTTP methods: GET, PATCH  
  This API retrieves and modifies individual storage-units based on their uuid.

* Endpoint: /storage/storage-units/{storage_unit.uuid}/snapshots  
  Object: `netapp_ontap.resources.storage_unit_snapshot.StorageUnitSnapshot`  
  HTTP methods: GET, POST  
  This API retrieves and creates storage-unit snapshots with the specified storage-unit uuid.

* Endpoint: /storage/storage-units/{storage_unit.uuid}/snapshots/{uuid}  
  Object: `netapp_ontap.resources.storage_unit_snapshot.StorageUnitSnapshot`  
  HTTP methods: GET, PATCH, DELETE  
  This API retrieves, modifies, and deletes a storage-unit snapshot with the specified storage-unit uuid.

* Endpoint: /security/anti-rans