Skip to content

/AWS1/IF_DOA=>LISTASSETS()

About ListAssets

Lists assets in the specified agent space

Method Signature

METHODS /AWS1/IF_DOA~LISTASSETS
  IMPORTING
    !IV_AGENTSPACEID TYPE /AWS1/DOAAGENTSPACEID OPTIONAL
    !IV_ASSETTYPE TYPE /AWS1/DOAASSETTYPE OPTIONAL
    !IV_UPDATEDAFTER TYPE /AWS1/DOATIMESTAMP OPTIONAL
    !IV_UPDATEDBEFORE TYPE /AWS1/DOATIMESTAMP OPTIONAL
    !IV_NEXTTOKEN TYPE /AWS1/DOANEXTTOKEN OPTIONAL
    !IV_MAXRESULTS TYPE /AWS1/DOAINTEGER OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_doalistassetsresponse
  RAISING
    /AWS1/CX_DOAACCESSDENIEDEX
    /AWS1/CX_DOACONFLICTEXCEPTION
    /AWS1/CX_DOACONTENTSIZEEXCDEX
    /AWS1/CX_DOAINTERNALSERVEREX
    /AWS1/CX_DOAINVALIDPARAMETEREX
    /AWS1/CX_DOARESOURCENOTFOUNDEX
    /AWS1/CX_DOASERVICEQUOTAEXCDEX
    /AWS1/CX_DOATHROTTLINGEX
    /AWS1/CX_DOAVLDTNEXCEPTION
    /AWS1/CX_DOACLIENTEXC
    /AWS1/CX_DOASERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_agentspaceid TYPE /AWS1/DOAAGENTSPACEID /AWS1/DOAAGENTSPACEID

The unique identifier for the agent space to list assets from

Optional arguments:

iv_assettype TYPE /AWS1/DOAASSETTYPE /AWS1/DOAASSETTYPE

Filter results to only assets of this type

iv_updatedafter TYPE /AWS1/DOATIMESTAMP /AWS1/DOATIMESTAMP

Filter results to only assets updated after this timestamp

iv_updatedbefore TYPE /AWS1/DOATIMESTAMP /AWS1/DOATIMESTAMP

Filter results to only assets updated before this timestamp

iv_nexttoken TYPE /AWS1/DOANEXTTOKEN /AWS1/DOANEXTTOKEN

Pagination token from a previous response to retrieve the next page of results

iv_maxresults TYPE /AWS1/DOAINTEGER /AWS1/DOAINTEGER

The maximum number of results to return in a single response

RETURNING

oo_output TYPE REF TO /aws1/cl_doalistassetsresponse /AWS1/CL_DOALISTASSETSRESPONSE

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->listassets(
  iv_agentspaceid = |string|
  iv_assettype = |string|
  iv_maxresults = 123
  iv_nexttoken = |string|
  iv_updatedafter = '20150101000000.0000000'
  iv_updatedbefore = '20150101000000.0000000'
).

This is an example of reading all possible response values

lo_result = lo_result.
IF lo_result IS NOT INITIAL.
  LOOP AT lo_result->get_items( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_resourceid = lo_row_1->get_assetid( ).
      lv_assettype = lo_row_1->get_assettype( ).
      lo_/aws1/cl_rt_document = lo_row_1->get_metadata( ).
      IF lo_/aws1/cl_rt_document IS NOT INITIAL.
      ENDIF.
      lv_integer = lo_row_1->get_version( ).
      lv_timestamp = lo_row_1->get_createdat( ).
      lv_timestamp = lo_row_1->get_updatedat( ).
    ENDIF.
  ENDLOOP.
  lv_nexttoken = lo_result->get_nexttoken( ).
ENDIF.