Service Manager / Service Center User Discussions
cancel

Rest API to retrieve a CLOB field is not working

Highlighted
Norita Super Contributor.
Super Contributor.

Rest API to retrieve a CLOB field is not working

Hello,   I'm working with an API REST integration  and I'm trying a query to retrieve the field description from the activity table but it doesn`t work

In the activity table  the  description field is CLOB 

For example, looking at the image below, I want to retrieve the text :  Buen dia por favor completar el pedido 1-678344588006

CLOB_1.jpgI've tried with this  GET action :  

http://10.75.255.51:13080/SM/9/rest/actividadesIM?query=number="IM00901344" and type="Open"

The response is :
CLOB_2.jpg

I don't have the description...  please ¿can anybody help me?  Thanks in advance.

Good questions will have Good answers
3 REPLIES
Micro Focus Expert
Micro Focus Expert

Re: Rest API to retrieve a CLOB field is not working

Hello Norita,
Hope you are doing well.

This is the information found in the Help Server for 9.52 (I choose to search on this deliberately):
https://docs.microfocus.com/SM/9.52/Hybrid/Content/webservicesguide/rest_syntax.htm

However, I believe that you are missing the description since you are not including it on the request. 

Please retry adding it in the path.

Best regards!

josh Trusted Contributor.
Trusted Contributor.

Re: Rest API to retrieve a CLOB field is not working

Try this instead:

http://10.75.255.51:13080/SM/9/rest/actividadesIM/IM00901344

 

I believe the format you had before with "?query" will always try to return a list. The format above will try to return the record itself.

Acclaimed Contributor.. Jacob Heubner Acclaimed Contributor..
Acclaimed Contributor..

Re: Rest API to retrieve a CLOB field is not working

you can also add '&view=expand' to the end of your REST query that returns a list as well.

http://10.75.255.51:13080/SM/9/rest/actividadesIM?query=number="IM00901344" and type="Open"&view=expand