vRealize Network Insight APIs 1.2.0

vRealize Network Insight APIs


Welcome to the vRealize® Network Insight™ API Guide. This guide provides information about the VMware vRealize Network Insight (vRNI) REST APIs, including how to use the Representational State Transfer (REST) API resources, authenticate and construct REST API calls.

If you already know your way around the APIs and just want to reference the API Categories, check them out in the menu on your left. Otherwise, let’s get you started!


Getting Started with the vRealize Network Insight API

Before you can do anything with the API, authentication against vRealize Network Insight is required. There are different ways to authenticate against vRealize Network Insight on-prem and vRealize Network Insight Cloud. Let’s look at both. This is a quick getting started, you can also look at the full API guide.

vRealize Network Insight (on-prem)

When you have vRNI installed on-premises, authentication will run through local users, LDAP, or VMware Workspace ONE Access.

Step 1 - Authenticate to the API Endpoint

The first setup is to create an authorization token using the following API:

POST Create Authorization Token

Step 2 - Use the Authorization Token in subsequent API calls

Each subsequent API request must contain the authorization token in Authorization Header in the following format:

GET https://vrni.example.com/api/ni/info/version
Authorization: NetworkInsight <auth-token>

vRealize Network Insight Cloud

When you consume vRNI Cloud as SaaS, the authentication is handled by the VMware Cloud Services Portal.

Step 1 - Obtain a VMware Cloud Services Portal API Token

Calling APIs requires an API Token and you’ll need to navigate to the VMware Cloud Services portal and create a new API Token (requires login). Your API Token will be an alpha-numeric string.

Step 2 - Exchanging your API Token for an Access Token

With your API Token you’ll need to use the CSP Identity and Access Management group of APIs and fetch an “access token” which will be passed as part of each subsequent vRealize Network Insight Cloud API request. See below for more details on refresh tokens and handling expiration.

Here’s the API you’ll need:

POST Exchange Scoped Token For Access (requires login)

Step 3 - Use the Authorization Token in subsequent API calls

Each subsequent API request must contain the authorization token in the following format:

GET https://api.mgmt.cloud.vmware.com/ni/api/ni/info/version
csp-auth-token: <auth-token>

Now that you’re authenticated, you’re free to call the API and get the data you’re after. To discover which APIs are available, have a look at the categories below.


API Categories



Feedback

Was this page helpful?