Feb 28 2021 09:13 PM
I am usign SCOM 2019 rest apis to fetch alerts from http://scomhost/OperationsManager/data/alert.
Iam forming the below query for SCOM rest api. How can I specify that the output data should be sorted on lastmodified time.
Another question is how can specify to give top 100 results matching the query and get the remaining in next call. How can I implement pagination with the query to get data in chunks.
Can someone please help me with this
$Query = @(@{ "classId" = ""
"criteria" = " ( (LastModified > '" + $startTime +"' AND LastModified <= '"+ $endTime+ "' )) "
"displayColumns" = "id","description","context","monitoringclassid","monitoringobjectdisplayname","monitoringobjectfullname","monitoringobjectid","monitoringobjectname","monitoringobjectpath","severity","name","netbioscomputername","netbiosdomainname","principalname","priority","problemid","statelastmodified","age","repeatcount","timeadded","timeaddedutc","timeraised","timeresolved","lastmodified","lastmodifiedutc","ticketid","resolutionstate","customfield1","customfield2","customfield3","customfield4","customfield5","customfield6","customfield7","customfield8","customfield9","customfield10", "owner","alertparams","ismonitoralert","metricname","metricdisplayname"
})
Nov 09 2023 02:44 PM
@palemmahesh
I have the same question too.
Do SCOM Api have pagination?