Highlighted
Micro Focus Frequent Contributor
Micro Focus Frequent Contributor
138 views

Paging and sorting using rest api executeQueryByName

Jump to solution

Hi, folks

I am tring to use the UCMDB API 

POST /topology (executeQueryByName)

to get the query result.

I successfully invoked the API and get a result list for my queries. 

However, I want to have the result sorted by certain field and get the result by pages.

Is there any way to achive this through API?

 

Thanks,

Robin

1 Solution

Accepted Solutions
popadiyski Acclaimed Contributor.
Acclaimed Contributor.

Re: Paging and sorting using rest api executeQueryByName

Jump to solution

Hi,

 

you have to use "?chunkSize=100". In fact, if you go to Help -> REST API Reference in the CMS UI as admin, you will be able to see all the REST APIs and test them through swagger.

Regards,

Petko Popadiyski

Freelance Microfocus CMS UCMDB Consulting

Likes are appreciated!
2 Replies
popadiyski Acclaimed Contributor.
Acclaimed Contributor.

Re: Paging and sorting using rest api executeQueryByName

Jump to solution

Hi,

 

you have to use "?chunkSize=100". In fact, if you go to Help -> REST API Reference in the CMS UI as admin, you will be able to see all the REST APIs and test them through swagger.

Regards,

Petko Popadiyski

Freelance Microfocus CMS UCMDB Consulting

Likes are appreciated!
Micro Focus Frequent Contributor
Micro Focus Frequent Contributor

Re: Paging and sorting using rest api executeQueryByName

Jump to solution

Thank you Petko. With the  "?chunkSize=100" it is working!

I found where the proble is: I was putting the "chunkSize" in header,  it should be in the query parameter.

Thanks,

Robin

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.