Try OpenEdge Now
skip to main content
Online Help
Introducing OpenEdge REST : Concepts : REST service annotations : REST main annotations
 
REST main annotations
REST main annotation makes an ABL procedure or class, or an external procedure file available as a REST resource. This annotation must precede any ABL statement in the procedure or class file.
The illustration below provides an example of REST main annotation:
@openapi.openedge.export FILE(type="REST", executionMode="{external | single-run | singleton}", useReturnValue="{true | false}", writeDataSetBeforeImage="{true | false}").
File
This keyword specifies that the annotation applies to an ABL class or procedure level. This is a mandatory attribute for main annotation.
type
This attribute specifies the type of defined service such as REST for a REST service or ESB for an ESB service. This is a mandatory attribute.
executionMode
This attribute specifies how the ABL class or procedure, or an external procedure runs. If you specify the value as EXTERNAL, the procedure runs externally, the value SINGLE-RUN allows you to call internal procedures and user defined functions in a procedure file, and the value SINGLETON allows you to call methods in a class file or internal procedures in a procedure file. This is a mandatory attribute.
useReturnValue
This attribute specifies whether a return string is used for procedures. The default value is false. This is an optional attribute.
writeDataSetBeforeImage
This attribute specifies whether before-image data is written out when ProDataSet parameters are serialized as XML. Before-image is not supported for JSON. The only valid value for REST is false. This is an optional attribute.