Skip to main content
Versa Networks

Versa Analytics REST API Overview

Versa-logo-release-icon.pngFor supported software information, click here.

Versa Analytics provides REST APIs so that you can retrieve information about the Analytics devices and the log data collected by the devices. You can retrieve the following types of information:

  • List of authenticated users
  • List of error codes returned by the data API calls
  • System information about disk, and CPU, usage; cluster drivers; and collectors
  • Global information about tenants (organizations) and tenant Versa Operating SystemTM (VOSTM) devices (appliances)
  • Next-generation firewall (NGFW) information and statistics
  • Stateful firewall information and statistics
  • Carrier-grade NAT (CGNAT) information and statistics
  • SD-WAN information and statistics, including SLA and QoS statistics and packet capture (PCAP) files
  • Tenant system information about application monitoring, guest VNFs/SNGs, and LTE usage.
  • Configuration information for Versa Director and Versa Analytics nodes.

Using the REST APIs, you can perform the following operations:

  • Log in and logout of Analytics clusters and nodes.
  • Delete tenants, SD-WAN sites, SD-WAN VOS devices, and SD-WAN access circuits.
  • Delete usage and reporting data.

API Authentication

Versa Analytics REST APIs support OAuth token-based authentication. It is recommended that you use OAuth authentication instead of cookie-based authentication. OAuth clients and access tokens are managed by Versa Director. Before calling a Versa Analytics REST API, obtain an OAuth access token from the associated Director node.

Note: For instructions about creating an OAuth client, generating and refreshing access tokens, and revoking tokens, see https://docs.versa-networks.com/Management_and_Orchestration/Versa_Director/Director_REST_APIs/Versa_Director_REST_API_Overview#Authenticate_with_OAuth_Tokens

After obtaining an access token from Versa Director, include it in the Authorization header of the Analytics REST API request using the following format:

Authorization: Bearer <ACCESS_TOKEN>

Access a Versa Analytics REST API Using an OAuth Token

The following example retrieves SD-WAN link availability information from a Versa Analytics node. The command is entered on a single line. The symbol <ACCESS-TOKEN> is used as a placeholder for where the actual bearer token would be included in the command.

$ curl -k --location
'https://<Analytics-IP-address>/versa/analytics/v1.0.0/data/provider/tenants/Corp-Inline-Customer-1/features/SDWAN/?qt=rangeseries&&start-date=1daysAgo&end-date=today&q=linkstatus(site,accckt)&metrics=availability&ds=aggregate&fq=(siteName:%22HE-DC-Branch-1%22)&count=16'
--header 'Authorization: Bearer <ACCESS_TOKEN>'

REST API Calls for Versa Analytics

Versa Analytics REST API calls are documented in the Versa Analytics API Reference guide, which you can access from the Versa Analytics application or the Analytics tab in the Director GUI. To do this, select Administration > Tools > Documentation in the left menu bar, and then click the API Documentation field. 

API_documenation_link.png

Supported Software Information

Release 21.2.1 and later supports all content described in this article.

Additional Information

Versa Director REST API Overview

  • Was this article helpful?