Hello William,
Your 'software_instances' API syntax looks ok as far as ILMT is concerned...
But, as I can see you are using Windows box, so, ALL those double quotes characters need to be escaped (\) when using curl :
\"rows\": ....
That restriction doesn't exist on Unix based curl...
Personally, I propose to put this json structure into some file (let's say test.txt):
{
"rows": [
{
"instance_id":1,
"metric_id":4,
"product_release_guid":"xxxx-xxxx-xxxx-xxxx",
"is_charged":1
}
]
}
and use that as an input to curl command :
curl -k -v -X PUT https://127.0.0.1:9081/api/sam/v2/software_instances?token=xxx -d @test.txt
------------------------------
Thank you,
Oktawian
Oktawian Powązka, L3 Support
IBM License Metric Tool
------------------------------
Original Message:
Sent: Wed June 14, 2023 02:58 PM
From: William Van Horne
Subject: RESTAPI for classifying software
The documentation is light on examples. Can you please illustrate the correct format of the curl command -- similar to below. I can extract the software inventory but have had issues with the PUT command - a likely syntax issue.
------------------------------
William Van Horne
------------------------------