REST API knowledge exchange
Post Reply
Kevinl
Novice
Posts: 3
Liked: never
Joined: Dec 19, 2024 4:35 am
Contact:

VBR can't get Network inventory

Post by Kevinl »

Hey team,
Why I cant get any network object info when using the following request body to make a request to VBR API
And I didn't notice any errors complained at the backend.
Test multiple times without any result but I changed `value` to Host it take effect, much appreciated for any help.

POST https://localhost:9419//api/v1/inventory/Hostname

Code: Select all

{
    "filter": {
        "type": "GroupExpression",
        "operation": "or",
        "items": [
            {
                "type": "PredicateExpression",
                "operation": "in",
                "property": "type",
                "value": "Network"
            },
        ]
    },
    "sorting": {
        "property": "name",
        "direction": "descending"
    }
}
Best Regards
Kevin
chris.arceneaux
VeeaMVP
Posts: 705
Liked: 376 times
Joined: Jun 24, 2019 1:39 pm
Full Name: Chris Arceneaux
Location: Georgia, USA
Contact:

Re: VBR can't get Network inventory

Post by chris.arceneaux »

Hi Kevin,

Welcome to the Veeam R&D forums!

The Network type can be filtered using hierarchyType in the body of the API call you referenced.

Our documentation on this API call will provide further details.
Kevinl
Novice
Posts: 3
Liked: never
Joined: Dec 19, 2024 4:35 am
Contact:

Re: VBR can't get Network inventory

Post by Kevinl »

Hi Chris,

Thank you so much, it works now.
Is it meaning hierarchyType is a required parameter in Inventory request?

Regards,
Kevin
chris.arceneaux
VeeaMVP
Posts: 705
Liked: 376 times
Joined: Jun 24, 2019 1:39 pm
Full Name: Chris Arceneaux
Location: Georgia, USA
Contact:

Re: VBR can't get Network inventory

Post by chris.arceneaux » 1 person likes this post

Glad to hear itI! :D

The hierarchyType is not required but you need to specify it to access different types, like Network. If it's not specified, the first type in the list below is chosen. For VMware vSphere, that's HostsAndClusters and for VMware Cloud Director, that's VAppsAndVms.

Image
Post Reply

Who is online

Users browsing this forum: No registered users and 26 guests