-
Notifications
You must be signed in to change notification settings - Fork 0
/
PKG-INFO
1901 lines (1428 loc) · 91 KB
/
PKG-INFO
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
Metadata-Version: 2.1
Name: netapp_ontap
Version: 9.14.1.0
Summary: A library for working with ONTAP's REST APIs simply in Python
Home-page: https://devnet.netapp.com/restapi.php
Author: NetApp
Author-email: [email protected]
License: UNKNOWN
Project-URL: Documentation, https://library.netapp.com/ecmdocs/ECMLP2886776/html/index.html
Description:
# 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.6 or later
* requests 2.26.0 or later
* requests-toolbelt 0.9.1 or later
* marshmallow 3.2.1 or later
The library requires version 1.26.7 or later of urllib3 due to outstanding CVEs against
older versions. It also requires version 2022.12.7 of certifi due to a CVE that removed
root certificates from TrustCor 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:
```
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.
* Use the connection object as a context manager with the **with** keyword. Note: This method
is not recommended if you are using mutiple threads connecting to different hosts. This [issue](https://community.netapp.com/t5/ONTAP-Rest-API-Discussions/Python-with-context-manager-and-rest-apis-multi-threading/m-p/442026/highlight/true#M468)
is currently being worked on and should be fixed in future releases.
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 continute 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/certitficates/{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://devnet.netapp.com/restapi.php , click on the
"Python Client Library" tab, and then choose the latest version of the docs. You can also view
the ONTAP REST API docs linked from the same page under the "Overview" tab.
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 compatiblity
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.14.1 library updates
**New `netapp_ontap` release cycle**
Starting with 9.14.1, the Python Client Library (`netapp_ontap`) will have one release for each ONTAP release cycle
(aligned with the ONTAP RC release). We will no longer have an RC and GA release for the library.
**Resource properties can now be set to `None`**
Some ONTAP REST endpoints accept null values in the request body, however, the Python library did not support this.
Starting in 9.14.1 the Python client library will allow users to set resource properties to `None` and will include
these values as null in the request body. Here is an example:
```python
# Get an existing rule
rule = S3BucketLifecycleRule("53714b3a-cd85-11ed-8980-005056aca578","b51ed46b-cff7-11ed-8980-005056aca578")
rule.name = "my_rule"
rule.get()
# set the expiration to None
rule.expiration = None
# patch the rule
rule.patch(hydrate=True)
```
Here is the resulting body of the request:
```json
{"expiration" : null}
```
**Resources can be more quickly retrieved using `fast_get_collection()`**
`fast_get_collection()` is the quicker version of `get_collection()` that will fetch all records
in the form of a RawResource type. It returns a generator that yields `netapp_ontap.raw_resource.RawResource` objects containing
information about the resource as a dictionary. `netapp_ontap.raw_resource.RawResource` objects do not support, `get()`, `post()`,
`patch()`, or `delete()`, but they can be converted to the appropriate resource type using
`netapp_ontap.raw_resource.RawResource.promote`. `netapp_ontap.raw_resource.RawResource` objects should be treated as read-only.
`fast_get_collection()` is significantly more efficient when there are many records in the response
because it skips deserializing and validating the resource until the user explicitly
asks by using `promote()`.
Here is an example:
```python
# Get all the volumes quickly
my_volumes = list(Volume.fast_get_collection())
deleted_volumes = []
for record in my_volumes:
# Get the current volume name and state
volume_name = record.name
volume_state = record.state
# Delete the volume if the name starts with "test_" OR if the volume is offline
if volume_name.startswith("test_") or volume_state == "offline":
# generate the resource object from this RawResource
volume = record.promote()
volume.delete()
deleted_volumes.append(volume_name)
print(f"The following {len(deleted_volumes)} volumes were deleted:")
print("\n".join(deleted_volumes))
```
**New endpoints**
* Endpoint: /name-services/cache/host/settings/{uuid}
HTTP methods: GET, PATCH
This API retrieves and updates a host cache setting for a given SVM.
* Endpoint: /network/fc/interfaces/{fc_interface.uuid}/metrics
HTTP methods: GET
This API retrieves historical performance metrics for a Fibre Channel interface.
* Endpoint: /network/fc/interfaces/{fc_interface.uuid}/metrics/{timestamp}
HTTP methods: GET
This API retrieves historical performance metrics for a Fibre Channel interface for a specific time.
* Endpoint: /network/fc/ports/{fc_port.uuid}/metrics
HTTP methods: GET
This API retrieves historical performance metrics for a Fibre Channel port.
* Endpoint: /network/fc/ports/{fc_port.uuid}/metrics/{timestamp}
HTTP methods: GET
This API retrieves historical performance metrics for a Fibre Channel port for a specific time.
* Endpoint: /network/fc/ports/{fc_port.uuid}/metrics/{timestamp}
HTTP methods: GET
This API retrieves historical performance metrics for a Fibre Channel port for a specific time.
* Endpoint: /protocols/fpolicy/{svm.uuid}/persistent-stores
HTTP methods: GET, POST
This API retrieves, and creates FPolicy persistent store configurations.
* Endpoint: /protocols/fpolicy/{svm.uuid}/persistent-stores/{name}
HTTP methods: GET, PATCH, DELETE
This API retrieves, updates, and deletes a FPolicy persistent store configurations with the specified name.
* Endpoint: /protocols/nvme/services/{svm.uuid}/metrics/{timestamp}
HTTP methods: GET
This API retrieves historical performance metrics for the NVMe protocol service of an SVM for a specific time.
* Endpoint: /protocols/san/fcp/services/{svm.uuid}/metrics/{timestamp}
HTTP methods: GET
This API retrieves historical performance metrics for the FC Protocol service of an SVM for a specific time.
* Endpoint: /protocols/san/initiators
HTTP methods: GET
This API retrieves SAN initiators.
* Endpoint: /protocols/san/initiators/{svm.uuid}/{name}
HTTP methods: GET
This API retrieves a SAN initiator using it's name and SVM uuid.
* Endpoint: /protocols/san/initiators/{svm.uuid}/{name}
HTTP methods: GET
This API retrieves a SAN initiator using it's name and SVM uuid.
* Endpoint: /protocols/san/iscsi/services/{svm.uuid}/metrics/{timestamp}
HTTP methods: GET
This API retrieves historical performance metrics for the iSCSI protocol service of an SVM for a specific time.
* Endpoint: /storage/luns/{lun.uuid}/metrics
HTTP methods: GET
This API retrieves historical performance metrics for a LUN.
* Endpoint: /storage/luns/{lun.uuid}/metrics/{timestamp}
HTTP methods: GET
This API retrieves historical performance metrics for a LUN for a specific time.
* Endpoint: /storage/namespaces/{nvme_namespace.uuid}/metrics
HTTP methods: GET
This API retrieves historical performance metrics for an NVMe namespace.
* Endpoint: /storage/namespaces/{nvme_namespace.uuid}/metrics/{timestamp}
HTTP methods: GET
This API retrieves historical performance metrics for a NVMe namespace for a specific time.
* Endpoint: /security/authentication/cluster/oauth2
HTTP methods: GET, PATCH
This API retrieves and updates the OAuth 2.0 status.
* Endpoint: /security/authentication/cluster/oauth2/clients
HTTP methods: GET, POST
This API retrieves and creates OAuth 2.0 configurations.
* Endpoint: /security/authentication/cluster/oauth2/clients/{name}
HTTP methods: GET, DELETE
This API retrieves and deletes OAuth 2.0 configurations with the specified name.
* Endpoint: /security/authentication/duo/groups
HTTP methods: GET, POST
This API retrieves and creates Duo groups.
* Endpoint: /security/authentication/duo/groups/{owner.uuid}/{name}
HTTP methods: GET, PATCH, DELETE
This API retrieves, updates, and deletes a Duo group based on the owner id and group name.
* Endpoint: /security/authentication/duo/profiles
HTTP methods: GET, POST
This API retrieves and creates Duo profile.
* Endpoint: /security/authentication/duo/profiles/{owner.uuid}
HTTP methods: GET, PATCH, DELETE
This API retrieves, updates, and deletes a Duo profule based on the owner id.
* Endpoint: /security/key-stores/{uuid}
HTTP methods: GET, PATCH, DELETE
This API retrieves, updates, and deletes the keystore configuration with the specified uuid.
* Endpoint: /storage/qos/qos-options
HTTP methods: GET, PATCH
This API retrieves, and updates QoS options.
* Endpoint: /support/autosupport/messages/{node.uuid}/{index}/{destination}
HTTP methods: GET
This API retrieves information about a single Autosupport message.
## 9.13.1 library updates
**New endpoints**
* Endpoint: /resource-tags
HTTP methods: GET
This API retrieves the tags currently being used for resources in the API.
* Endpoint: /resource-tags/{value}
HTTP methods: GET
This API retrieves a specific resource tag.
* Endpoint: /resource-tags/{resource_tag.value}/resources
HTTP methods: GET, POST
These APIs can be used to retrieve the resources for a specific tag or create a new tag on a specific resource.
* Endpoint: /resource-tags/{resource_tag.value}/resources/{href}
HTTP methods: GET, DELETE
These APIs can be used to retrieve or delete a specific resource for a specific tag.
* Endpoint: /application/consistency-groups/{consistency_group.uuid}/metrics
HTTP methods: GET
This API retrieves historical performance and capacity metrics for a consistency group.
* Endpoint: /support/ems/role-configs
HTTP methods: GET, POST
These APIs can be used to retrieve a collection of the EMS role-based configurations or create an EMS role-based configuration for an access control role.
* Endpoint: /support/ems/role-configs/{access_control_reol.name}
HTTP methods: GET, PATCH, DELETE
These APIs can be used to retrieve, update, or delete the EMS role-based configuration of the access control role.
* Endpoint: /security/key-managers/{security_key_manager.uuid}/restore
HTTP methods: POST
This API retrieves and restores any current unrestored keys (associated with the storage controller) from the specified key management server.
* Endpoint: /security/login/totps
HTTP methods: GET, POST
These APIs can be used to retrieve and create the TOTP profiles configured for user accounts.
* Endpoint: /security/login/totps/{owner.uuid}/{account.name}
HTTP methods: GET, PATCH, DELETE
These APIs can be used to retrieve, update, or delete the TOTP profile configured for a user account.
* Endpoint: /protocols/s3/services/{svm.uuid}/buckets/{s3_bucket.uuid}/rules
HTTP methods: GET, POST
These APIs can be used to retrieve all S3 Lifecycle rules associated with a bucket or create the S3 bucket lifecycle rule configuration.
* Endpoint: /protocols/s3/services/{svm.uuid}/buckets/{s3_bucket.uuid}/rules/{name}
HTTP methods: GET, PATCH, DELETE
These APIs can be used to retrieve, update, or delete the S3 bucket lifecycle rule configuration.
## 9.12.1 library updates
**New endpoints**
* Endpoint: /application/consistency-groups/{consistency_group.uuid}/snapshots/{uuid}
HTTP methods: PATCH
This API completes a Snapshot copy operation of a consistency group.
* Endpoint: /security/aws-kms
HTTP methods: GET, POST, PATCH, DELETE
These APIs allow ONTAP to securely store its encryption keys using AWS KMS. They allow for configuring, updating, and deleting AWS KMS configurations.
* Endpoint: /security/aws-kms/{aws_kms.uuid}/rekey-external
HTTP methods: POST
This API rekeys or re-versions the AWS KMS Key Encryption Key (KEK) for the given AWS KMS.
* Endpoint: /security/aws-kms/{aws_kms.uuid}/rekey-internal
HTTP methods: POST
This API rekeys SVM KEK for the given AWS KMS.
* Endpoint: /security/aws-kms/{aws_kms.uuid}/restore
HTTP methods: POST
This API restores the keys for an SVM from a configured AWS KMS.
* Endpoint: /security/key-managers/{security_key_manager.uuid}/auth-keys
HTTP methods: GET, POST, DELETE
These APIs allow for managing authentication keys.
* Endpoint: /storage/file/moves/{node.uuid}/{uuid}/{index}
HTTP methods: GET
This API retrieves the status of an on-going file move operation.
* Endpoint: /protocols/active-directory
HTTP methods: GET, POST
These APIs can be used to display Active Directory account-related information of all SVMs or create a new Active Directory account.
* Endpoint: /protocols/active-directory/{svm.uuid}
HTTP methods: GET, PATCH, DELETE
This API displays, modified, or deletes an Active Directory Account for the specified SVM.
* Endpoint: /protocols/active-directory/{svm.uuid}/preferred-domain-controllers
HTTP methods: GET, POST, DELETE
These APIs can be used to display or create the preferred domain controller configuration of an SVM.
* Endpoint: /protocols/active-directory/{svm.uuid}/preferred-domain-controllers/{fqdn}/{server_ip}
HTTP methods: GET, DELETE
These APIs retrieve and delete the Active Directory preferred DC configuration of the specified SVM and domain.
* Endpoint: /protocols/cifs/group-policies
HTTP methods: GET, PATCH
These APIs retrieve group policy objects that are yet to be applied. You can also use it to create a background task to update the GPO settings for a specific SVM.
* Endpoint: /protocols/cifs/group-policies/{svm.uuid}/central-access-policies
HTTP methods: GET
This API retrieves applied central access policies for the specified SVM.
* Endpoint: /protocols/cifs/group-policies/{svm.uuid}/central-access-policies/{name}
HTTP methods: GET
This API retrieves an applied central access policy for the specified SVM.
* Endpoint: /protocols/cifs/group-policies/{svm.uuid}/central-access-rules
HTTP methods: GET
This API retrieves applied central access rules for specified SVM.
* Endpoint: /protocols/cifs/group-policies/{svm.uuid}/central-access-rules/{name}
HTTP methods: GET
This API retrieves an applied central access rule for specified SVM.
* Endpoint: /protocols/cifs/group-policies/{svm.uuid}/objects
HTTP methods: GET
This API retrieves applied group policy objects for specified SVM.
* Endpoint: /protocols/cifs/group-policies/{svm.uuid}/restricted-groups
HTTP methods: GET
This API retrieves applied policies of restricted groups for specified SVM.
* Endpoint: /protocols/cifs/group-policies/{svm.uuid}/restricted-groups/{policy_index}/{group_name}
HTTP methods: GET
This API retrieves an applied policy of a restricted group for specified SVM.
* Endpoint: /protocols/nfs/connected-client-settings
HTTP methods: GET, PATCH
These APIs allow for retrieving and modifying properties of the NFS connected-client cache settings.
**Fixed issues**
* [Bug ID 1506171](https://mysupport.netapp.com/site/bugs-online/product/ONTAP/BURT/1506171)
When calling post_collection on a resource, the library was not resetting the connection resulting in a no connection error.
* [Bug ID 1504927](https://mysupport.netapp.com/site/bugs-online/product/ONTAP/BURT/1504927)
The library was not polling on a job when a next link was returned in the response.
## 9.11.1 library updates
**New endpoints**
* Endpoint: /cluster/counter/tables
HTTP methods: GET
This API returns a collection of counter tables and their schema definitions.
* Endpoint: /cluster/counter/tables/{name}
HTTP methods: GET
This API returns the information about a single counter table.
* Endpoint: /cluster/counter/tables/{counter_table.name}/rows
HTTP methods: GET
This API returns a collection of counter rows.
* Endpoint: /cluster/counter/tables/{counter_table.name}/rows/{id}
HTTP methods: GET
This API returns a single counter rows.
* Endpoint: /cluster/metrocluster/svms
HTTP methods: GET
This API retrieves configuration information for all pairs of SVMs in MetroCluster.
* Endpoint: /cluster/metrocluster/svms/{cluster.uuid}/{svm.uuid}
HTTP methods: GET
This API retrieves configuration information for an SVM in a MetroCluster relationship.
* Endpoint: /cluster/sensors
HTTP methods: GET
This API retrieves environment sensors
* Endpoint: /cluster/sensors/{node.uuid}/{index}
HTTP methods: GET
This API retrieves environment sensors.
* Endpoint: /network/ethernet/switches
HTTP methods: POST, DELETE
This API can be used to get information about the Ethernet switches used for cluster and/or storage networks.
* Endpoint: /network/fc/fabrics
HTTP methods: GET
The Fibre Channel (FC) fabric REST APIs provide read-only access to FC network information. This includes connections between the ONTAP cluster and the FC fabric, the switches that comprise the fabric, and the zones of the active zoneset of the fabric.
* Endpoint: /network/ip/subnets
HTTP methods: GET, POST, PATCH, DELETE
This API manages IP subnets in the cluster.
* Endpoint: /svm/svms/{svm.uuid}/top-metrics/clients
HTTP methods: GET
This API retrieves a list of clients with the most IO activity for FlexVol and FlexGroup volumes belonging to a specified SVM.
* Endpoint: /svm/svms/{svm.uuid}/top-metrics/files
HTTP methods: GET
This API retrieves a list of files with the most IO activity for FlexVol and FlexGroup volumes belonging to a specified SVM.
* Endpoint: /svm/svms/{svm.uuid}/top-metrics/users
HTTP methods: GET
This API retrieves a list of users with the most IO activity for FlexVol and FlexGroup volumes belonging to a specified SVM.
* Endpoint: /name-services/cache/group-membership/settings
HTTP methods: GET, PATCH
This API is used to retrieve and manage group-membership cache settings.
* Endpoint: /name-services/cache/host/settings
HTTP methods: GET, PATCH
This API is used to retrieve and manage hosts cache settings.
* Endpoint: /name-services/cache/netgroup/settings
HTTP methods: GET, PATCH
This API is used to retrieve and manage netgroups cache settings.
* Endpoint: /name-services/cache/setting
HTTP methods: GET, PATCH
This API is used to retrieve and manage global nameservice cache settings.
* Endpoint: /name-services/cache/unix-group/settings
HTTP methods: GET, PATCH
This API is used to retrieve and manage unix-group settings.
* Endpoint: /name-services/cache/unix-user/settings
HTTP methods: GET, PATCH
This API is used to retrieve and manage unix-user settings.
* Endpoint: /name-services/ldap-schemas
HTTP methods: GET, POST, PATCH, DELETE
This API manages LDAP schemas.
* Endpoint: /name-services/netgroup-files/{svm.uuid}
HTTP methods: GET, PATCH
This API displays the netgroup file details or raw netgroup file of an SVM.
* Endpoint: /support/ems/application-logs
HTTP methods: POST
This API generates creates an app.log.* event.
* Endpoint: /security/azure-key-vaults/{azure_key_value.uuid}/rekey-external
HTTP methods: POST
This API rekeys the external key in the key hierarchy for an SVM with an AKV configuration.
* Endpoint: /security/gcp-kms/{gcp_kms.uuid}/rekey-external
HTTP methods: POST
This API rekeys the external key in the key hierarchy for an SVM with a Google Cloud KMS configuration.
* Endpoint: /security/key-managers/{security_key_manager.uuid}/keys/{node.uuid}/key-ids
HTTP methods: GET
This API retrieves the key manager keys on the give node.
* Endpoint: /security/multi-admin-verify
HTTP methdos: GET, PATCH
These APIs provide information on the multi-admin verification global setting.
* Endpoint: /security/multi-admin-verify/approval-groups
HTTP methods: GET, POST
This API maanges multi-admin-verify approval groups.
* Endpoint: /security/multi-admin-verify/approval-groups/{owner.uuid}/{name}
HTTP methods: GET, PATCH, DELETE
These APIs provide information about a specific multi-admin verification approval-group.
* Endpoint: /security/multi-admin-verify/requests
HTTP methods: GET, POST
These APIs provide information about multi-admin verification requests.
* Endpoint: /security/multi-admin-verify/requests/{index}
HTTP methods: GET, PATCH, DELETE
These APIs provide information about a specific multi-admin verification request.
* Endpoint: /security/multi-admin-verify/rules
HTTP methods: GET, POST
This API manages multi-adming-verify rules.
* Endpoint: /security/multi-admin-verify/rules/{owner.uuid}/{operation}
HTTP methods: GET, PATCH, DELETE
These APIs provide information about a specific multi-admin verification rule.
* Endpoint: /storage/file/moves
HTTP methods: GET, POST
This API starts a file move operation between two FlexVol volumes or within a FlexGroup volume, and shows the status of all on-going file move operations in the cluster.
* Endpoint: /storage/pools
HTTP methods: GET, POST, PATCH, DELETE
These APIs manage storage pools in a cluster.
* Endpoint: /storage/ports/{node.uuid}/{name}
HTTP methods: PATCH
This API updates a storage port.
* Endpoint: /storage/tape-devices/{node.uuid}/{device_id}
HTTP methods: PATCH
This API updates a specific tape device.
* Endpoint: /protocols/cifs/domains
HTTP methods: GET
This API retrieves the CIFS connection information for all SVMs.
* Endpoint: /protocols/cifs/netbios
HTTP methods: GET
This API retrieves NetBIOS information.
* Endpoint: /protocols/cifs/session/files
HTTP methods: GET, DELETE
These APIs manage files opened in a current session.
* Endpoint: /protocols/cifs/shadow-copies
HTTP methods: GET, PATCH
These APIs retrieve and modify Shadowcopies.
* Endpoint: /protocols/cifs/shadowcopy-sets
HTTP methods: GET, PATCH
These APIs retrieve and modify Shadowcopy Sets.
* Endpoint: /protocols/cifs/users-and-groups/build-import/{svm.uuid}
HTTP methods: GET, POST, PATCH
This API is used to bulk import from the specified URI, get the status of the last import and to upload the import status to the specified URI.
* Endpoint: /protocols/nfs/connected-client-maps
HTTP methods: GET
This API retrieves NFS clients information.
* Endpoint: /protocols/vscan/{svm.uuid}/events
HTTP methods: GET
This API retrieves Vscan events, which are generated by the cluster to capture important events.
## 9.10.1 library updates
**New endpoints**
* Endpoint: /cluster/metrocluster/interconnects/{node.uuid}/{partner_type}/{adapter}
HTTP methods: PATCH
This API updates a MetroCluster interconnect interface.
* Endpoint: /cluster/web
HTTP methods: GET, PATCH
These APIs are for web services configuration.
* Endpoint: /svm/migrations
HTTP methods: GET, POST
These APIs allow creation and observation of the SVM migrations.
* Endpoint: /svm/migrations/{uuid}
HTTP methods: GET, PATCH, DELETE
These APIs allow management of a single SVM migration.
* Endpoint: /svm/migrations/{svm_migration.uuid}/volumes
HTTP methods: GET
This API retrieves the transfer status of the volumes in the SVM.
* Endpoint: /svm/migrations/{svm_migration.uuid}/volumes/{volume.uuid}
HTTP methods: GET
This API retrieves the transfer status for the specified volume.
* Endpoint: /svm/svms/{svm.uuid}/web
HTTP methods: GET, PATCH
These APIs manage the web services security configuration.
* Endpoint: /name-services/host-record/{svm.uuid}/host
HTTP methods: GET
This API retrieves the IP address of the specified hostname.
* Endpoint: /name-services/local-hosts
HTTP methods: GET, POST
These APIs are for managing IP to hostname mappings.
* Endpoint: /name-services/local-hosts/{owner.uuid}/{address}
HTTP methods: GET, PATCH, DELETE
These APIs manage a specified SVM and IP address.
* Endpoint: /name-services/unix-groups/{svm.uuid}/{unix_group.name}/users
HTTP methods: GET
This API retrieves users to the specified UNIX group and SVM.
* Endpoint: /name-services/unix-groups/{svm.uuid}/{unix_group.name}/users/{name}
HTTP methods: GET
This API retrieves a user from the specified UNIX group.
* Endpoint: /protocols/san/lun-maps/{lun.uuid}/{igroup.uuid}/reporting-nodes
HTTP methods: GET, POST
These APIs are for managing LUN map reporting nodes.