Asset Activity count from iRAM API returns only 100 even the actual value more then 100.
Code Snippet:
int downloadCnt = 0;
long sd = (new Date("2012/01/01")).getTime(); //start date long variable
long nd = (new Date()).getTime(); //end date long variable
try {
//610 is metric id for asset download
AssetActivity[] activities = ramAsset.getActivites(new int[]{610}, sd, nd); downloadCnt = (activities != null) ? activities.length : 0;
} catch (Throwable th) {
downloadCnt = 0;
}
System.out.println("Download Count: "+downloadCnt);
While fetching Asset Activity like Download (610), Artifact Browse(650), SearchView (560), usage (615) count from iRAM API method using above code snippet returns exact value using iRAM v7.5.0.1, But
in iRAM v7.5.1.1 count returns only 100, even if the count values is more then 100.
Hence, you kindly assist, how to get the exact count value from iRAM API method program of the asset activities.
Thank you
Bakiyaraj Arul
iRAM Central Support
India
email: bakiyaraj.arul@in.ibm.com
Mobile: +91-98401 44332
int downloadCnt = 0;
long sd = (new Date("2012/01/01")).getTime(); //start date long variable
long nd = (new Date()).getTime(); //end date long variable
try {
//610 is metric id for asset download
AssetActivity[] activities = ramAsset.getActivites(new int[]{610}, sd, nd); downloadCnt = (activities != null) ? activities.length : 0;
} catch (Throwable th) {
downloadCnt = 0;
}
System.out.println("Download Count: "+downloadCnt);
While fetching Asset Activity like Download (610), Artifact Browse(650), SearchView (560), usage (615) count from iRAM API method using above code snippet returns exact value using iRAM v7.5.0.1, But
in iRAM v7.5.1.1 count returns only 100, even if the count values is more then 100.
Hence, you kindly assist, how to get the exact count value from iRAM API method program of the asset activities.
Thank you
Bakiyaraj Arul
iRAM Central Support
India
email: bakiyaraj.arul@in.ibm.com
Mobile: +91-98401 44332
One answer
There is an open defect for this issue.
Community Activity Audit Report is Hard Coded to Return Only the Frist 100 Items (63840)
For now I'd suggest choosing dates intervals with less than 100 activities or continually reducing the interval until the result is less than 100. You can implement paging with date intervals using that method.
Community Activity Audit Report is Hard Coded to Return Only the Frist 100 Items (63840)
For now I'd suggest choosing dates intervals with less than 100 activities or continually reducing the interval until the result is less than 100. You can implement paging with date intervals using that method.
Comments
Thanks Sheehan for your work-around. But There are the chances that, more then 100+ download can happen on the same day. In that case, iRAM v7.5.1.1 returns only 100 on that single day.
At this scenario, how to get the exact download count value? Thank you Bakiyaraj Arul iRAM Central Support India email: bakiyaraj.arul@in.ibm.com Mobile: +91-98401 44332