Cisco Cisco Content Delivery System Manager User Guide

Page of 218
North Bound Application Programming Interface
North Bound Application Programming Interface (NB API) is a programming interface for north bound
analytics systems to integrate with VDS-SM and leverage the data maintained in VDS-SM for higher level
aggregation and analysis. VDS-SM provides a RESTful Web Services API to query data from VDS-SM for
analytics. VDS-SM supports predefined queries/searches to query data corresponding to reports. Each predefined
query/search is identified by a name, which corresponds to a particular dashboard. You can query the data by
specifying the search name alone.
For example, in the CDN Traffic report, the search name is cdntraffic_daily.
To obtain the result for a query, you need to perform the HTTPS GET request using the following URL:
With Delivery Service Name
https://< UI
Node IP >:8443/bnimgmt/api/analytics/search/systemdefined/< searchname >?delsvc=<delivery
service name>
With Delivery Server Name
https://< UI
Node IP >:8443/bnimgmt/api/analytics/search/systemdefined/< searchname >?host=<delivery
server name>
Without Delivery Service or Delivery Server Name
https://< UI Node IP >:8443/bnimgmt/api/analytics/search/systemdefined/<searchName>
For example, to execute the search “cdntraffic_daily”, you need to perform GET request using the following
URL:
https://<UI Node IP>:8443/bnimgmt/api/analytics/search/systemdefined/
cdntraffic_daily
You need to specify the Username and Password (CDN Operator Admin and CDN Viewer) for authentication
in the “Authorization” header fields of the HTTPS GET request. For example, in command line tools such as
curl, provide the following command with credentials:
curl -k -u bniadmin:admin --request GET 'https:// <UI Node IP
>:8443/bnimgmt/api/analytics/search/
systemdefined/cdntraffic_daily
In the URL, you need to pass the delivery service name or delivery server name for a search and not any
special characters or space.
The URL should be exactly the same as mentioned here and they should be entered in a single line. Also,
HTTPS is authenticated through self-signed OpenSSL certificate for NB API and NB API does not support
HTTP.
Note
Result Format
Analytics API provides the results in CSV format. The first line is the header line with fields, followed by
the data. Following is an example of Console Output.
curl -k -u bniadmin:admin --request GET
'https://10.77.246.184:8443/bnimgmt/api/analytics/search/systemdefined/cdntraffic_weekly'
   Videoscape Distribution Suite Service Manager User Guide
128
Analytics
North Bound Application Programming Interface