REST List API Read MIME files of Root and Sub Entities

The REST List API Read MIME files of Sub Entities provides the ability to determine MIME files referenced by a sub entity and provide them as a zip stream. An example is a zip stream containing MIME files for a set of objects retrieved by a report.

Root Entity

Execute a specific report for root entities

URL Pattern

/list/{entity-identifier}/mimes/{report-name}

Method

GET and POST

Parameters

The parameters pageSize, startIndex, fields and qualificationFilter are supported. Other List Read for sub entities parameters are ignored.
Additional parameters of an entity report are report specific and can be obtained from the report service itself.

Media types

application/octet-stream

Result

A zip stream with MIME files including the folder structure from target system.

Parameters

Beneath the query dependent parameters below are the general parameters which can be passed to control the query's result:

General list query parameters

Parameter

Required

Default

Datatype

Parameter description

startIndex

no

0

Integer

see REST List API Read for Root Entities

pageSize

no

100

Integer

see REST List API Read for Root Entities

qualificationFilter

no

String

This parameter allows to restrict the output to certain qualifications. An example would be a filter so that only Euro and Dollar prices for the customer Heiler are returned.

The filter string is a comma-separated list of qualification settings. A qualification setting is a qualification name followed by a comma-separated list of values which is put into parentheses The qualification name is defined in the repository and is included in the Meta-API.

Example for prices in Euro and US-Dollar and customer Heiler:
qualificationFilter=currency(EUR,USD),customer(Heiler)

fields

no

String

Comma-separated list of fields to be provided as result. Please see the REST Field Qualification as well as REST Transition Fields for details on the syntax of this parameter. It is usually used for specifying which field contains the mime value.

Examples

Execute the report byLookup and retrieve the MIME files referenced by lookup "Apps" using GET

curl -u rest:heiler -H "Accept: application/octet-stream" -X GET http://localhost:1512/rest/V1.0/list/LookupValue/byLookup?lookup=Apps&fields=LookupValue.MIMEValue

Execute the report byLookup and retrieve the MIME files referenced by LookupValue by specifying the field using POST

curl -u rest:heiler -H "Accept: application/octet-stream" --data "lookup=Apps&fields=LookupValue.MIMEValue" http://localhost:1512/rest/V1.0/list/LookupValue/byLookup

Rest Java Client Example

Following code retrieves first 100 MIME values including the empty ones from the lookup "Apps".

Usage example for the client API
//Create and login to the client...
RestClient restClient = new RestClient();
 
 
//Create and parameterize the report query you want to execute...
ReportQuery reportQuery = new ReportQuery( "byLookup" ).addParameterValue( "lookup", "Apps" );
 
 
//Create and parameterize the list request
ListReadRequest mimeZipRequest = restClient.createListReadRequest();
InputStream mimeZipStream = mimeZipRequest.setPageSize( 100 )
.setStartIndex( 0 )
.setFields( "LookupValue.MIMEValue" )
.getRootMIMEs( "LookupValue", reportQuery );

Sub Entity

Execute a specific report for sub root entities

URL Pattern

/list/{entity-identifier}/{sub-entity-identifier}/mimes/{report-name}

Method

GET and POST

Parameters

The parameters pageSize, startIndex, fields and qualificationFilter are supported. Other List Read for sub entities parameters are ignored.
Additional parameters of an entity report are report specific and can be obtained from the report service itself.

Media types

application/octet-stream

Result

A zip stream with MIME files including the folder structure from target system.

Parameters

The parameters used here are same as that of root entities described above.

Additional parameters

There is an additional optional parameter to use in the calls for Characteristic MIME values.

Additional parameters

includeUnavailable

no

false

Boolean

Allows to return MIME files for available AND unavailable characteristics. Default value is false and means that only available characteristics will be considered.

Parameter fields is ignored in the calls for Characteristic MIME values.

Read more about Characteristic values in KnowledgeBase → Characteristics - Dynamic data model → Characteristic values.

Examples

Execute the report byCatalog and retrieve the MIME files referenced by Article characteristic values for items of MASTER catalog using GET

