Skip to main content

REST APIs for 24.5

VEN Dashboard Reference

This topic contains properties and examples for the VEN dashboard.

Examples of VEN Dashboard APIs

vens_statistics_post

{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "type": "object",
    "required": [
	"property_counts"
    ],
    "properties": {
	"property_counts": {
	    "type": "array",
	    "items": {
		"type": "object",
		"required": [
		    "property"
		],
		"properties": {
		    "property": {
			"type": "string",
			"enum": [
			    "status",
			    "version",
			    "health",
			    "condition",
			    "os_id",
			    "enforcement_mode",
			    "ven_type"
			]
		    },
		    "values": {
			"type": "array",
			"items": {
			    "type": "string"
			}
			},
		    "filters": {
			"type": "array",
			"items": {
			    "type": "object",
			    "required": [
			       "filter_property"
			    ],
			"properties": {
			    "filter_property": {
				"type": "string",
				"enum": [
				    "status",
				    "version",
				    "health",
				    "condition",
				    "os_id",
				    "enforcement_mode",
				    "ven_type"
				]
			    },
			    "values": {
				"type": "array",
				"items": {
				    "type": "string"
				}
			    }
			}
		    }
		}
	    }
	}
    }
}

Sample Request

{
   “property_counts”: [
	{  
	   "property": "version",
	   "values": [
              "19.3", 
              "18.3"]
	   "filters": [
		{  
		   "filter_property": "status",
		   "values": [ 
                      "active", 
                      ""
                  ]
		},
		{  
		   "filter_property": "containerized",
		   "values": [
                     "true"
                  ]
		}
	    ]
   },
   {
	  "property": "version",
	   "filters": [
		{
		"filter_property": "status",
		"values": [
                   "active"]
		}
	   ]
      },
      {
	   "property": "health"
      }  
   ]
}

Sample Response for version and health

{
	“property_counts”: [
	   {  
	      "property": "version",
	      “counts”:[
		{
		   "value": "18.1",
		   "count": 1
		},
		{
		   "value": "18.2",
		   "count": 1
		},
		{
		   "value": "18.3",
		   "count": 2
		},
		{
		   "value": "19.1",
		   "count": 2
		}
	]
},
{
	   "property": "health",
	   “counts”:[
		{
		   "value": "healthy",
		   "count": 3
		},
		{
		   "value": "warning",
		   "count": 3
		},
		{
		   "value": "err",
		   "count": 2
		}
	    ]
	}  
   ]
}

Sample Response for ven_type

[{
	property: "ven_type",
	total_filtered_count: 205,
	counts: [
		filtered_count:422,
		unfiltered_count: 424,
		value: "active",
	]
}]