To make an internal procedure or user-defined function a REST resource, you must add an internal procedure annotation before the PROCEDURE or FUNCTION statement. Before you create an internal annotation, you must add a main REST annotation at the beginning of the source file in which you set the executionMode attribute to "SINGLE-RUN" or "SINGLETON"

The only syntactical difference between REST internal annotations and REST external annotations is that internal annotations do not include the FILE and executionMode attributes.

@openapi.openedge.export ( 
TYPE="REST"
[ , useReturnValue={ "TRUE" | "FALSE" }]
[ , writeDataSetBeforeImage={ "TRUE" | "FALSE"}] ).

TYPE

The value of this attribute is a comma separated list of types. If you are annotating an external procedure for use in REST service, the value of this attribute must include "REST".

useReturnValue

If "TRUE", specifies that a return string is used for procedures. If this option is not specified or if the value is "FALSE" , there will be no return string

writeDataSetBeforeImage

Not supported in this release. Attribute should be removed or set to "FALSE"

Also see Main REST annotations for more information.