Maximo

Maximo

Come for answers, stay for best practices. All we're missing is you.

 View Only
  • 1.  Cleaning of NextGen REST API responses

    Posted Thu January 27, 2022 09:26 AM
      |   view attached
    Hi,

    I am currently working on queries on NextGen REST APIs and I am facing issues with some attributes in the responses that I don't need.

    For instance, when I call GET /maximo/oslc/os/MXAPIDOMAIN?lean=1&oslc.where=maxdomainid=677&oslc.select=domainid,alndomain{value,description}
    I get the response which is in the attached document.

    The extracted data will be used as a data referential, and it will never be updated through that API. So I don't need the following attributes in the response:
    - rowstamp
    - href
    - localref
    - all the *_collectionref

    Do you know if there is any way to remove these attributes from the response of the API ?

    Thank you by advance.

    ------------------------------
    Gabriel Nicaise
    ------------------------------



    #Maximo
    #AssetandFacilitiesManagement
    #MaximoIntegrationandScripting

    Attachment(s)

    json
    mxapidomain_response.json   2 KB 1 version


  • 2.  RE: Cleaning of NextGen REST API responses
    Best Answer

    Posted Fri January 28, 2022 08:14 AM
    You can add the following query parameters to drop those:

    &ignorekeyref=1&ignorers=1&ignorecollectionref=1

    I think the names make sense but:
    1) ignorekeyref is for dropping the href/localref
    2) ignorecollectionref is for dropping the collections
    3) ignorers is for dropping the rowstamp

    If you have any issues with them let me know your Maximo version so I can make sure that we had it. The collectionref has been there a long time but I'm not sure off the top of my head when we added the ignorekeyref & ignorers query parameters.

    ------------------------------
    Steven Shull
    ------------------------------



  • 3.  RE: Cleaning of NextGen REST API responses

    Posted Mon January 31, 2022 05:27 AM
    It's working great.

    Thank you for your clarifications.

    ------------------------------
    Gabriel Nicaise
    ------------------------------



  • 4.  RE: Cleaning of NextGen REST API responses

    This message was posted by a user wishing to remain anonymous
    Posted Wed January 03, 2024 02:38 PM
    This post was removed