REST List API Info
List all entities with reports
Returns a list of all entities which have contributed reports
URL Pattern |
/list/info |
Method |
GET |
Parameters |
No parameters are available |
Media types |
text/html, application/json, application/xml |
Result |
In case of media types application/json and application/xml a list of all entities which have contributed reports is returned. In case of media type text/html additionally some general information about the REST List API is returned. |
Result
A list of entities is returned.
Properties of an entities element |
|||
Field |
Data type |
Description |
|
identifier |
String |
Entity identifier |
|
name |
String |
Language specific name |
|
description |
String |
Language specific description |
List all available reports for an entity
Returns the list of all available reports for the specified entity.
URL Pattern |
/list/{entity-identifier}/info |
Method |
GET |
Parameters |
No parameters are available |
Media types |
text/html, application/json, application/xml |
Result |
A list of all available reports for the specified entity is returned. |
Result
A list of reports is returned. For each report the identifier, the name and the description is provided.
Properties of an reports element |
|||
Field |
Data type |
Description |
|
identifier |
String |
Report identifier |
|
name |
String |
Language specific name of the report |
|
description |
String |
Language specific description of the report |
List report specific parameters
Returns a list of all report specific parameters.
URL Pattern |
/list/{entity-identifier}/{report-name}/info |
Method |
GET |
Parameters |
No parameters are available |
Media types |
text/html, application/json, application/xml |
Result |
Returns a list of report specific parameters. If text/html is request, also the general, report independent parameters are returned. |
Result
Properties of an parameters element |
|||
Field |
Data type |
Description |
|
identifier |
String |
Parameter identifier |
|
name |
String |
Language specific name of the parameter |
|
description |
String |
Language specific description of the parameter |
|
dataType |
String |
||
entity |
Objet |
Proxy representing a repository entity. The proxy contains the properties identifier, name and description. Only set if data type is ENTITY_ITEM and an enumeration is not specified. |
|
enumeration |
Object |
Proxy representing an enumeration. The proxy contains the properties identifier and name. |
Examples
List all entities with reports
curl -u rest:heiler -H
"Accept: application/json"
-X GET http:
//localhost:1501/rest/V1.0/list/info
The following JSON object is returned:
{
"entities"
: [
{
"identifier"
:
"Article"
,
"name"
:
"Item"
,
"description"
:
""
},
{
"identifier"
:
"Structure"
,
"name"
:
"Structure"
,
"description"
:
""
},
...
]}
ListInfoRequest listInfoRequest = restClient.createListInfoRequest();
ReportInfos reportInfoList = listInfoRequest .getAllEntitiesWithReports();
Retrieving all reports for the entity Article
curl -u rest:heiler -H
"Accept: application/json"
-X GET http:
//localhost:1501/rest/V1.0/list/Article/info
The following JSON object is returned:
{
"reports"
: [
{
"identifier"
:
"byAssortment"
,
"name"
:
"Items in assortment"
,
"description"
:
"Determines all items in an assortment"
},
{
"identifier"
:
"byCatalog"
,
"name"
:
"Items from supplier catalog"
,
"description"
:
"Determines all items from a supplier catalog"
},
...
]}
ListInfoRequest listInfoRequest = restClient.createListInfoRequest();
ReportInfos reportInfoList = listInfoRequest.getAllReports(
"Article"
);
Retrieving all report specific parameters for the report byCatalog
The report identifier has to be added (here "byCatalog" to request the items of a certain catalog):
curl -u rest:heiler -H
"Accept: application/json"
-X GET http:
//localhost:1501/rest/V1.0/list/Article/byCatalog/info
The following JSON object is returned:
{
"parameters"
: [
{
"identifier"
:
"catalog"
,
"name"
:
"Catalog"
,
"description"
:
"The catalog for which the items are to be determined"
,
"mandatory"
:
"false"
,
"dataType"
:
"ENTITY_ITEM"
,
"entity"
: {},
"enumeration"
: {
"name"
:
"Supplier catalogs and master catalog"
,
"identifier"
:
"Enum.SupplierCatalogsWithMaster"
}
}
]
}
ListInfoRequest listInfoRequest = restClient.createListInfoRequest();
ReportInfos reportInfoList = listInfoRequest..getReportParameters(
"Article"
,
"byCatalog"
);