Alberto M Posted November 19, 2019 Posted November 19, 2019 Hi. I'm not sure if this is the right place to ask this, but, anyway. Since I've applied the last Service Manager update yesterday evening, the h_summary field is no longer being returned when the smGetRequests is run. The field name does not even return in the response anymore so not even like the value is in error. Are you aware of any change or issue within the API? Thanks and regards, Alberto
Victor Posted November 19, 2019 Posted November 19, 2019 @Alberto M why are you using smGetRequests? This API is for a specific purpose, for the request list view, should not be used to return request data... If yopu can tell me in what context you are using this API perhpas we can advise of using more appropriate APIs...
Alberto M Posted November 19, 2019 Author Posted November 19, 2019 @Victor, we were using this in order to retrieve the title of a request in order to include in a link to a request in one of our internal systems. We build a string using the Call reference and then h_summary in order to give users the full information on which call they are being linked to. For this, we pass in a 'keyword' parameter. So in reality, we could put any search term in there and it will return the results. (and this was working fine until yesterday)
Victor Posted November 20, 2019 Posted November 20, 2019 @Alberto M ok then smGetRequests is not really the best API for this purpose... smGetRequests is specifically designed for request list view, it works with ...well... views which can be customised in any way... it also restricts the request returned based on visibility, meaning what requests can the user access.. which is the API key user.. anyway, shouldn't really be used for this purpose. A much more appropriate API would be entityBrowseRecords2 (https://api.hornbill.com/data/?op=entityBrowseRecords2). To return the data you need, you can the following payload for your API call: <methodCall service="data" method="entityBrowseRecords2"> <params> <application>com.hornbill.servicemanager</application> <entity>Requests</entity> <searchFilter> <column>...</column> <value>...</value> <matchType>exact</matchType> </searchFilter> </params> </methodCall> For the <searchFilter> param, it really depends on how you search for requests, what requests needs to be returned by the API. Can you detail on this please, then I will be able to show you the full payload XML 1
Alberto M Posted November 20, 2019 Author Posted November 20, 2019 Thanks a lot, @Victor I will pass this on to my colleague who is in charge of maintaining this code so he will change and test it. If needed, I'll contact you back. 1
Alberto M Posted November 21, 2019 Author Posted November 21, 2019 @Victor, I have some feedback from my colleague saying that he applied your suggestion and he got success. Thanks a lot for you help!
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now