/AWS1/IF_DZN=>SEARCHLISTINGS()¶
About SearchListings¶
Searches listings in Amazon DataZone.
SearchListings is a powerful capability that enables users to discover and explore published assets and data products across their organization. It provides both basic and advanced search functionality, allowing users to find resources based on names, descriptions, metadata, and other attributes. SearchListings also supports filtering using various criteria such as creation date, owner, or status. This API is essential for making the wealth of data resources in an organization discoverable and usable, helping users find the right data for their needs quickly and efficiently.
SearchListings returns results in a paginated format. When the result set is large, the response will include a nextToken, which can be used to retrieve the next page of results.
The SearchListings API gives users flexibility in specifying what kind of search is run.
To run a free-text search, the searchText parameter must be supplied. By default, all searchable fields are indexed for semantic search and will return semantic matches for SearchListings queries. To prevent semantic search indexing for a custom form attribute, see the CreateFormType API documentation. To run a lexical search query, enclose the query with double quotes (""). This will disable semantic search even for fields that have semantic search enabled and will only return results that contain the keywords wrapped by double quotes (order of tokens in the query is not enforced). Free-text search is supported for all attributes annotated with @amazon.datazone#searchable.
To run a filtered search, provide filter clause using the filters parameter. To filter on glossary terms, use the special attribute __DataZoneGlossaryTerms.
To find out whether an attribute has been annotated and indexed for a given search type, use the GetFormType API to retrieve the form containing the attribute.
Method Signature¶
METHODS /AWS1/IF_DZN~SEARCHLISTINGS
IMPORTING
!IV_DOMAINIDENTIFIER TYPE /AWS1/DZNDOMAINID OPTIONAL
!IV_SEARCHTEXT TYPE /AWS1/DZNSTRING OPTIONAL
!IT_SEARCHIN TYPE /AWS1/CL_DZNSEARCHINITEM=>TT_SEARCHINLIST OPTIONAL
!IV_MAXRESULTS TYPE /AWS1/DZNMAXRESULTS OPTIONAL
!IV_NEXTTOKEN TYPE /AWS1/DZNPAGINATIONTOKEN OPTIONAL
!IO_FILTERS TYPE REF TO /AWS1/CL_DZNFILTERCLAUSE OPTIONAL
!IT_AGGREGATIONS TYPE /AWS1/CL_DZNAGGRLISTITEM=>TT_AGGREGATIONLIST OPTIONAL
!IO_SORT TYPE REF TO /AWS1/CL_DZNSEARCHSORT OPTIONAL
!IT_ADDITIONALATTRIBUTES TYPE /AWS1/CL_DZNSRCHOUTADDLATTRS_W=>TT_SEARCHOUTPUTADDLATTRIBUTES OPTIONAL
RETURNING
VALUE(OO_OUTPUT) TYPE REF TO /aws1/cl_dznsrchlistingsoutput
RAISING
/AWS1/CX_DZNACCESSDENIEDEX
/AWS1/CX_DZNTHROTTLINGEX
/AWS1/CX_DZNUNAUTHORIZEDEX
/AWS1/CX_DZNINTERNALSERVEREX
/AWS1/CX_DZNVALIDATIONEX
/AWS1/CX_DZNCLIENTEXC
/AWS1/CX_DZNSERVEREXC
/AWS1/CX_RT_TECHNICAL_GENERIC
/AWS1/CX_RT_SERVICE_GENERIC.
IMPORTING¶
Required arguments:¶
iv_domainidentifier TYPE /AWS1/DZNDOMAINID /AWS1/DZNDOMAINID¶
The identifier of the domain in which to search listings.
Optional arguments:¶
iv_searchtext TYPE /AWS1/DZNSTRING /AWS1/DZNSTRING¶
Specifies the text for which to search.
it_searchin TYPE /AWS1/CL_DZNSEARCHINITEM=>TT_SEARCHINLIST TT_SEARCHINLIST¶
The details of the search.
iv_maxresults TYPE /AWS1/DZNMAXRESULTS /AWS1/DZNMAXRESULTS¶
The maximum number of results to return in a single call to
SearchListings. When the number of results to be listed is greater than the value ofMaxResults, the response contains aNextTokenvalue that you can use in a subsequent call toSearchListingsto list the next set of results.
iv_nexttoken TYPE /AWS1/DZNPAGINATIONTOKEN /AWS1/DZNPAGINATIONTOKEN¶
When the number of results is greater than the default value for the
MaxResultsparameter, or if you explicitly specify a value forMaxResultsthat is less than the number of results, the response includes a pagination token namedNextToken. You can specify thisNextTokenvalue in a subsequent call toSearchListingsto list the next set of results.
io_filters TYPE REF TO /AWS1/CL_DZNFILTERCLAUSE /AWS1/CL_DZNFILTERCLAUSE¶
Specifies the filters for the search of listings.
it_aggregations TYPE /AWS1/CL_DZNAGGRLISTITEM=>TT_AGGREGATIONLIST TT_AGGREGATIONLIST¶
Enables you to specify one or more attributes to compute and return counts grouped by field values.
io_sort TYPE REF TO /AWS1/CL_DZNSEARCHSORT /AWS1/CL_DZNSEARCHSORT¶
Specifies the way for sorting the search results.
it_additionalattributes TYPE /AWS1/CL_DZNSRCHOUTADDLATTRS_W=>TT_SEARCHOUTPUTADDLATTRIBUTES TT_SEARCHOUTPUTADDLATTRIBUTES¶
Specifies additional attributes for the search.
RETURNING¶
oo_output TYPE REF TO /aws1/cl_dznsrchlistingsoutput /AWS1/CL_DZNSRCHLISTINGSOUTPUT¶
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->searchlistings(
io_filters = new /aws1/cl_dznfilterclause(
io_filter = new /aws1/cl_dznfilter(
iv_attribute = |string|
iv_value = |string|
)
it_and = VALUE /aws1/cl_dznfilterclause=>tt_filterlist(
(
new /aws1/cl_dznfilterclause(
io_filter = new /aws1/cl_dznfilter(
iv_attribute = |string|
iv_value = |string|
)
it_or = VALUE /aws1/cl_dznfilterclause=>tt_filterlist(
)
)
)
)
it_or = VALUE /aws1/cl_dznfilterclause=>tt_filterlist(
(
new /aws1/cl_dznfilterclause(
io_filter = new /aws1/cl_dznfilter(
iv_attribute = |string|
iv_value = |string|
)
it_and = VALUE /aws1/cl_dznfilterclause=>tt_filterlist(
)
)
)
)
)
io_sort = new /aws1/cl_dznsearchsort(
iv_attribute = |string|
iv_order = |string|
)
it_additionalattributes = VALUE /aws1/cl_dznsrchoutaddlattrs_w=>tt_searchoutputaddlattributes(
( new /aws1/cl_dznsrchoutaddlattrs_w( |string| ) )
)
it_aggregations = VALUE /aws1/cl_dznaggrlistitem=>tt_aggregationlist(
(
new /aws1/cl_dznaggrlistitem(
iv_attribute = |string|
iv_displayvalue = |string|
)
)
)
it_searchin = VALUE /aws1/cl_dznsearchinitem=>tt_searchinlist(
( new /aws1/cl_dznsearchinitem( |string| ) )
)
iv_domainidentifier = |string|
iv_maxresults = 123
iv_nexttoken = |string|
iv_searchtext = |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_items( ) into lo_row.
lo_row_1 = lo_row.
IF lo_row_1 IS NOT INITIAL.
lo_assetlistingitem = lo_row_1->get_assetlisting( ).
IF lo_assetlistingitem IS NOT INITIAL.
lv_listingid = lo_assetlistingitem->get_listingid( ).
lv_revision = lo_assetlistingitem->get_listingrevision( ).
lv_assetname = lo_assetlistingitem->get_name( ).
lv_assetid = lo_assetlistingitem->get_entityid( ).
lv_revision = lo_assetlistingitem->get_entityrevision( ).
lv_typename = lo_assetlistingitem->get_entitytype( ).
lv_description = lo_assetlistingitem->get_description( ).
lv_createdat = lo_assetlistingitem->get_createdat( ).
lv_createdby = lo_assetlistingitem->get_listingcreatedby( ).
lv_updatedby = lo_assetlistingitem->get_listingupdatedby( ).
LOOP AT lo_assetlistingitem->get_glossaryterms( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_glossarytermname = lo_row_3->get_name( ).
lv_shortdescription = lo_row_3->get_shortdescription( ).
ENDIF.
ENDLOOP.
LOOP AT lo_assetlistingitem->get_governedglossaryterms( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_glossarytermname = lo_row_3->get_name( ).
lv_shortdescription = lo_row_3->get_shortdescription( ).
ENDIF.
ENDLOOP.
lv_projectid = lo_assetlistingitem->get_owningprojectid( ).
lo_assetlistingitemadditio = lo_assetlistingitem->get_additionalattributes( ).
IF lo_assetlistingitemadditio IS NOT INITIAL.
lv_forms = lo_assetlistingitemadditio->get_forms( ).
LOOP AT lo_assetlistingitemadditio->get_matchrationale( ) into lo_row_4.
lo_row_5 = lo_row_4.
IF lo_row_5 IS NOT INITIAL.
LOOP AT lo_row_5->get_textmatches( ) into lo_row_6.
lo_row_7 = lo_row_6.
IF lo_row_7 IS NOT INITIAL.
lv_attribute = lo_row_7->get_attribute( ).
lv_string = lo_row_7->get_text( ).
LOOP AT lo_row_7->get_matchoffsets( ) into lo_row_8.
lo_row_9 = lo_row_8.
IF lo_row_9 IS NOT INITIAL.
lv_integer = lo_row_9->get_startoffset( ).
lv_integer = lo_row_9->get_endoffset( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDLOOP.
ENDIF.
ENDLOOP.
LOOP AT lo_assetlistingitemadditio->get_latsttimeseriesdataptf00( ) into lo_row_10.
lo_row_11 = lo_row_10.
IF lo_row_11 IS NOT INITIAL.
lv_timeseriesformname = lo_row_11->get_formname( ).
lv_formtypeidentifier = lo_row_11->get_typeidentifier( ).
lv_revision = lo_row_11->get_typerevision( ).
lv_timestamp = lo_row_11->get_timestamp( ).
lv_string = lo_row_11->get_contentsummary( ).
lv_datapointidentifier = lo_row_11->get_id( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
lo_dataproductlistingitem = lo_row_1->get_dataproductlisting( ).
IF lo_dataproductlistingitem IS NOT INITIAL.
lv_listingid = lo_dataproductlistingitem->get_listingid( ).
lv_revision = lo_dataproductlistingitem->get_listingrevision( ).
lv_dataproductname = lo_dataproductlistingitem->get_name( ).
lv_dataproductid = lo_dataproductlistingitem->get_entityid( ).
lv_revision = lo_dataproductlistingitem->get_entityrevision( ).
lv_description = lo_dataproductlistingitem->get_description( ).
lv_createdat = lo_dataproductlistingitem->get_createdat( ).
lv_createdby = lo_dataproductlistingitem->get_listingcreatedby( ).
lv_updatedby = lo_dataproductlistingitem->get_listingupdatedby( ).
LOOP AT lo_dataproductlistingitem->get_glossaryterms( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_glossarytermname = lo_row_3->get_name( ).
lv_shortdescription = lo_row_3->get_shortdescription( ).
ENDIF.
ENDLOOP.
lv_projectid = lo_dataproductlistingitem->get_owningprojectid( ).
lo_dataproductlistingitema = lo_dataproductlistingitem->get_additionalattributes( ).
IF lo_dataproductlistingitema IS NOT INITIAL.
lv_forms = lo_dataproductlistingitema->get_forms( ).
LOOP AT lo_dataproductlistingitema->get_matchrationale( ) into lo_row_4.
lo_row_5 = lo_row_4.
IF lo_row_5 IS NOT INITIAL.
LOOP AT lo_row_5->get_textmatches( ) into lo_row_6.
lo_row_7 = lo_row_6.
IF lo_row_7 IS NOT INITIAL.
lv_attribute = lo_row_7->get_attribute( ).
lv_string = lo_row_7->get_text( ).
LOOP AT lo_row_7->get_matchoffsets( ) into lo_row_8.
lo_row_9 = lo_row_8.
IF lo_row_9 IS NOT INITIAL.
lv_integer = lo_row_9->get_startoffset( ).
lv_integer = lo_row_9->get_endoffset( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDLOOP.
ENDIF.
ENDLOOP.
ENDIF.
LOOP AT lo_dataproductlistingitem->get_items( ) into lo_row_12.
lo_row_13 = lo_row_12.
IF lo_row_13 IS NOT INITIAL.
lv_listingid = lo_row_13->get_listingid( ).
lv_revision = lo_row_13->get_listingrevision( ).
LOOP AT lo_row_13->get_glossaryterms( ) into lo_row_2.
lo_row_3 = lo_row_2.
IF lo_row_3 IS NOT INITIAL.
lv_glossarytermname = lo_row_3->get_name( ).
lv_shortdescription = lo_row_3->get_shortdescription( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDLOOP.
ENDIF.
ENDIF.
ENDLOOP.
lv_paginationtoken = lo_result->get_nexttoken( ).
lv_integer = lo_result->get_totalmatchcount( ).
LOOP AT lo_result->get_aggregates( ) into lo_row_14.
lo_row_15 = lo_row_14.
IF lo_row_15 IS NOT INITIAL.
lv_attribute = lo_row_15->get_attribute( ).
lv_aggregationdisplayvalue = lo_row_15->get_displayvalue( ).
LOOP AT lo_row_15->get_items( ) into lo_row_16.
lo_row_17 = lo_row_16.
IF lo_row_17 IS NOT INITIAL.
lv_aggregationattributeval = lo_row_17->get_value( ).
lv_integer = lo_row_17->get_count( ).
lv_aggregationattributedis = lo_row_17->get_displayvalue( ).
ENDIF.
ENDLOOP.
ENDIF.
ENDLOOP.
ENDIF.