Skip to content

/AWS1/IF_AG2=>CREATEPRODUCTRESTENDPTPAGE()

About CreateProductRestEndpointPage

Creates a product REST endpoint page for a portal product.

Method Signature

METHODS /AWS1/IF_AG2~CREATEPRODUCTRESTENDPTPAGE
  IMPORTING
    !IO_DISPLAYCONTENT TYPE REF TO /AWS1/CL_AG2ENDPTDISPLAYCONT OPTIONAL
    !IV_PORTALPRODUCTID TYPE /AWS1/AG2__STRING OPTIONAL
    !IO_RESTENDPOINTIDENTIFIER TYPE REF TO /AWS1/CL_AG2RESTENDPOINTID OPTIONAL
    !IV_TRYITSTATE TYPE /AWS1/AG2TRYITSTATE OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_ag2creprdrestendptp01
  RAISING
    /AWS1/CX_AG2ACCESSDENIEDEX
    /AWS1/CX_AG2BADREQUESTEX
    /AWS1/CX_AG2NOTFOUNDEXCEPTION
    /AWS1/CX_AG2TOOMANYREQUESTSEX
    /AWS1/CX_AG2CLIENTEXC
    /AWS1/CX_AG2SERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_portalproductid TYPE /AWS1/AG2__STRING /AWS1/AG2__STRING

The portal product identifier.

io_restendpointidentifier TYPE REF TO /AWS1/CL_AG2RESTENDPOINTID /AWS1/CL_AG2RESTENDPOINTID

The REST endpoint identifier.

Optional arguments:

io_displaycontent TYPE REF TO /AWS1/CL_AG2ENDPTDISPLAYCONT /AWS1/CL_AG2ENDPTDISPLAYCONT

The content of the product REST endpoint page.

iv_tryitstate TYPE /AWS1/AG2TRYITSTATE /AWS1/AG2TRYITSTATE

The try it state of the product REST endpoint page.

RETURNING

oo_output TYPE REF TO /aws1/cl_ag2creprdrestendptp01 /AWS1/CL_AG2CREPRDRESTENDPTP01

Domain /AWS1/RT_ACCOUNT_ID
Primitive Type NUMC

Examples

Syntax Example

This is an example of the syntax for calling the method. It includes every possible argument and initializes every possible value. The data provided is not necessarily semantically accurate (for example the value "string" may be provided for something that is intended to be an instance ID, or in some cases two arguments may be mutually exclusive). The syntax shows the ABAP syntax for creating the various data structures.

DATA(lo_result) = lo_client->createproductrestendptpage(
  io_displaycontent = new /aws1/cl_ag2endptdisplaycont(
    io_none = new /aws1/cl_ag2none( )
    io_overrides = new /aws1/cl_ag2displaycontovrds(
      iv_body = |string|
      iv_endpoint = |string|
      iv_operationname = |string|
    )
  )
  io_restendpointidentifier = new /aws1/cl_ag2restendpointid(
    io_identifierparts = new /aws1/cl_ag2identifierparts(
      iv_method = |string|
      iv_path = |string|
      iv_restapiid = |string|
      iv_stage = |string|
    )
  )
  iv_portalproductid = |string|
  iv_tryitstate = |string|
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  lo_endpointdisplaycontentr = lo_result->get_displaycontent( ).
  IF lo_endpointdisplaycontentr IS NOT INITIAL.
    lv___stringmin1max32768 = lo_endpointdisplaycontentr->get_body( ).
    lv___stringmin1max1024 = lo_endpointdisplaycontentr->get_endpoint( ).
    lv___stringmin1max255 = lo_endpointdisplaycontentr->get_operationname( ).
  ENDIF.
  lv___timestampiso8601 = lo_result->get_lastmodified( ).
  lv___stringmin20max2048 = lo_result->get_productrestendptpagearn( ).
  lv___stringmin10max30patte = lo_result->get_productrestendptpageid( ).
  lo_restendpointidentifier = lo_result->get_restendpointidentifier( ).
  IF lo_restendpointidentifier IS NOT INITIAL.
    lo_identifierparts = lo_restendpointidentifier->get_identifierparts( ).
    IF lo_identifierparts IS NOT INITIAL.
      lv___stringmin1max20 = lo_identifierparts->get_method( ).
      lv___stringmin1max4096 = lo_identifierparts->get_path( ).
      lv___stringmin1max50 = lo_identifierparts->get_restapiid( ).
      lv___stringmin1max128 = lo_identifierparts->get_stage( ).
    ENDIF.
  ENDIF.
  lv_status = lo_result->get_status( ).
  lo_statusexception = lo_result->get_statusexception( ).
  IF lo_statusexception IS NOT INITIAL.
    lv___stringmin1max256 = lo_statusexception->get_exception( ).
    lv___stringmin1max2048 = lo_statusexception->get_message( ).
  ENDIF.
  lv_tryitstate = lo_result->get_tryitstate( ).
ENDIF.