cancel
Showing results for 
Search instead for 
Did you mean: 

JAM ODATA search api

satish_kandi
Explorer
0 Kudos

what entities does Search api return? How do we display info about the groups listed as search results?

I tested the search api with a query and it returned search result objects but these object only have references to other objects. Our requirement is to display some informative text about the search results to the user and navigate to the object upon user selection of the search result.

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

The SAP Jam Developer Guide at http://help.sap.com/download/documentation/sapjam/developer/index.html#odata/concepts/SAPJamODataAPI... has a section on the OData Search API.  You'll run the search as a service operation getting back a list of SearchResults. One of the relationships you can expand on is the ObjectReference which has title and type and links.  The metadata is available at jam4.sapjam.com/api/v1/OData/$metadata

Not all backing entities will have descriptions. The description is filled only when there is a description attached to the search result item. For example, a group or event will have a description attached but an overview page and wiki page will not.

Kyle Patrick for Jam Engineering

satish_kandi
Explorer
0 Kudos

Hi Kyle,

Thanks for your reply. If my search resulted in 100 results, Will I have to make 100 calls to JAM to get the description(by fetching the Object references) of all the 100 objects as I don't see any description related to the search result? We want to display search results on Pepsi's portal and based on user selection, navigate to a particular search result.

Thanks,

Satish

RuedigerMueller
Advisor
Advisor
0 Kudos

Hi Satish,

No need to loop over the results to get the details.

You can use $expand on the ObjectReference and you will additional information added to the search result. An call would look like this:

https://{{server}}.sapjam.com//api/v1/OData/Search?Query='<searchTerm>'&$expand=ObjectReference

You can also $expand multiple relationships: e.g. "$expand=ObjectReference, Group".

Best,

   Rüdiger

satish_kandi
Explorer
0 Kudos

Hi Rudiger,

Isn't the expand operation a separate http call for each object reference returned from the initial search results call?

Thanks,

Satish

RuedigerMueller
Advisor
Advisor
0 Kudos

No - you can do this with a single http request. Simply append the expand query option to the URI like in the example I provided above.

satish_kandi
Explorer
0 Kudos

Thank you. That was really helpful.

Answers (1)

Answers (1)

former_member28480
Discoverer
0 Kudos

Can someone kindly reply.  We are in the middle of an implementation and working with a customer. 

Thanks in advance,

Tony