Command Center has been the solution to manage & monitor Citrix networking devices centrally since ages. From 4.1 release onwards, Command Center exposed its feature set over RESTful NITRO API. Since then it has gone through a great journey from only being a Management & Monitoring Solution to Central Management, Monitoring & Automation solution.

Command Center is a solution which makes life easier by bringing your Citrix NetScaler Deployment Management under one roof. It became a game changer with API based automation on top of a one stop solution.

With this post I will kick start a series of posts dedicated to ways of integrating this solution to match your automation needs. But before jumping to the cool stuff, let me dedicate this post to the changes you should know from Command Center 5.0 to 5.2 release.

Command Center NITRO API background:

Command Center feature-set is organized as a set of services. Below are the 18 packages (5.2 release), corresponding to Command Center features ranging from Discovery to Administration.

We believe in standardizing our solutions. To bring unification across NetScaler and Command Center NITRO API approach we have brought out following changes:

Changes in NITRO API object Model:

From CC 5.2 onwards the objects will be called in a more standardized format inline with NetScaler NITRO API.

Command Center NITRO API SDK’s are categorized based on the actions that can be performed on the Command Center server. Each category is grouped into different packages which consists of classes that provide the definitions to perform the operations. For instance with Command Center 5.2, definitions to discover devices are available in the “com.citrix.cmdctr.nitro.resource.discovery” package.

In 5.0 release the package for same operation was as follows:

All device discovery related operations such as discovering a device, adding a device profile, and so on were found in the “com.citrix.ccapi.service.interfaces.DiscoveryMgmtService” package.

Now, lets explore RESTful nature of Command Center APIs

The first step towards using NITRORESTful API is to establish a connection with the server and then authenticate by using the administrator’s credentials. You must specify the username and password in the login object.

One of the best ways to explore NITRO is by exploring its powerful HTTP query support. The query language exhibits certain heavy tasks in the most simplified format. To unify the citrix solution, with CC 5.2 release we have brought similarity in query language bringing it inline with NetScaler approach. Below are few examples which will help you understand this better:

LOGIN (POST)

https://<CCIP>:8443/nitro/v1/login

HTTP Method. POST

• Request Payload.

{

“login”:

{

“username”:”user”,

“password”:”secret”,

“session_timeout”:3600

}

}

• Response Payload.

{

“errorcode”: 0,

“message”: “Done”,

“login” :

{

“password”:”secret”,

“session_timeout”:3600,

“sessionid”:”70795094%3A13d1a1dee5e%3A-7f37″,

“username”:”user”,

“remarks”:””

}

}

 

LOGIN (Method – DELETE)

https://<CCIP>:8443/nitro/v1/login/70795094%3A13d1a1dee5e%3A-7f37

DEVICE_PROFILE (Method – GET)

https://<CCIP>:8443/nitro/v1/discovery/device_profile?pageno=1&pagesize=25

Here the query argument pageno signifies which page you want to query based on the pagesize selected, which is 25 in this case. This will essentially query first 25 device profiles from the complete list.

DEVICE_PROFILE (Method – DELETE)

https://<CCIP>:8443/nitro/v1/discovery/device_profile/11

DEVICE INVENTORY (Method – GET)

https://<CCIP>:8443/nitro/v1/discovery/citrix_mo_device?pageno=1&pagesize=25

DEVICE INVENTORY Method – (DELETE)

https://<CCIP>:8443/nitro/v1/discovery/citrix_mo_device/10.102.29.60

VIRTUAL SERVERS (Method – GET)

https://<CCIP>:8443/nitro/v1/monitoring/vserver?pageno=1&pagesize=25

SERVICES (Method – GET)

https://<CCIP>:8443/nitro/v1/monitoring/services?pageno=1&pagesize=25

NETSCALER DASHBOARD DATA (Method – GET)

https://<CCIP>:8443/nitro/v1/monitoring/nsdashboarddata?filter:”10.102.40.66,10.102.40.67

CERTIFICATE MANAGEMENT (Method – GET)

https://<CCIP>:8443/nitro/v1/certificate/certificate?pageno=1&pagesize=25

AUDIT TEMPLATE (Method – GET)

https://<CCIP>:8443/nitro/v1/changemgmt/ns_template_info?pageno=1&pagesize=25

AUDIT POLICY (Method – GET)

https://<CCIP>:8443/nitro/v1/changemgmt/audit_policy?pageno=1&pagesize=25

This was about it on what you need to know while using Command Center 5.2 release RESTful APIs. Now, It’s time to get off the couch and get your hands soiled with Command Center exciting RESTful APIs’!

Leave a comment on this blog post and let us know how you would like to integrate Command Center with your Automation System. We have a lot more in store for you than you would expect!