Skip to content

/AWS1/IF_TCR=>SEARCHDSCVREGISTRYRECORDS()

About SearchDiscoverableRegistryRecords

Searches the discoverable registry records in a registry using a natural language query. Returns metadata for the matching records ordered by relevance.

Method Signature

METHODS /AWS1/IF_TCR~SEARCHDSCVREGISTRYRECORDS
  IMPORTING
    !IV_SEARCHQUERY TYPE /AWS1/TCRSEARCHQUERY OPTIONAL
    !IT_REGISTRYIDS TYPE /AWS1/CL_TCRREGISTRYIDLIST_W=>TT_REGISTRYIDLIST OPTIONAL
    !IV_MAXRESULTS TYPE /AWS1/TCRINTEGER OPTIONAL
    !IO_FILTERS TYPE REF TO /AWS1/CL_RT_DOCUMENT OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_tcrsrchdscvregrecsrsp
  RAISING
    /AWS1/CX_TCRACCESSDENIEDEX
    /AWS1/CX_TCRINTERNALSERVEREX
    /AWS1/CX_TCRRESOURCENOTFOUNDEX
    /AWS1/CX_TCRTHROTTLINGEX
    /AWS1/CX_TCRUNAUTHEXCEPTION
    /AWS1/CX_TCRVLDTNEXCEPTION
    /AWS1/CX_TCRCLIENTEXC
    /AWS1/CX_TCRSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_searchquery TYPE /AWS1/TCRSEARCHQUERY /AWS1/TCRSEARCHQUERY

The natural language query to search for matching registry records.

it_registryids TYPE /AWS1/CL_TCRREGISTRYIDLIST_W=>TT_REGISTRYIDLIST TT_REGISTRYIDLIST

The registry identifiers to search within. Currently, you must specify exactly one registry identifier. You can provide either the full Amazon Web Services Resource Name (ARN) or the registry ID.

Optional arguments:

iv_maxresults TYPE /AWS1/TCRINTEGER /AWS1/TCRINTEGER

The maximum number of results to return. Valid values are 1 through 20. The default value is 10.

io_filters TYPE REF TO /AWS1/CL_RT_DOCUMENT /AWS1/CL_RT_DOCUMENT

An optional structured JSON metadata filter that narrows the search results. Supports the field-level operators $eq, $ne, and $in, and the logical operators $and and $or on filterable fields.

RETURNING

