ONTAP Rest API Discussions

Seeking the REST endpoint for the "cluster ring show" CLI command

SCOTT_LINDLEY
679 Views

As part of our post OnTAP upgrade process we run a "cluster ring show" command to ensure that all instances of all databases are at the same version level (AKA "epoch"). I'm seeking the REST endpoint to return these results via the REST API for automation purposes. Please advise as to how this information can be obtained via a REST endpoint.

 

Thank you for your attention to this matter!

1 REPLY 1

JohnChampion
630 Views

Try using the /private/cli ... here's an example in PowerShell v7. With the /private/cli method, you need to specify the fields you want in the output (fields=* does not work). This is using ALL the field names so edit as needed.

$url = "https://{clusterip}/api/private/cli/cluster/ring?fields=node,unitname,online,epoch,master,local,db-epoch,db-trnxs,num-online,rdb-uuid"

$result = Invoke-RestMethod -Method Get -Uri $url -Credential (Get-Credential) -SkipCertificateCheck

$result.records | ft

 

Output:

node    unitname online epoch master  local   db_epoch db_trnxs num_online rdb_uuid
----    -------- ------ ----- ------  -----   -------- -------- ---------- --------
ots1-01 mgmt     master     1 ots1-01 ots1-01        1    13278          1 9c6409c3-188f-11ee-af15-00a0b8e7b055
ots1-01 vldb     master     1 ots1-01 ots1-01        1      190          1 9c6409c3-188f-11ee-af15-00a0b8e7b055
ots1-01 vifmgr   master     1 ots1-01 ots1-01        1      192          1 9c6409c3-188f-11ee-af15-00a0b8e7b055
ots1-01 bcomd    master     1 ots1-01 ots1-01        1      248          1 9c6409c3-188f-11ee-af15-00a0b8e7b055
ots1-01 crs      master     1 ots1-01 ots1-01        1       46          1 9c6409c3-188f-11ee-af15-00a0b8e7b055
Public