REST API Tutorial - List Read for Sub Entities
Motivation
Reads on sub entity level are necessary when
Qualifications are unknown
Attribute names
References to other items (the referenced item is part of the qualification)
Too many fields
Getting values for 100 attributes would require 100 qualified fields
Query
Reading on sub entity level is like reading on entity level, but
URL contains the identifier of the sub entity additionally to the root entity
Fields are not qualified
Results contains the qualification for each row
Remark
Only direct sub entities can be specified, but the queries can contains fields from sub sub entities.
Examples
Language data: Query the values of the field ArticleLang.DescriptionShort from the sub entity ArticleLang for all languages
GET http://localhost:1501/rest/V1.0/list/Article/ArticleLang/byCatalog?catalog=RestTutorial&fields=ArticleLang.DescriptionShort&metaData=true&pageSize=-1
Attributes: Query all values of the fields ArticleAttribute.Datatype and ArticleAttributeValue.Value (which is a field of a sub sub entity) from the sub entitry ArticleAttribute
GET http://localhost:1501/rest/V1.0/list/Article/ArticleAttribute/byCatalog?catalog=RestTutorial&fields= ArticleAttribute.Datatype ,ArticleAttributeValue.Value&metaData=true&pageSize=-1
References: Query all values of the fields ArticleReference.Type, ArticleReference.ReferencedArticle and ArticleReference.Quantity from the sub entity ArticleReference
GET http://localhost:1501/rest/V1.0/list/Article/ArticleReference/byCatalog?catalog=RestTutorial&fields= ArticleReference.Type ,ArticleReference.ReferencedArticle,ArticleReference.Quantity&metaData=true&pageSize=-1
Qualification filter
A qualification filter allows to filter the returned values. The filtername can be looked up in qualifier description in the entry Qualification filter identifier
Example
In this example only the English short descriptions returned. Therefore the parameter qualificationFilter is set to language(English).
The filter name can be found in the entry Qualification filter identifier of http://localhost:1501/rest/V1.0/meta/Article/ArticleLang/ArticleLangType.LK.Language
GET http://localhost:1501/rest/V1.0/list/Article/ArticleLang/byCatalog?catalog=RestTutorial&fields=ArticleLang.DescriptionShort&qualificationFilter=language(English)&metaData=true&pageSize=-1