How should i extract the title of the moduleContent of requirments using REST API
When I call this: https://localhost:9443/rm/publish/resources?resourceURI=-I4ezTYYEeqPqJ6cXaaMqA for highlighted resource, i get only a partial text content, i.e., text content is cropped after some level.
One answer
This is expected. dataSource/artifact/moduleContext/contextBinding/title returns only first 256 characters. To print the requirement completely (with formatting), you must use "text" artifact type (that is, do a GET request on https://localhost:9443/rm/publish/text?resourceURI=-I4ezTYYEeqPqJ6cXaaMqA) and use dataSource/artifact/content/text/richTextBody/div. You see the length limitation when you print dataSource/artifact/title (for resources or text artifact) as well.
Comments
Thank you so much. I'm net to Jazz and REST API. I wonder whether you can explain bit more.
https://localhost:9443/rm/publish/text?resourceURI=_-I4ezTYYEeqPqJ6cXaaMqA&ptext=true or
https://localhost:9443/rm/publish/resources?resourceURI=_-I4ezTYYEeqPqJ6cXaaMqA&ptext=true) and use dataSource/artifact/primaryText
Hmmm.... I think I did explain what i wanted in a wrong way. I want to take the text within <rrm:title> .....tex tex text </rrm:title>
For title attribute, the maximum number of characters is limited to 256.
Thank you for letting me know. I'll check whether there is any other way to get full title data using Rest API