Welcome Serena Central users! CLICK HERE
The migration of the Serena Central community is currently underway. Be sure to read THIS MESSAGE to get your new login set up to access your account.
Highlighted
Norita Super Contributor.
Super Contributor.
504 views

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
Tags (3)
0 Likes
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!

If you find that this or any other post resolves your issue, please be sure to mark it as an accepted solution. If you are satisfied with anyone’s response please remember to give them a LIKE by clicking on the Thumb and show your appreciation.
0 Likes
Super Contributor.. josh Super Contributor..
Super 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.

0 Likes
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

The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.