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

It is recommend that you use OATH-token based authentication for APIs instead of cookie-based authentication. To do this, applications can connect to Versa Director as an API client to obtain a token and then use the token to query the Analytics API, as shown below.

  • Connect to Director and obtain an authorization token for the user login
$ curl -k -H "Content-Type: application/json" 
-H "Accept: application/json" "https://director-IP-address:9183/auth/token" 
-d '{
    "client_id": "versa-analytics", 
    "client_secret": "df77fb6823b34434ee945c7e914c925dd3e2b", 
    "username": "analytics_service_account", 
    "password": "<PASSWD>", 
    "grant_type": "password"
    }'
    {
    "access_token":"eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiJjMGY1NTlmZmUxYjVlOTgyNjFiM2QxMzI5YWY4NmQ3YzI2MjM2YmQ5MjZjYTBiZGQzN2M1MmRmNjA1ZDI5ODU1IiwiaWF0IjoxNzUyODcxNDk4LCJyb2xlIjoiUHJvdmlkZXJEYXRhQ2VudGVyU3lzdGVtQWRtaW4iLCJ1c2VybmFtZSI6ImFuYWx5dGljc19zZXJ2aWNlX2FjY291bnQiLCJleHAiOjkyMjMzNzIwMzY4NTQ3NzV9.ESyG1dxx94wKHu83wY1HX-0aYGb0_OTHQ7tIlGHYGGg",
    "issued_at":"2025-07-18T20:44:58.859Z",
    "expires_in":"-1","token_type":"Bearer",
    "refresh_token":"eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiI1ZGJkOGJlYzVhOGFhYTlkYzAyZmRkZjQxNGE5MDVhZDZiN2M2MDdlMzZjY2QwZTU5ZjE2NDcyZjgzMmMzMDcxIiwiaWF0IjoxNzUyODcxNDk4LCJyb2xlIjoiUHJvdmlkZXJEYXRhQ2VudGVyU3lzdGVtQWRtaW4iLCJ1c2VybmFtZSI6ImFuYWx5dGljc19zZXJ2aWNlX2FjY291bnQiLCJleHAiOjkyMjMzNzIwMzY4NTQ3NzV9.VOvmijmprmrzwNcMhJqCr5dbCpWu6d-mBW4kk-78Mvo",
    "user":{
           "name":"analytics_service_account",
           "firstname":"van","lastname":
           "admin","email":"support@versa-networks.com",
           "is_external_user":false,
           "enable_two_factor":false,
           "idle_time_out":15,
           "roles":["ProviderDataCenterSystemAdmin"],
           "primaryrole":"ProviderDataCenterSystemAdmin",
           "obfuscationEnabled":false,"isSSOUser":false},
           "auth_context":{"isAuthInSlaveNode":false}
           }
     }
  • Use the token to access the Analytics API
$ 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 eyJhbGciOiJIUzI1NiJ9.eyJqdGkiOiJjMGY1NTlmZmUxYjVlOTgyNjFiM2QxMzI5YWY4NmQ3YzI2MjM2YmQ5MjZjYTBiZGQzN2M1MmRmNjA1ZDI5ODU1IiwiaWF0IjoxNzUyODcxNDk4LCJyb2xlIjoiUHJvdmlkZXJEYXRhQ2VudGVyU3lzdGVtQWRtaW4iLCJ1c2VybmFtZSI6ImFuYWx5dGljc19zZXJ2aWNlX2FjY291bnQiLCJleHAiOjkyMjMzNzIwMzY4NTQ3NzV9.ESyG1dxx94wKHu83wY1HX-0aYGb0_OTHQ7tIlGHYGGg'
{
  "qTime" : 35,
  "data" : [ {
    "name" : "Down",
    "type" : "data",
    "metric" : "availability",
    "data" : [ ]
  }, {
    "name" : "Degraded",
    "type" : "data",
    "metric" : "availability",
    "data" : [ [ 0, 1752738300000, 1752738900000 ], [ 0, 1752748800000, 1752749400000 ] ]
  }, {
    "name" : "Up",
    "type" : "data",
    "metric" : "availability",
    "data" : [ [ 0, 1752710400000, 1752738300000 ], [ 0, 1752738900000, 1752748800000 ], [ 0, 1752749400000, 1752871500000 ] ]
  }, {
    "name" : "Indeterminable",
    "type" : "data",
    "metric" : "availability",
    "data" : [ ]
  } ],
  "metadata" : {
    "categories" : [ "HE-DC-Branch-1,Internet-1 (100.00 %)" ],
    "type" : "range"
  },
  "totalCount" : 1

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?