Maximo

Expand all | Collapse all

Pagination is not working || SQP/SAVED QUERY || Query Not working in OSLC Based API

  • 1.  Pagination is not working || SQP/SAVED QUERY || Query Not working in OSLC Based API

    Posted Mon February 15, 2021 12:26 AM
    Edited by Venkataraman Guruswamy Mon February 15, 2021 12:48 AM
    Hi All,

    We are trying to make pagination work when using 'Saved Queries' and 'SQP' based parameters.

    However, the pagination is not working when using Saved Queries/ SQP. When we use Page no = 2 it always retrieves the Page 1 repeatedly.

    https://localhost/maximo/api/os/XXXXX?pageno=2&oslc.pageSize=10&lean=1&_dropnulls=0&apikey={{QAapikey}}&sqp:attribute=value&oslc.select=*&collectioncount=1&savedQuery=OSQUERY.ABCDC.NAMEOFTHEQUERY

    We also tried stable paging but we are getting this problem.

    "BMXAA9510E - The stable page resource was not found because the reload of a stable page was attempted or the idle expiry time has expired.",

    "statusCode": "404"

    Regards

    NOTE: This saved query was created via automations script.

    ------------------------------
    Venkataraman Guruswamy
    ------------------------------


  • 2.  RE: Pagination is not working || SQP/SAVED QUERY || Query Not working in OSLC Based API

    Posted Tue February 16, 2021 07:31 AM
    We've never tried to utilize a script saved query so I'm not sure about that. Does it work if you use a saved query inside the application? 

    As for the issue with stable paging, the reason why that failed is you're using an API key. API keys do not create a session by default, which is typically advantageous (because your session is tied to a specific JVM). You can cause it to still create a session by adding an enablesession=1 to your query parameters. Stable paging is good when you need to ensure you get all records and only get each record once. Without stable paging, as records get added or deleted in Maximo your set is actively being changed as you paginate. That can cause you to miss records or get the same record multiple times.

    ------------------------------
    Steven Shull
    Director of Development
    Projetech Inc
    Cincinnati OH
    ------------------------------



  • 3.  RE: Pagination is not working || SQP/SAVED QUERY || Query Not working in OSLC Based API

    Posted Thu February 18, 2021 11:57 PM
    Thanks a lot for your timely help. It worked . Thanks again

    ------------------------------
    Venkataraman Guruswamy
    ------------------------------



  • 4.  RE: Pagination is not working || SQP/SAVED QUERY || Query Not working in OSLC Based API

    Posted 4 days ago
    Hi, 

    Please tell, how you resolved you query of pagination not working with saved queries.

    ------------------------------
    Sumit Katyal
    ------------------------------



  • 5.  RE: Pagination is not working || SQP/SAVED QUERY || Query Not working in OSLC Based API

    Posted 4 days ago
    Hi Venkataraman Guruswamy, 

    Could you please tell, how you resolved paging issue with saved queries ?

    I am also facing same issue.

    <oslc url>?oslc.select=*&sqp:text=hello&savedQuery=search&pageno=2&oslc.paging=true&oslc.pageSize=2




    ------------------------------
    Sumit Katyal
    ------------------------------



  • 6.  RE: Pagination is not working || SQP/SAVED QUERY || Query Not working in OSLC Based API

    Posted 3 days ago
    It worked after enabling stable paging and enable session = 1

    ------------------------------
    Venkataraman Guruswamy
    ------------------------------



  • 7.  RE: Pagination is not working || SQP/SAVED QUERY || Query Not working in OSLC Based API

    Posted 2 days ago
    You can also try to using maxauth header in place of apikey for stable pagination features. 
    One important thing is Object structure restriction does not work with stable pagination. It is a limitation in Maximo upto version 7.6.1.2 and IBM PMR team said they will add this feature in future releases.

    ------------------------------
    Biplab Choudhury
    Maximo Consultant
    Tata Consultancy Services
    Melbourne
    ------------------------------