cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Flexera One API's Question ... Devices- devicesCreate and Files- filesShow

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

(1) Solution

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

"https://api.flexera.com/fnms/v1/orgs/{orgId}/devices/installed-software?os=&softwareTitle=&publisher=&softwareStatus="

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

View solution in original post

(1) Reply

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

"https://api.flexera.com/fnms/v1/orgs/{orgId}/devices/installed-software?os=&softwareTitle=&publisher=&softwareStatus="

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