Skip to content

Instantly share code, notes, and snippets.

@dtaivpp
Last active July 8, 2021 17:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dtaivpp/f5be88c0ebecf2bdb9bb013aa41d6600 to your computer and use it in GitHub Desktop.
Save dtaivpp/f5be88c0ebecf2bdb9bb013aa41d6600 to your computer and use it in GitHub Desktop.
Sample of the csi-tai Virtual Observer python sdk
from csi-tai import CsiConnector, Endpoints, export_csv
# CsiConnector take a token and the endpoint URL
csi = CsiConnector('afwlf02394rjqw0494r034ifqojw4f',
'https://cloud.csiworld.com/VOWebAPI/v5/')
params = {
'filter': 'f.LName|o.eq|v.Tippett',
'fields': 'FName, LName',
'perpage':100
}
# Using the Endpoint metaclass you do not have to specify the method of request
data = csi.query(Endpoint.AgentInfo, params)
export_csv(data, {'path':'C:\\DropLocation\\', 'filename':"csvFile", 'overwrite':False})
@anirudhreddy1234
Copy link

Hi please help the code is not working

@dtaivpp
Copy link
Author

dtaivpp commented Jul 8, 2021

Hey @anirudhreddy1234, sorry that this is no longer working for you. I will probably just be dropping support for it then as I no longer have access to their API's to allow me to develop this. Best of luck! If you would like the source code is available here if you want to try and debug it:

https://github.com/dtaivpp/CSI_API

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment