HMC

 View Only
  • 1.  Need help with rest endpoint doing search (what format is the query value supposed to be)

    Posted 17 days ago

    • https://www.ibm.com/docs/en/power9?topic=interfaces-hmc-rest-apis
    • /rest/api/uom/{R}/search/{QUERY} ----> get the feed of instances of {R} matching the query

    for the QUERY value I have tried

    • (PartitionName=abc) and various other versions of this including double and single quotes, but get
      • 500 Internal Server Error : <ReasonCode kb="ROR" kxe="false">Unknown internal error.</ReasonCode>
                    <Message kxe="false" kb="ROO">Unable to parse the remainder of the following expression: =abc</Message>


    ------------------------------
    Warren Goldman
    ------------------------------


  • 2.  RE: Need help with rest endpoint doing search (what format is the query value supposed to be)

    Posted 17 days ago

    Off the top of my head I'd say you probably need to url encode  the equal sign = as %3D so the web server doesn't mangle it.



    ------------------------------
    Vincent Greene
    IT Consultant
    Technology Expert labs
    IBM
    Vincent.Greene@ibm.com


    The postings on this site are my own and don't necessarily represent IBM's positions, strategies or opinions.
    ------------------------------



  • 3.  RE: Need help with rest endpoint doing search (what format is the query value supposed to be)

    Posted 14 days ago

    The format for search query value is as follows (for example:  PartitionName==ABC)

      /rest/api/uom/{R}/search/(PartitionName=='ABC')

     and it is always better to pass value with single quote in some of the cases value can have space as below 

      /rest/api/uom/{R}/search/(PartitionState=='not activated')

    and instead of search API you can use quick API because quick API's are much faster.



    ------------------------------
    REKHA BOMKANTI
    ------------------------------