Home Service Manager Portal Feature Requests
We appreciate you taking the time to vote and add your suggestions to make our products awesome! Your request will be submitted to the community for review and inclusion into the backlog.

We recommend reviewing what is submitted before posting, in case your idea has already been submitted by another community member. If it has been submitted, vote for that existing feature request (by clicking the up arrow) to increase its opportunity of being added to Cireson solutions.

For more information around feature requests in the Cireson Community click here.

API for Service Offerings

Tom_HendricksTom_Hendricks Customer Super IT Monkey ✭✭✭✭✭
Given that the /API/V3/ServiceCatalog/GetServiceCatalog no longer returns images for Service Offerings (set to null), and there is nothing else in the API that retrieves them all at once, could we get an endpoint that just retrieves the SO objects? Perhaps call it /API/V3/ServiceCatalog/GetServiceOfferings? 

In the spirit of minimizing duplication of data, this would let the performance enhancement from 8.6.2 of returning nulls for SO images (from GetServiceCatalog) remain, but we could make (only) one more call to this new endpoint and get a separate object that contains the SO's and their properties.  It would be a simple matter to match the ID's from each set of data.  Two API calls is not as good as one, but it is significantly better than one API call per Service Offering.
6 votes

Submitted · Last Updated

Comments

  • Martin_BlomgrenMartin_Blomgren Customer Ninja IT Monkey ✭✭✭✭
    edited July 2018
    The drawback with the old solution where all the base64 string were included in the api response i that the browser didn't cache the result and nor do we want it to in regards to the other data that is included. This in turn generated a lot of unneccesary XHR traffic and in the end poor performance for the users.

    The way I've always solved this is with an undocumented api endpoint for the service catalog wich don't return the images and another undocumented api endpoint for SO and RO images which returns complete base64 with the correct data attribute in the beginning. Because of this you can use those endpoint in your img html tags and let the browser cache them!

    <div>/ServiceCatalog/GetRequestOfferingImg/<RequestOfferingGuid></div><div><br></div><div>/ServiceCatalog/GetServiceOfferingImg/<ServiceOfferingGuid></div><div></div>

    Example:
    <div>$('body').prepend('<img src="/ServiceCatalog/GetRequestOfferingImg/49e1b05a-093b-0894-26d0-ce4801169b44" />');
    $('body').prepend('<img src="/ServiceCatalog/GetServiceOfferingImg/9f141580-fc82-8adb-54a9-f06d8e3c9096" />');</div><div></div>

    But I agree with you that they should move these API endpoint to the official supported one!
  • Tom_HendricksTom_Hendricks Customer Super IT Monkey ✭✭✭✭✭
    This is a great approach, for the meantime.  Thanks for pointing this out!
Sign In or Register to comment.