AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.


#Power
 View Only
  • 1.  REST API error with criteria

    Posted Thu May 20, 2021 11:30 AM

    Hi support,

    I run this REST API command against my ILMT server v9.2.23

    https://gm8.swglab.fr.ibm.com:9081/api/sam/v2/software_instances?token=de09fdff8bc44edd1452f00a5df2068ba3d25289&columns[]=instance_id&columns[]=component_name&columns[]=exclusion_or_suppress_comment?criteria={%22and%22:[[%22computer_name%22,%22=%22,%22gm8%22]]}

    retrieve this error :

    {"error":"Unable to parse time HTTP request parameter"}

    without criteria the same REST API is running well.

    Can you please tell me what is wrong in the first syntax ?

    Guillaume






    #Support
    #SupportMigration
    #AIX


  • 2.  RE: REST API error with criteria

    Posted Mon May 24, 2021 12:19 PM

    Hi,

    you can have only one question mark (?) in the URL that limits where the page ref ends and params start, then each param must be separated with ampersand (&).

    try this:

    https://URL:9081/api/sam/v2/software_instances?token=de******************89&columns[]=instance_id&columns[]=component_name&columns[]=exclusion_or_suppress_comment&criteria={%22and%22:[[%22computer_name%22,%22=%22,%22gm8%22]]}

    Thanks.






    #AIX
    #SupportMigration
    #Support