A new Flexera Community experience is coming on November 18th, click here for more information.
Hi Everyone, just got a new laptop and had to reinstall a bunch of software .. reinstalled PostMan to use the Flexera One API's. While re creating all of them and testing each one out I noticed that when I launched the Devices- devicesCreate API it looked like it ran ok because it gave me a file name with .zip at the end but when I ran the Files-filesShow API where you enter the file name it complained that it could not find the name of the file.
My environment is rather large so maybe the system times out and crashes the process which would maybe explain why I am seeing what I am. I tried searching for similar issues but nothing came up .. perhaps someone knows if this is a challenge using these 2 API's.
Here are the 2 API's using "curl" that I am talking about
curl -X POST\ -H "Authorization: Bearer [[accessToken]]"\ -H "Accept: application/json,application/vnd.goa.error"\ "https://api.flexera.com/fnms/v1/orgs/{orgId}/devices/installed-software?os=&softwareTitle=&publisher=&softwareStatus="
curl -X GET\ -H "Authorization: Bearer [[accessToken]]"\ -H "Accept: application/json,application/vnd.goa.error"\ "https://api.flexera.com/fnms/v1/orgs/{orgId}/files/{filename}"
Thanks as Always
Bruce
Mar 08, 2022 10:52 AM
Hi Everyone, I took some time to look at this a little deeper and part of the struggle was my lack of knowledge when it comes to API's and Curl formatting. I was able to sort out why I was not getting what I was expecting by lot of trial and error but eventually got it.
Here is the Curl I was trying to use .. its the Devices - Get Devices one
To start off I was simply running this using my "orgid" and left everything as is .. it seemed to run but it finished after about 20 minutes with No Data Found. I then started to populate some of the parameters with legitimate details and like magic it worked .. showing a "Completed" in the status. Please note that when you first run this, you get a status of Created, then it will update to In Progress and then if successful to Completed. It takes a bit of time so be patient .. just resend the message every so often until you see it end .. a completed time will show up.
For you experts .. the following is probably already known but for folks like me with very little expertise in this its a must. I found that if you are not going to populate one of the parameters with something, remove it from the string or else it will return No Data Found. I guess because the parameter is there it takes it as being blank and then tries to match that .. not 100% sure but it certainly seemed that way. I tried leaving the softwareStatus= as blank and it brought back no data found but if I simply removed that parameter all togeather it worked fine.
Here is what worked in terms of a populated Curl message with all the parameters populated. I removed my actual org id and replaced it with xxxxx.
https://api.flexera.com/fnms/v1/orgs/xxxxx/devices/installed-software?os=SunOS 5.11&softwareTitle=Infoscale 7.4 Availability&publisher=Veritas&softwareStatus=unmanaged
Hope this helps some other folks who like myself know enough to be dangerous in terms of API's and Curl formats.
Bruce
Mar 16, 2022 10:27 AM
Hi Everyone, I took some time to look at this a little deeper and part of the struggle was my lack of knowledge when it comes to API's and Curl formatting. I was able to sort out why I was not getting what I was expecting by lot of trial and error but eventually got it.
Here is the Curl I was trying to use .. its the Devices - Get Devices one
To start off I was simply running this using my "orgid" and left everything as is .. it seemed to run but it finished after about 20 minutes with No Data Found. I then started to populate some of the parameters with legitimate details and like magic it worked .. showing a "Completed" in the status. Please note that when you first run this, you get a status of Created, then it will update to In Progress and then if successful to Completed. It takes a bit of time so be patient .. just resend the message every so often until you see it end .. a completed time will show up.
For you experts .. the following is probably already known but for folks like me with very little expertise in this its a must. I found that if you are not going to populate one of the parameters with something, remove it from the string or else it will return No Data Found. I guess because the parameter is there it takes it as being blank and then tries to match that .. not 100% sure but it certainly seemed that way. I tried leaving the softwareStatus= as blank and it brought back no data found but if I simply removed that parameter all togeather it worked fine.
Here is what worked in terms of a populated Curl message with all the parameters populated. I removed my actual org id and replaced it with xxxxx.
https://api.flexera.com/fnms/v1/orgs/xxxxx/devices/installed-software?os=SunOS 5.11&softwareTitle=Infoscale 7.4 Availability&publisher=Veritas&softwareStatus=unmanaged
Hope this helps some other folks who like myself know enough to be dangerous in terms of API's and Curl formats.
Bruce
Mar 16, 2022 10:27 AM
User | Count |
---|---|
8 | |
7 | |
3 | |
3 |