A new Flexera Community experience is coming on November 25th. Click here for more information.
last week I was able to log in to the API, (and still can, I can list my Refresh-Tokens) but when I try to pull my assets or inventory, I always get a
Invoke-RestMethod : {"message": "Endpoint request timed out"}
after 29 seconds....
is this an issue at the API level at flexera, or is there a timeout value that I can change ???
last week, I was able to pull 10000 records at a time using this URL:
https://api.flexera.com/fnms/v1/orgs/$org/inventories?offset=$offset&limit=$limit
and now, I cannot even retrieve 1 record ?!?
($org is our organization ID, $offset=0 and $limit=5)
Mar 14, 2022 11:50 AM - edited Mar 14, 2022 11:56 AM
update - out of the blue, the query is no longer timing out....
I have not changed anything, but I had an open case about logging in, but there is no update in the case since I responded, so I have no clue if they did anything, but it is working again.|
I did not modify my script..... and nothing has changed in my environment, so I must assume that Flexera has made some changes to the API environment.....
Mar 17, 2022 03:11 AM
Hi @prinand
As I recently played around this API area, somehow I didn't encounter timeout issue you reported. My export 2000 inventory seems happens only few seconds on PostMan. But my experience was somehow I need to keep generating new refresh token in order to allow my Postman working. Currently refresh token only valid 1 hours ,I thought it should give us a longer lifespam of the access token. But it seems also just 3600 seconds. Which is not ideal if we want to setup a consistent process to do API call .... Did you find a place to allow the user to configure a longer access token lifespam?
Sorry, I didn't directly answer your question though, but since FlexeraOne API is now a documented feature , so that we should be able to open a support case and get some help from the team?
Cheers
Kevin
Mar 14, 2022 06:50 PM
yes, the lifespan of the access_token is 3600 seconds - 1 hour - but when I start the script in the morning, I authenticate, and get a new access_token, and it instantly fails, so by then the access_token is only 30..60 seconds old
the timeout message comes after 29..30 seconds. and like I stated, I can retrieve the refresh-tokens (https://api.flexera.com/iam/v1/refresh-tokens) fine, so authentication is ok.
I record the time I retrieved the access_token, and if it is less than 3500 seconds old, I reuse the token, which works fine. so, I can consume the API, it's the inventory and asset queries that timeout.
just to "prove" it, I first try to get the inventory, and then retrieve the refresh-tokens. it times out on the inventory, and then lists the refresh-tokens
Mar 15, 2022 03:43 AM - edited Mar 15, 2022 03:51 AM
I did some searching for this kind of timeout - the "Endpoint request timed out" message looks like something that comes from AWS timeout (Flexera One is hosted on AWS), but I haven't found any indication of other people using the Flexera One API seeing this particular timeout.
Unless somebody else here has insight, you may want to out to Flexera Support to dig into the specifics of what is happening for you.
Mar 14, 2022 07:13 PM
update - out of the blue, the query is no longer timing out....
I have not changed anything, but I had an open case about logging in, but there is no update in the case since I responded, so I have no clue if they did anything, but it is working again.|
I did not modify my script..... and nothing has changed in my environment, so I must assume that Flexera has made some changes to the API environment.....
Mar 17, 2022 03:11 AM
That's good to hear @prinand.
I'm not sure of the details, but I think you may be right that something was changed in the last couple of days in Flexera One API environment that has helped you here.
Mar 17, 2022 03:29 AM