Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
Anonymous_User Absent Member.
Absent Member.
322 views

REST API event-source-status pagesize


Hi,

I'm having an issue with the REST API method event-source-status

I want to get the method to return a list of all the attached event
sources. I have about 1400 attached to Sentinel but on calling the
method only 400 entries are returned.

On my test env (I have 4 event sources) I have tried to modify my script
to call event-source-status?pagesize=1 with the intention to read 1
object, then effectively going to the next. However the results via
postman appear to show that with a pagesize of 1 that 4 items are
returned with 1 next link, and on pressing next the same 4 items are
returned.

All I want to do is iterate through all event sources but dont seem to
be able to get them all in 1 list or get them in the pagesize I
require.

Any help welcome.


--
srobshaw
------------------------------------------------------------------------
srobshaw's Profile: https://forums.netiq.com/member.php?userid=2823
View this thread: https://forums.netiq.com/showthread.php?t=51745

0 Likes
1 Reply
Anonymous_User Absent Member.
Absent Member.

Re: REST API event-source-status pagesize


Hi,

If you would like to iterate through all the event sources in a
paginated manner, use this URL:
1. To get all the event sources attached:
/SentinelRESTServices/objects/eventsource
2. To get N-number(Say 5) event sources / per page:
/SentinelRESTServices/objects/eventsource?page=1&pagesize=5 (This comes
with next url which would look like, <next
xlink:href="https://164.99.175.172:8443/SentinelRESTServices/objects/eventsource?page=2&pagesize=5"/>).
In above example, the 'page' attribute is for the page number you are
querying for.
and the 'pagesize' is the number of elements you would like to retrieve
in the page you mentioned by 'page' attribute.

You should be able to crawl through event sources with the next and prev
url.

I have tested it with Sentinel 7.2 and found working as expected.

In your query above, you have mentioned about
/SentinelRESTServices/objects/event-source-status url.
To get all the event sources' status just call
/SentinelRESTServices/objects/event-source-status (without any page
attribute).

Let us know if both the REST EP(/objects/eventsource and
/objects/event-source-status) works for you as expected.

In your query


--
atapas
------------------------------------------------------------------------
atapas's Profile: https://forums.netiq.com/member.php?userid=8144
View this thread: https://forums.netiq.com/showthread.php?t=51745

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.