IBM License Metric Tool (ILMT)

 View Only
  • 1.  REST API snapshot, error 404

    Posted Tue December 10, 2024 08:57 AM
    Hi Team, Just upgrade to version 9.2.38 and try to generate a snapshot via REST API.
    here the command I run:
    curl -X GET -k -J -o toto.zip -H "Token:49e133011b72b4a34e2d9b129cfe2b20d77e1653" "https://gmorillo1:9081/restapi/v2/audit_snapshot?startdate=2024-07-13&enddate=2024-10-11t=Comment+with+space"
    and the result is always:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8" /> <title>The page you were looking for doesn't exist (404)</title> <style type="text/css"> body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; } div.dialog { width: 25em; padding: 0 4em; margin: 4em auto 0 auto; border: 1px solid #ccc; border-right-color: #999; border-bottom-color: #999; } h1 { font-size: 100%; color: #f00; line-height: 1.5em; } </style> </head> <body> <!-- This file lives in public/404.html --> <div class="dialog"> <h1>The page you were looking for doesn't exist.</h1> <p>You may have mistyped the address or the page may have moved.</p> </div> </body> </html>
    What I have made wrong ? do I need to setup something else ?
    I also made the test from FireFox with that url, and get the same error.
    https://gmorillo1:9081/restapi/v2/audit_snapshot?token=49e133011b72b4a34e2d9b129cfe2b20d77e1653&startdate=2024-07-13&enddate=2024-10-11

    To confirm the version
    curl -X GET -k -J https://gmorillo1:9081/api/sam/about?token=49e133011b72b4a34e2d9b129cfe2b20d77e1653 {"product":"IBM License Metric Tool","version":"9.2.38.0-20241203-1719"}
    Thanks for your help.


    ------------------------------
    Guillaume Morillo IT Security Specialist
    IT Consultant
    IBM
    bois colombes
    (3367) 275-3217
    ------------------------------


  • 2.  RE: REST API snapshot, error 404

    Posted Tue December 10, 2024 11:01 AM

    Hello,


    Your first command is missing the ampersand: 
    curl -X GET -k -J -o toto.zip -H "Token:49e133011b72b4a34e2d9b129cfe2b20d77e1653" "https://gmorillo1:9081/restapi/v2/audit_snapshot?startdate=2024-07-13&enddate=2024-10-11t=Comment+with+space"

    A correct way:
    curl -X GET -k -J -o toto.zip -H "Token:49e133011b72b4a34e2d9b129cfe2b20d77e1653" "https://gmorillo1:9081/restapi/v2/audit_snapshot?startdate=2024-07-13&enddate=2024-10-11&comment=blah...blah"

    Nevertheless, that should not be a 'The page you were looking for doesn't exist' root cause...
    Perhaps there is some proxy (HTTP) on the way... which 'malforms' the HTTP packets.

    You need to look into ILMT Server's tema.log for any erroneous HTTP GET requests reported at the time of curl run.
    I've just realized the we'd missed to add a corresponding log entries for any successful & unsuccessful 'audit snapshots through REST API' request.
    To be fixed in the next release....



    ------------------------------
    Thank you,
    Oktawian

    Oktawian Powązka, L3 Support
    IBM License Metric Tool
    ------------------------------



  • 3.  RE: REST API snapshot, error 404

    Posted Tue December 10, 2024 11:05 AM

    Hello,

    As you probably know, we are working with doc update to add there the required configuration change in WebSphere web.xml config file to enable this feature on upgraded environments.

    The documentation will be updated later today.

    Thank you.



    ------------------------------
    Andrei Ionescu
    IBM
    Bucharest
    ------------------------------



  • 4.  RE: REST API snapshot, error 404

    Posted Tue December 10, 2024 12:08 PM

    Hi again,

    Here is the updated doc:

    https://www.ibm.com/docs/en/license-metric-tool?topic=raras-enabling-rest-api-retrieving-audit-snapshots-in-upgraded-license-metric-tool

    Thanks.



    ------------------------------
    Andrei Ionescu
    IBM
    Bucharest
    ------------------------------