oo_output TYPE REF TO /aws1/cl_tcrsrchdscvregrecsrsp /AWS1/CL_TCRSRCHDSCVREGRECSRSP

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->searchdscvregistryrecords(
  io_filters = /AWS1/CL_RT_DOCUMENT=>FROM_JSON_STR( |\{"foo":"this is a JSON object..."\}| )
  it_registryids = VALUE /aws1/cl_tcrregistryidlist_w=>tt_registryidlist(
    ( new /aws1/cl_tcrregistryidlist_w( |string| ) )
  )
  iv_maxresults = 123
  iv_searchquery = |string|
).

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_registryrecords( ) into lo_row.
    lo_row_1 = lo_row.
    IF lo_row_1 IS NOT INITIAL.
      lv_registryarn = lo_row_1->get_registryarn( ).
      lv_registryrecordarn = lo_row_1->get_recordarn( ).
      lv_registryrecordid = lo_row_1->get_recordid( ).
      lv_registryrecordname = lo_row_1->get_name( ).
      lv_description = lo_row_1->get_description( ).
      lv_registryrecorddisplayna = lo_row_1->get_displayname( ).
      lv_recordtype = lo_row_1->get_recordtype( ).
      lo_descriptors = lo_row_1->get_descriptors( ).
      IF lo_descriptors IS NOT INITIAL.
        lo_mcpserverdescriptor = lo_descriptors->get_mcpserver( ).
        IF lo_mcpserverdescriptor IS NOT INITIAL.
          lv_descriptordata = lo_mcpserverdescriptor->get_data( ).
          lv_dataschemaversion = lo_mcpserverdescriptor->get_dataschemaversion( ).
          lo_mcpserveradditionaldata = lo_mcpserverdescriptor->get_additionaldata( ).
          IF lo_mcpserveradditionaldata IS NOT INITIAL.
            lo_mcptoolsdescriptor = lo_mcpserveradditionaldata->get_tools( ).
            IF lo_mcptoolsdescriptor IS NOT INITIAL.
              lv_descriptordata = lo_mcptoolsdescriptor->get_data( ).
              lv_dataschemaversion = lo_mcptoolsdescriptor->get_dataschemaversion( ).
            ENDIF.
          ENDIF.
          lo_descriptorsource = lo_mcpserverdescriptor->get_source( ).
          IF lo_descriptorsource IS NOT INITIAL.
            lo_descriptorsourcefromurl = lo_descriptorsource->get_fromurl( ).
            IF lo_descriptorsourcefromurl IS NOT INITIAL.
              lv_descriptorsourceurl = lo_descriptorsourcefromurl->get_url( ).
            ENDIF.
          ENDIF.
        ENDIF.
        lo_a2aagentcarddescriptor = lo_descriptors->get_a2aagentcard( ).
        IF lo_a2aagentcarddescriptor IS NOT INITIAL.
          lv_descriptordata = lo_a2aagentcarddescriptor->get_data( ).
          lv_dataschemaversion = lo_a2aagentcarddescriptor->get_dataschemaversion( ).
          lo_descriptorsource = lo_a2aagentcarddescriptor->get_source( ).
          IF lo_descriptorsource IS NOT INITIAL.
            lo_descriptorsourcefromurl = lo_descriptorsource->get_fromurl( ).
            IF lo_descriptorsourcefromurl IS NOT INITIAL.
              lv_descriptorsourceurl = lo_descriptorsourcefromurl->get_url( ).
            ENDIF.
          ENDIF.
        ENDIF.
        lo_agentskillsdefinitionde = lo_descriptors->get_agentskillsdefinition( ).
        IF lo_agentskillsdefinitionde IS NOT INITIAL.
          lv_descriptordata = lo_agentskillsdefinitionde->get_data( ).
          lv_dataschemaversion = lo_agentskillsdefinitionde->get_dataschemaversion( ).
          lo_agentskillsadditionalda = lo_agentskillsdefinitionde->get_additionaldata( ).
          IF lo_agentskillsadditionalda IS NOT INITIAL.
            lo_agentskillsmddescriptor = lo_agentskillsadditionalda->get_skillmd( ).
            IF lo_agentskillsmddescriptor IS NOT INITIAL.
              lv_descriptordata = lo_agentskillsmddescriptor->get_data( ).
              lv_dataschemaversion = lo_agentskillsmddescriptor->get_dataschemaversion( ).
              lo_descriptorsource = lo_agentskillsmddescriptor->get_source( ).
              IF lo_descriptorsource IS NOT INITIAL.
                lo_descriptorsourcefromurl = lo_descriptorsource->get_fromurl( ).
                IF lo_descriptorsourcefromurl IS NOT INITIAL.
                  lv_descriptorsourceurl = lo_descriptorsourcefromurl->get_url( ).
                ENDIF.
              ENDIF.
            ENDIF.
          ENDIF.
        ENDIF.
        lo_customdescriptor = lo_descriptors->get_custom( ).
        IF lo_customdescriptor IS NOT INITIAL.
          lv_descriptordata = lo_customdescriptor->get_data( ).
        ENDIF.
      ENDIF.
      lv_registryrecordversion = lo_row_1->get_recordversion( ).
      lv_registryrecordstatus = lo_row_1->get_status( ).
      lv_datetimestamp = lo_row_1->get_createdat( ).
      lv_datetimestamp = lo_row_1->get_updatedat( ).
    ENDIF.
  ENDLOOP.
ENDIF.