Jump to content
Welcome to our new Citrix community!

Retrieve auditmessages events full history via NITRO API.


Recommended Posts

Is it possible to retrieve (using pagination or other methods) auditmessages events via NITRO API?

Citrix NetSacller NITRO API Guide say that you can retrieve maximum 256 messages per/call.

( https://developer-docs.citrix.com/projects/netscaler-nitro-api/en/12.0/configuration/audit/auditmessages/ )

For example API call will be

curl -k --location 'https://<netscaler-ip-address>/nitro/v1/config/auditmessages?args=numofmesgs:256'

but what to do if you need to retrieve events older than in the first 256 queue?

I've tried to use pagination but NITRO shows me events when I specify pagesize from 1 to 3, which means a maximum of 3 events per page. I don't understand the logic of pagination. Also Guide has mistake, because call  pagesize=#no;pageno=#no is incorrect, you should use pagesize=#no&pageno=#no

Link to comment
Share on other sites

Hello,

auditmessage feature currently limits the number of log messages to 256, so is NITRO API. You may want to raise an enhancement request to NetScaler team if there is a use case to fetch more than 256 messages for you.

About pagination, I am able to fetch more than 3 records. Below query is returning the latest 16 messages of the 256 messages. I have tried on 13.1 release though. let us know the NS version details where you are seeing the issue, we can assist further.

curl 'http://<NSIP>/nitro/v1/config/auditmessages?args=numofmesgs:256&pagesize=16&pageno=16' -u nsroot:XXX

Thank you for pointing the documentation error. We will take care of fixing it.

Thanks,

Swetha Garipally

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...