cancel
Showing results for 
Search instead for 
Did you mean: 

License Details using API or DB Query

ShivakumarKadro
Level 3
Hi All,

Is there a way to fetch available Blueprism session license details? e.g. Via Webservice, DB query call

Thanks,
Shiva

------------------------------
Shivakumar Kadrolli
------------------------------
17 REPLIES 17

Hi Shiva,

Please understand it is not a simple yes and no question if this was your expectation. All that is certain is the fact that it is possible to issue a select query with nolock on Blue Prism database. There was little information given on what exactly you were trying to achieve by having the nolock hints, and how it would be different than doing wiithout it. There are also other important questions that are not clear, for example, the data you are retrieving, the frequency of the query, the volume of the data returned, and what else may be happening to the database while you issuing those queries etc etc. It will not be easy to answer. I would ask you to consider those factors before making a call on what is the most appropriate way to query data out of Blue Prism.  

It is also important to understand that we do not offer direct support on work you developed in getting data out from our database, unless it is a script provided by the Blue Prism team to you directly. All work done by you is considered customisation, and you will need to use best judgement to do what you think is right, and take on the risks knowing if anything goes wrong, e.g. database goes down, Blue Prism will not be liable for it.

Hope this is clear.


------------------------------
Bruce Liu
Senior Product Consultant, Professional Services
Blue Prism
Australia/Sydney
------------------------------

JerinJose
Level 10
Hi Shiva,

you can get total license details by code 

Public Function GetLicenses() As DataTable

Dim LicenseInfo As List(Of KeyInfo) = app.gSv.GetLicenseInfo()

Dim dt As New DataTable
dt.Columns.Add("Owner", GetType(System.String))
dt.Columns.Add("Start Date", GetType(System.DateTime))
dt.Columns.Add("Expiry Date", GetType(System.DateTime))
dt.Columns.Add("Sessions", GetType(System.Int16))

For Each ki As KeyInfo In LicenseInfo
Dim dr As DataRow = dt.NewRow
dr("Owner") = ki.LicenseOwner()
dr("Start Date") = ki.StartDate()
dr("Expiry Date") = ki.ExpiryDate()
dr("Sessions") = ki.NumConcurrentSessions()
dt.Rows.Add(dr)
Next
Return dt

End Function

License_Information = GetLicenses()

output will be a collection, and use query from @Bruce Liu to get total pending and running sessions, subtract the value from total sessions allowed in license details you will get available sessions in your current environment (tested in version 7 not sure if it will work on lower versions this code lists all licenses both active and inactive)


------------------------------
Jerin Jose
Technical Product Owner
EY
Asia/Kolkata
*"If you find this post helpful mark it as best answer, .*
------------------------------

chris.strong
Staff
Staff

Hello Shivakumar,

 

You've had lots of good answer here and it sounds like the ability to query the license is something other people have solved in different ways.

 

You have some solutions for no, but I think it would be useful to submit an idea for the Blue Prism RESTful API to be extended to support License Information.

 

PS: I know the current Blue Prism API (7.0.0) does not support this information, because we have been focused on the surfacing the Control Room API first.  We will be continuing to extend the API capabilities over time, so why not submit the idea and see if the community shares their thought and the usefulness of the capability.

 

I'll keep an eye out for it.

King regards



------------------------------
Chris Strong
Product Manager
Blue Prism
------------------------------

Sure! Thanks

------------------------------
Shivakumar Kadrolli
------------------------------

Thanks Bruce! I was not looking for Yes/No answer, I was looking for the details on this topic, which you provided and you answered my query.

------------------------------
Shivakumar Kadrolli
------------------------------

All
I found that V7 REST has API "Return a list of sessions in the environment" to get a list of sessions along with all other details. As each active session consumes one license, can we use this API and filter the status to get active number license/session?



------------------------------
Shivakumar Kadrolli
------------------------------

Hi Shivakumar,

It is doable, but I question if it is the most appropriate method.

Note that the session API call is paged. You may need to issue multiple calls using a paging token to get all sessions meeting your criteria. The biggest drawback of this approach - in order to know a total session count of a type, you must pull all session details from the server. It is just too expensive to my liking. Another consideration is the timing. The moment you have had all sessions returned  and performed the count, the system may have moved on, i.e. the real time license utilisation may be something else. You need to ask yourself if this would be an issue to your scenario.

All in all, I would still think the SQL query is the best solution to get you the license utilisation based on real time usage info, with least amount of resources and it is also the quickest way available to my knowledge. It is actually the exact query behind the Blue Prism license utilisation dashboard tile as well.

I have created a license utilisation script to based on historical session records. You can take a look at it to see if you want to adopt it. Note that it is a solution based on SQL Server queries as well. Link to the asset: https://digitalexchange.blueprism.com/dx/entry/3439/solution/license-utilisation-sql-script


I would also suggest you raise an idea in the Ideation Portal, so that our product team can consider add an API endpoint to return exactly what you need without going through session endpoint specifically.

------------------------------
Bruce Liu
Senior Product Consultant, Professional Services
Blue Prism
Australia/Sydney
------------------------------

Thanks!

------------------------------
Shivakumar Kadrolli
------------------------------