Skip to content

/AWS1/IF_BDC=>SEARCHREGISTRYRECORDS()

About SearchRegistryRecords

Searches for registry records using semantic, lexical, or hybrid queries. Returns metadata for matching records ordered by relevance within the specified registry.

Method Signature

METHODS /AWS1/IF_BDC~SEARCHREGISTRYRECORDS
  IMPORTING
    !IV_SEARCHQUERY TYPE /AWS1/BDCSTRING OPTIONAL
    !IT_REGISTRYIDS TYPE /AWS1/CL_BDCREGISTRYIDLIST_W=>TT_REGISTRYIDLIST OPTIONAL
    !IV_MAXRESULTS TYPE /AWS1/BDCINTEGER OPTIONAL
    !IO_FILTERS TYPE REF TO /AWS1/CL_RT_DOCUMENT OPTIONAL
  RETURNING
    VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_bdcsearchregrecsrsp
  RAISING
    /AWS1/CX_BDCACCESSDENIEDEX
    /AWS1/CX_BDCINTERNALSERVEREX
    /AWS1/CX_BDCRESOURCENOTFOUNDEX
    /AWS1/CX_BDCTHROTTLINGEX
    /AWS1/CX_BDCUNAUTHORIZEDEX
    /AWS1/CX_BDCVALIDATIONEX
    /AWS1/CX_BDCCLIENTEXC
    /AWS1/CX_BDCSERVEREXC
    /AWS1/CX_RT_TECHNICAL_GENERIC
    /AWS1/CX_RT_SERVICE_GENERIC.

IMPORTING

Required arguments:

iv_searchquery TYPE /AWS1/BDCSTRING /AWS1/BDCSTRING

The search query to find matching registry records.

it_registryids TYPE /AWS1/CL_BDCREGISTRYIDLIST_W=>TT_REGISTRYIDLIST TT_REGISTRYIDLIST

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

Optional arguments:

iv_maxresults TYPE /AWS1/BDCINTEGER /AWS1/BDCINTEGER

The maximum number of records to return in a single call. Valid values are 1 through 20. The default value is 10.

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

A metadata filter expression to narrow search results. Uses structured JSON operators including field-level operators ($eq, $ne, $in) and logical operators ($and, $or) on filterable fields (name, descriptorType, version). For example, to filter by descriptor type: {"descriptorType": {"$eq": "MCP"}}. To combine filters: {"$and": [{"descriptorType": {"$eq": "MCP"}}, {"name": {"$eq": "my-tool"}}]}.

RETURNING

oo_output TYPE REF TO /aws1/cl_bdcsearchregrecsrsp /AWS1/CL_BDCSEARCHREGRECSRSP

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->searchregistryrecords(
  io_filters = /AWS1/CL_RT_DOCUMENT=>FROM_JSON_STR( |\{"foo":"this is a JSON object..."\}| )
  it_registryids = VALUE /aws1/cl_bdcregistryidlist_w=>tt_registryidlist(
    ( new /aws1/cl_bdcregistryidlist_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_descriptortype = lo_row_1->get_descriptortype( ).
      lo_descriptors = lo_row_1->get_descriptors( ).
      IF lo_descriptors IS NOT INITIAL.
        lo_mcpdescriptor = lo_descriptors->get_mcp( ).
        IF lo_mcpdescriptor IS NOT INITIAL.
          lo_serverdefinition = lo_mcpdescriptor->get_server( ).
          IF lo_serverdefinition IS NOT INITIAL.
            lv_schemaversion = lo_serverdefinition->get_schemaversion( ).
            lv_inlinecontent = lo_serverdefinition->get_inlinecontent( ).
          ENDIF.
          lo_toolsdefinition = lo_mcpdescriptor->get_tools( ).
          IF lo_toolsdefinition IS NOT INITIAL.
            lv_schemaversion = lo_toolsdefinition->get_protocolversion( ).
            lv_inlinecontent = lo_toolsdefinition->get_inlinecontent( ).
          ENDIF.
        ENDIF.
        lo_a2adescriptor = lo_descriptors->get_a2a( ).
        IF lo_a2adescriptor IS NOT INITIAL.
          lo_agentcarddefinition = lo_a2adescriptor->get_agentcard( ).
          IF lo_agentcarddefinition IS NOT INITIAL.
            lv_schemaversion = lo_agentcarddefinition->get_schemaversion( ).
            lv_inlinecontent = lo_agentcarddefinition->get_inlinecontent( ).
          ENDIF.
        ENDIF.
        lo_customdescriptor = lo_descriptors->get_custom( ).
        IF lo_customdescriptor IS NOT INITIAL.
          lv_inlinecontent = lo_customdescriptor->get_inlinecontent( ).
        ENDIF.
        lo_agentskillsdescriptor = lo_descriptors->get_agentskills( ).
        IF lo_agentskillsdescriptor IS NOT INITIAL.
          lo_skillmddefinition = lo_agentskillsdescriptor->get_skillmd( ).
          IF lo_skillmddefinition IS NOT INITIAL.
            lv_inlinecontent = lo_skillmddefinition->get_inlinecontent( ).
          ENDIF.
          lo_skilldefinition = lo_agentskillsdescriptor->get_skilldefinition( ).
          IF lo_skilldefinition IS NOT INITIAL.
            lv_schemaversion = lo_skilldefinition->get_schemaversion( ).
            lv_inlinecontent = lo_skilldefinition->get_inlinecontent( ).
          ENDIF.
        ENDIF.
      ENDIF.
      lv_registryrecordversion = lo_row_1->get_version( ).
      lv_registryrecordstatus = lo_row_1->get_status( ).
      lv_datetimestamp = lo_row_1->get_createdat( ).
      lv_datetimestamp = lo_row_1->get_updatedat( ).
    ENDIF.
  ENDLOOP.
ENDIF.