#API property for volume snapshot reserve?

1 messages · Page 1 of 1 (latest)

orchid creek
#

In AIQUM 9.14's API, is there a volume property that shows the snapshot reserve for a volume? Obviously AIQUM knows what the reserve is, it shows in the Web UI, but I'm striking out trying to find where in the API that is exposed.

orchid creek
#

Also, is the volume "comment" field exposed anywhere?

#

(Or the AIQUM key=value annotations?)

orchid creek
#

I've opened a support case but welcome feedback here too.

warm pier
#

I don't see that we have an api for that metric in aiqum. it is collected when aiqum polls the cluster, but when i look at the volume landing page, there's no private or public api calls that i see that include the snapshot reserve, just modules that are probably pulling the data from the db directly.

if you need this through api, you'd need to enable the api gateway and use um as a passthrough to the cluster api to get that info. you should also be able to get the comment this way.

#

as an example, this is through my lab um to get just those fields and nothing else from one volume.

https://xx.xx.xx.xx/api/gateways/413d7cc6-e838-11ec-9b5b-005056b1f66b/storage/volumes%3Fis_constituent%3Dfalse%26name%3DAIQUM_data_vol%26fields%3Dcomment%2Cspace.snapshot.space_used_percent%2Cspace.snapshot.reserve_percent%2Cspace.snapshot.reserve_available%2Cspace.snapshot.used%2Cspace.snapshot.reserve_size

  "records": [
    {
      "uuid": "161e9d38-ec38-11ec-8b6b-005056b1f66b",
      "comment": "",
      "name": "AIQUM_data_vol",
      "space": {
        "snapshot": {
          "used": 17627791360,
          "reserve_percent": 25,
          "reserve_size": 14128181248,
          "space_used_percent": 125,
          "reserve_available": 0
        }
      },
      "_links": {
        "self": {
          "href": "/api/gateways/413d7cc6-e838-11ec-9b5b-005056b1f66b/storage/volumes/161e9d38-ec38-11ec-8b6b-005056b1f66b"
        }
      }
    }
  ],
  "num_records": "1",
  "_links": {
    "self": {
      "href": "/api/gateways/413d7cc6-e838-11ec-9b5b-005056b1f66b/storage/volumes?is_constituent=false&name=AIQUM_data_vol&fields=comment,space.snapshot.space_used_percent,space.snapshot.reserve_percent,space.snapshot.reserve_available,space.snapshot.used,space.snapshot.reserve_size"
    }
  }
}```
orchid creek
#

Support just got back to me, asking for a Zoom call "now" -- well, I'm eating lunch so I thought I'd check in here first. Glad I did.

warm pier
#

It's under General > Feature Settings > API Gateway.
It may not have been enabled when UM was first set up, if it's not you can toggle it there.

orchid creek
#

... the X-Dot-SVM-UUID as a header is pretty ugly though. :)

#

But I think this will get it done.

warm pier
#

yeah, but you only need it if you are running svm scoped commands. if you aren't, you can skip it

orchid creek
#

This is definitely tightly SVM-scoped.

warm pier
#

oh well

#

so much for hoping

orchid creek
#

API Gateway is turned on already, alright

#

This is all in response to #1278082993080107121 message where I need just some numbers for certain volumes on one SVM, for user-facing reporting.

#

uuid here is the same as cluster identity show -fields uuid , right?

orchid creek
#

Update, I did get this testing and working, at least mocked up in Postman, which is good enough for now. thanks again, @warm pier