curl -u rest:heiler -H "Accept: application/octet-stream" -X GET http://localhost:1512/rest/V2.0/list/Article/ArticleCharacteristicValue/mimes/byCatalog

Execute the report bySearch and retrieve the MIME files referenced by Article characteristic values for specific item using GET

curl -u rest:heiler -H "Accept: application/octet-stream" -X GET http://localhost:1512/rest/V2.0/list/Article/ArticleCharacteristicValue/mimes/bySearch?query=Article.SupplierAID = "ITEM_WITH_CHARACTERISTIC"

Execute the report bySearch and retrieve the MIME files referenced by Variant characteristic values for specific variant using GET

curl -u rest:heiler -H "Accept: application/octet-stream" -X GET http://localhost:1512/rest/V2.0/list/Variant/VariantCharacteristicValue/mimes/bySearch?query=Variant.VariantNo equals "VARIANT_WITH_CHARACTERISTIC"

Execute the report byStructureGroup and retrieve the MIME files referenced by Article characteristic values qualified by characteristic record key using GET

curl -u rest:heiler -H "Accept: application/octet-stream" -X GET http://localhost:1512/rest/V2.0/list/Article/ArticleCharacteristicValue/mimes/byStructureGroup?structureGroup='GROUP_1_2'@'HeilerStandard'&qualificationFilter=recordKey("c003c0da0ca388f7:-2c5e83f8:1614649c74c:-7e9d")

Execute the report byStructureGroup and retrieve the MIME files referenced by Product characteristic values qualified by root characteristic using GET

curl -u rest:heiler -H "Accept: application/octet-stream" -X GET http://localhost:1512/rest/V2.0/list/Product2G/Product2GCharacteristicValue/mimes/byStructureGroup?structureGroup='GROUP_2_1'@'MIME_Structure'&qualificationFilter=rootCharacteristic('Root1')

Execute the report byLookup and retrieve the MIME files referenced by LookupValueLang by specifying the field using POST

curl -u rest:heiler -H "Accept: application/octet-stream" --data "lookup=Apps&fields=LookupValueLang.MIMEValue" http://localhost:1512/rest/V1.0/list/LookupValue/LookupValueLang/byLookup

 

Rest Java Client Example

You can find a short example on how to use the client below. The full example classes can be viewed as part of the SDK package in the folder examples\integration.

Example 1

Following code block is used for retrieving first 100 MIME values from masterCatalog for the Characteristics with identifiers "CharacteristicIdentifier1" and "CharacteristicIdentifier2".

Usage example for the client API
//Create and login to the client...
RestClient restClient = new RestClient();
 
 
//Create and parameterize the report query you want to execute...
EntityItemReference masterCatalog = EntityItemReferenceFactory.createByIdentifier( "MASTER" );
ReportQuery reportQuery = new ReportQuery( "byCatalog" ).addParameterValue( "catalog", masterCatalog );
 
 
//Create and parameterize the list request
ListReadRequest mimeZipRequest = restClient.createListReadRequest();
InputStream mimeZipStream = mimeZipRequest.setPageSize( 100 )
.setStartIndex( 0 )
.setQualificationFilters( "characteristic('CharacteristicIdentifier1')",
"characteristic('CharacteristicIdentifier2')" )
.getSubMIMEs( "Article", "ArticleCharacteristicValue", reportQuery );

Example 2

Following code block retrieves the first 100 MIME values from the subentity LookupValueLang.MIME.

Usage example for the client API
//Create and login to the client...
RestClient restClient = new RestClient();
 
 
//Create and parameterize the report query you want to execute...
ReportQuery reportQuery = new ReportQuery( "byLookup" ).addParameterValue( "lookup", "Apps" );
 
 
//Create and parameterize the list request
ListReadRequest mimeZipRequest = restClient.createListReadRequest();
InputStream mimeZipStream = mimeZipRequest.setPageSize( 100 )
.setStartIndex( 0 )
.setFields( "LookupValueLang.MIMEValue" )
.getSubMIMEs( "LookupValue", "LookupValueLang", reportQuery ))