hybris Type System command-line tool + web API
Overview
This tool is a part of my hybris Runtime Developer tools package. It allows showing one-page all-in-one information about hybris types or the specific type using the command line. It is much faster and more flexible than using hybris administrative console (HAC).Features
- REST API and a console tool to the type system,
- Shows all available types,
- Shows the detailed information about the type,
- Shows the detailed information about the type attribute.
Using
Command-line interface
Parameters
parameter | Description | Example |
–? | help, available options. Only for the console version. | |
type (-t) | Shows the list of attributes of <type> | query=Select {pk} from {Product} |
attribute (-a) | Shows the detailed information about the specific attribute | itemtype=Product |
pk | Identifies the type(s) behind pk and shows the results. It is a useful feature if you need to request the information about the item with the specified PK, but you are not sure / you don’t know what type is behind this PK. | -pk 8796176744449 |
Examples:
Requesting the information about the available attributes of the specific type (in the example below it is “Product”) Requesting the information about the specific attribute (in the example below it is “picture” of “Product”)Web API
$ curl "https://localhost:9002/tools/typesystem/type/Language/attributes" -k 2>/dev/null $ curl "https://localhost:9002/tools/typesystem/type/Language/attributes" -k 2>/dev/null Type: Language Supertype:C2LItem Subtypes: active→java.lang.Boolean→null→mandatory! comments→CommentItemRelationcommentsColl→null→optional ...
$ curl "https://localhost:9002/tools/typesystem/type/Product/attributes" -k 2>/dev/null | head -n 10 Type: Product Supertype:GenericItem Subtypes: ApparelProduct, VariantProduct allDocuments→ItemDocrRelationallDocumentsColl→null→optional assignedCockpitItemTemplates→Item2CockpitItemTemplateRelationassignedCockpitItemTemplatesColl→null→optional comments→CommentItemRelationcommentsColl→null→optional creationtime→java.util.Date→null→optional itemtype→ComposedType→null→optional modifiedtime→java.util.Date→null→optional owner→Item→null→optional
$ curl "https://localhost:9002/tools/typesystem/types?extension=hmc" -k 2>/dev/null hmc→HMCHistoryEntry hmc→HistoryActionType hmc→WizardBusinessItem hmc→SampleWizard hmc→ImportExportUserRightsWizard hmc→ImportUserRightsWizard hmc→ExportUserRightsWizardIn a similar way, you can request all the types from all extensions if you omit the extension param.
Video
Download
The extension is available by request. E-mail: Rauf_Aliev@epam.com. Skype: rauf_aliev© Rauf Aliev, August 2016