IBM License Metric Tool (ILMT)

IBM License Metric Tool (ILMT)

Connect with Db2, Informix, Netezza, open source, and other data experts to gain value from your data, share insights, and solve problems.

 View Only
  • 1.  Understanding how to actually use the PUT, POST and DELETE HTTP methods

    Posted Thu September 14, 2023 09:29 AM

    Hi ILMT support team.  I need more understanding on how to actually execute or use the http PUT, DELETE and POST methods. 

    For example:

    You use the PUT operation on the api/sam/configs element to change the values of the License Metric Tool server settings.

     "PUT https://hostname:port/api/sam/configs ?name=maxVMManagerInactivity&value=30"

    Where or how do I actually execute that line above?   If I entered in the URL from the web browse, it does not work.

    If I removed the PUT and just entered "https://hostname:port/api/sam/configs ?name=maxVMManagerInactivity&value=30",  it returned back the results from that setting instead.  Which was actually similar to the GETmethod.

    Configuration of advanced server settings

    Where as "GET https://hostname:port/api/sam/computer_systems" from this link below, I could easily enter "https://hostname:port/api/sam/computer_systems" with GET in the URL from the web browser, it worked so well and returned back the results.

    REST API for retrieval of computer systems

    Same thing for DELETE method, how do I actually trigger or execute this DELETE HTTP?

    "DELETE https://hostname:port/sam/software_components/software_component_id/component_lifecycles"

    Deleting the end of support date for software components

    It goods to see example at the bottom of each links but how do I accurately execute the method, from the web browser URL or need special tool to code this, or something.  That is what I need step by step documented.  Could someone with great knowledge please share step-by-step samples for PUT, POST and DELETE methods.   The GET method is straight forward and just enter the https link without the GET word and it works very well.   

    Thanks.



    ------------------------------
    York Ly
    ------------------------------


  • 2.  RE: Understanding how to actually use the PUT, POST and DELETE HTTP methods

    Posted Thu September 14, 2023 10:38 AM

    Hello York,


    You can't use those HTTP methods like PUT, POST, DELETE directly from the browser.
    By design, web browser will only use HTTP GET whenever you call something directly from the URL...


    Again, curl is the way to go...

    Following is a syntax for your case scenario:
    curl -vk -H "Token:xxx" -X PUT "https://localhost:9081/api/sam/configs?name=maxVMManagerInactivity&value=30"



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

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



  • 3.  RE: Understanding how to actually use the PUT, POST and DELETE HTTP methods

    Posted Thu September 14, 2023 12:09 PM

    Thanks Oktawian for a quick response.   This is exactly where the ILMT documentation is really needed to add extra information, samples, etc. on "how to".  Giving that "PUT https:........." in the documentation and no where it states using "curl" is the way to go.    Your sample syntax is very very excellent with exact information needed using the curl command.   I am just a basic user and pretty sure others too.  When I read the sample syntax for PUT, DELETE or POST method in the documentation without a good sample scenario,  I start to wonder where is the world I would actually execute that sample syntax.  

    Could you please update or add your sample and also indicate the doc that using the "curl" command would be the way to execute these methods.   That really saves everyone time.    

    I will try out your sample syntax later and see if it works.

    I know ILMT L3 team has a lot more knowledge.   As a user, we need your knowledge to be documented in the ILMT doc as well including samples how it should be done.   The world would be a better place.   

    Thanks again.   



    ------------------------------
    York Ly
    ------------------------------



  • 4.  RE: Understanding how to actually use the PUT, POST and DELETE HTTP methods

    Posted Fri September 15, 2023 03:48 AM

    I couldn't agree more.
    It's been escalated...



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

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