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.
"""
<ds:moduleContext>
<rrm:contextBinding>
<rrm:about>
https://localhost:9443/rm/resources/-I4ezTYYEeqPqJ6cXaaMqA
</rrm:about>
<rrm:identifier>27</rrm:identifier>
<rrm:title>
Second testing change. Im making a change for testing. This use case starts when the actor does something. An actor always initiates use cases. The use case describes what the actor does and what the system does in response. It is phrased in the form of a
"""
But the title content should be this:
"""
Second testing change. Im making a change for testing. This use case starts when the actor does something. An actor always initiates use cases. The use case describes what the actor does and what the system does in response. It is phrased in the form of a dialog between the actor and the system.
"""
How should i change my query (https://localhost:9443/rm/publish/resources?resourceURI=_-I4ezTYYEeqPqJ6cXaaMqA) to get the full text content of the tile?
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.