cancel
Showing results for 
Search instead for 
Did you mean: 

Is there any way to know the amount of API queries per hours already used?

Adrian_Alvarez1
Champ on-the-rise
Champ on-the-rise

We have API query licenses (for example let’s say 1000 queries per hour), and we also have many external applications using API queries.

Is there any way to know how close we are to the 1000 queries per hour limit? Does Onbase have any counter or flag accessible via API?

I know Onbase keeps the count, because obviously they have to verify the query consumption. The question is: does onbase offer access to this counter? How?

It becomes really difficult for me to keep my own counter (I have different apps spread all over the company in different servers) As a consequence, I just have to wait until I get the program exception (because I reached the limit and the query can't be executed) and then start a super-complex rollback procedure. Don’t forget I have many apps, and they will all have the same problem at the same time. It’s like you know you are going to have a problem, but there is nothing you can do until it hits you in the face, and then you start doing some “damage control”. 

I can spend LOTS of time trying to have a centralized query counter among all the apps , and implement all sort of counting and validation mechanisms on my side... but in the end the ultimate truth is the Onbase query counter, and that's why I need to know if I can read it.

 Any idea will be really appreciated.   Please, please, please… I really need to hear you have something better for me.

17 REPLIES 17

Adrian_Alvarez1
Champ on-the-rise
Champ on-the-rise

Thank you Greg and Victor for your answers.

Wouldn't it be simpler and better if Hyland provides the counter via API? They already have the mechanisms implemented, and their number is the ultimate/important one... they just need to expose the value in a read-only variable in the API...  Am I wrong? Would it be too much to ask for?

In case I have to implement my own query counter, which will increase the complexity, weakness and development time of my apps, then the webservice approach will be definitely one of the bests.  As a matter of fact we have so many operations in our Onbase solution that turning on logging will most probably have a considerable impact in our systems. 

 

 

 

 

 

Daniel_Quill
Elite Collaborator
Elite Collaborator

This can be used to track the number of licenses currently in use.  The table provides you the type of license and number of licenses in use.  Unless I misunderstood you trying to track number of consumed licenses.

You would need to query the database table (licusage) and return the results which your application could then use.  Your application would need to be written to compare the max number of queries per hour with the current license count in the database.

Daniel, this sounds very good... Let's see if I understood properly:

- I should first enable the option Configuration --> Utils --> Core Based Settings. (it will increase DB activity, but it's the only way to get good data in the licusage table, right?)

- Then I will read the field usagecount in the LICUSAGE table, where the producttype field will have a value like "API queries" or similar (this will return aprox. value of the amount of api queries done, keeping in mind it's not real-time updated)

- and then with this value I can do my magic on my side...  🙂   

Is this the idea ??? I guess I will try it...

Thanks a lot.

Daniel_Quill
Elite Collaborator
Elite Collaborator

Adrian,

That is correct.  The "licusage" table consists of 4 columns (logdate, workstationnum, producttype, usagecount).  The count is per workstation so you will need setup your logic to extract the proper producttype.

Example: SELECT logdate, producttype, usagecount FROM hsi.licuage WHERE producttype = 110

109 = Client Query API (Retrievals Per Hour)                                                             

110 = Core Query API (Retrievals Per Hour)                                                      

This will return all rows of that query type (109,110).  Then in the "magic" on your end you can narrow down the usage by timeframe based on the logdate that the licensed was used.  You will also need to loop through all of the rows and add up the "usagecount" column to get the actual number.

-Hope that helps.

Adrian_Alvarez1
Champ on-the-rise
Champ on-the-rise

Hello Daniel,

I've been doing all sort of tests but even after checking the Log License Usage option, I don't get any data into the licusage table. It's empty.

Is there any additional setting that I need to enable in order to get data into this table???

Thanks in advance

Getting started

Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.