[SOLVED] RestApi endpoint for 'UID'

Is there a restApi endpoint I can use to get (a richtext field of a ) content item if I have the UID ?

Similar to plone.api.content.get( UID=Something )

UPDATE; It is OK to get the text without any markup, if that is an option.

You can fetch /resolveuid/UID to get a redirect to the content item's current path, and then get /++api++/path/to/item to get that item's REST API representation.

Thanks. I hoped there was something 'more direct'.

My current approach is to search for all and slice the result. Works, but does not feel 'optimal'. I tested a (jQuery) script, and it seems to work:

$('#form-widgets-related_sow_section').on( "change", function() {
if ($( this ).val() != '--NOVALUE--' )     {
  $searchval = $('body').attr("data-portal-url") + '/@search?fullobjects=1&UID='+ $( this ).val() ;

  $.ajax({
    url: $searchval,
    contentType: "application/json",
    dataType: 'json',
    headers: {'Accept': 'application/json'},
    success: function(result){
      //console.log(result.items[0]);
      $('#sow_text_add').remove();
      $( "#formfield-form-widgets-related_sow_section").append('<div id="sow_text_add">' + result.items[0].bodytext.data + '</div>');
    }
  })

}

To me, searching by UID and returning fullobjects sounds like a reasonable way to do it.

Be careful: The RESTAPI has an unfixed bug that affects richtext fields of whatever mime_type. If your content uses mime_types other than html the RESTAPI is unusable until this bug is fixed: