Forum Discussion

nrajesh's avatar
nrajesh
Guide
7 years ago

REST API search messages by Metadata

Hi,

 

The GET message by metadata is not working suddenly, it was working fine till yesterday. In lithium api browser its returning data for the same metadata query.

 

Lithium - API Browser – Returning Data

select * from messages where c_cust_id='test - 321'

 

API Call from Our application

 

url1 : https://test.abc.com/api/2.0/search?q=select+%2A+from+messages+where+c_cust_id%3D%27Test+-+321%27

url2 : https://test.abc.com/restapi/vc/search/messages?q=custom.id:'Test - 321'

Headers :  Content-Type - application/json

               client-id - VvhCplkjSJLJLKAkjakHLlkjALjgSLkhkjkSLKHLSasktrreyale1I=

 

 

response : {"status":"success","message":"","http_code":200,"data":{"type":"messages","list_item_type":"message","size":0,"items":[]},"metadata":{}}

 

  • nrajesh- If it was working fine till yesterday and also returning the result in API browser, i will suggest you to reach out to lithium support. As your call returning status code 200 which means it working fine without any issue, however the API is not returning the result.