Home Analyst Portal
Options

Light weight version of API GetServiceCatalog?

Sebastian_HansenSebastian_Hansen Customer IT Monkey ✭
edited December 2017 in Analyst Portal
/api/V3/ServiceCatalog/GetServiceCatalog
The above call results in a pretty significant performance hit, as it returns base64 data for both request offering and service offering images (per request offering). That's a lot of extra bytes...

Is there a more light weight way of getting all the request offerings for a user w/o the image data.
I found some undocumented endpoints that Cireson uses, but I feel this is risky business.

What have you guys done to avoid loading multiple megabytes of data?

Answers

  • Options
    Brian_WiestBrian_Wiest Customer Super IT Monkey ✭✭✭✭✭
    I have to run these scripts every time I upgrade the portal. 
    https://support.cireson.com/KnowledgeBase/View/1399#/
  • Options
    john_doylejohn_doyle Cireson Support Ninja IT Monkey ✭✭✭✭
    Hi @Sebastian_Hansen

    Yes, that API results can return many megabytes of data when large images are used for the Service and Request Offerings. The Service Catalog doesn't even use the image data which is returned. It makes separate calls to get the images for the offerings.

    What I have done in the past where this was a problem was modify the spGet_ServiceCatalog stored procedure and change the SELECT statements so that it returns null for each image.

    e.g.
    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; SELECT null AS SOImage, so.Title AS SOTitle, ISNULL(category.DisplayStringOverride, category.DisplayString) AS CategoryName, so.CategoryId, null  AS ROImage, ro.Title AS ROTitle, ro.BriefDescription, ro.Id AS ROId, so.Id AS SOId, ro.TargetTemplateType AS TargetTemplateType, ro.LinkUrl, ro.LinkUrlTargetType, ro.PresentationMappingTemplate AS PresentationMappingTemplate<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FROM ServiceOffering so 

    There are a number of select statements depending on the parameters passed to the stored procedure, but you can modify each one and then execute the query to update the stored procedure.

    I have seen the calls to retrieve the Service Catalog fall from 40MB to 40KB.



Sign In or Register to comment.