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

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)

(1) Solution

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.....

 

View solution in original post

(5) Replies
Big_Kev
By Level 7 Champion
Level 7 Champion

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

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

Refresh-tokens_list.png

 

 

ChrisG
By Community Manager Community Manager
Community Manager

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.

(Did my reply solve the question? Click "ACCEPT AS SOLUTION" to help others find answers faster. Liked something? Click "KUDO". Anything expressed here is my own view and not necessarily that of my employer, Flexera.)

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.....

 

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.

(Did my reply solve the question? Click "ACCEPT AS SOLUTION" to help others find answers faster. Liked something? Click "KUDO". Anything expressed here is my own view and not necessarily that of my employer, Flexera.)