Getting Started with the NetZoom SDK
The NetZoom SDK is a set of REST APIs that allows clients to customize their NetZoom application. Using the SDK toolkit, clients can retrieve and set data directly with the NetZoom database or even create customized integrations between NetZoom and other data center applications.
NetZoom itself is created using these same API calls.
Requirements
There are several requirements that must be completed prior to using the NetZoom SDK.
- NetZoom must be installed and fully configured on an application server.
- Client must purchase a NetZoom SDK license and add it to NetZoom using Administration/Enterprise Configuration/Licenses/Licenses
- The NetZoom SDK must be installed using the NetZoom SDK license
- A user or service account login for the application server is required
Verifying the NetZoom SDK Installation
To verify that the NetZoom SDK installation was successful, launch the NetZoom SDK URL in a browser. For example: enter https://##NetZoomInstance##/api/SDK.svc in the browser address bar where ##NetZoomInstance## is replaced with the NetZoom application URL.
If you can browse the SDK service, you know that the SDK installation was successful. This is how it should look if the installation was successful.
Concepts
Token: NetZoom is a secured application and each call using the NetZoom SDK must also be secured. NetZoom uses a session-based security Token to ensure the validity and authorization of the API calls.
How to Access the NetZoom API Endpoints
The NetZoom SDK resides on the same application server where NetZoom is installed. In order to access the SDK, a domain login is required for the application server.
A series of steps must be followed when calling a NetZoom API endpoint.
Before making any other request to NetZoom, the Login endpoint must be called to initiate the session and authorize access. The Login endpoint returns a security token. This token is further required to make any other API requests. Once the required NetZoom operations are performed, the session must be terminated using the Logout endpoint.
Following example demonstrates the sequence of calls required to get all the available Sites in NetZoom.
Step 1: Login
Endpoint to Login: https://##NetZoomInstance##/api/SDK.svc/Login
Input
This end point does not require any input. The class ClientCredentials must be set with the username and password prior to calling Login.
Output
This end point returns a string which is the security token.
Step 2: GetSites
Endpoint to Get Sites: https://##NetZoomInstance##/api/SDK.svc/GetSites
Input
token (string) (Use the security token that is returned from the Login)
Output
List<SiteItem> (List) (List contains all the available Sites)
Output Reference Classes
SiteItem
Name |
DataType |
Description |
ID |
Int64 |
Unique Identifier for site |
Name |
string |
Name of the Sites |
Description |
string |
Description/Notes |
Address |
string |
Address for the Site |
Phone |
string |
Phone Number |
URL |
string |
Web URL |
HasBuilding |
bool |
Does site has buildings |
Type |
string |
Type of Site |
TimeZoneOffset |
double |
Time Zone Offset |
AlertCount |
int |
No of Unattended alerts on Site |
Icon |
int |
Icon ID |
weather |
NZWeather |
weather |
timezone |
NZTimeZone |
timezone |
date_format |
string |
Date Format |
Longitude |
string |
Longitude |
Latitude |
string |
Latitude |
LastUpdated |
DateTime? |
Last Updated |
NZWeather
Name |
DataType |
Description |
cityId |
int |
cityId |
temperature |
Double |
Temperature |
humidity |
Double |
Humidity |
pressure |
Double |
Pressure |
weather |
string |
weather |
icon |
string |
icon |
NZTimeZone
Name |
DataType |
Description |
Id |
string |
Id |
Name |
string |
Name |
Offset |
double |
Offset |
BaseOffset |
double |
BaseOffset |
DayLightSavingOffset |
double |
DayLightSavingOffset |
DayLightMonthStart |
int |
DayLightMonthStart |
DayLightDayStart |
int |
DayLightDayStart |
DayLightDayEnd |
int |
DayLightDayEnd |
DayLightMonthEnd |
int |
DayLightMonthEnd |
IsDayLightSaving |
bool |
IsDayLightSaving |
Step 3: Logout
Endpoint to Logout: https://##NetZoomInstance##/api/SDK.svc/Logout
Input
token (string) (Use the token that is returned from the Login)
Output
This endpoint does not return anything.
First Project: Get Sites using C#
Step 1: Add the service reference
Add the NetZoom SDK service reference to the project in which you want to use the API.
Add the NetZoom SDK Service URL and Name the Service Reference. The URL is the same one you browsed to verify the installation of the SDK: https://##NetZoomInstance##/api/SDK.svc
For this example, the NetZoom Service Reference is named NZ_SDK.
Step 2: Review the endpoints
Once the Service Reference is added, you can view all the available Endpoints in the NetZoom SDK.
Step 3: Call the endpoints needed by your project
Now it is time to use the API calls in your project. Remember to start by calling Login and end by calling Logout.
Let us try to return all the available Sites in NetZoom. Type in the following commands and execute your project to retrieve all of the Sites defined in your NetZoom application.
Congratulations!
Now that you have learned the basic usage of the NetZoom SDK and completed your first project, you may like to explore the full list of available endpoints and reference classes. Each of the APIs are fully explained in the application at
Feature Path: Administration/Tools/SDK/API Tutorial
Last Updated: Thursday, August 13, 2020
NetZoom, Inc.