The standard EPCIS Query Interface allows querying an EPCIS Repository. Thus, the proposed RESTful Query Interface allows to easily query the IDN-based EPCIS repository. The query is submitted via a GET request on an HTTP-URI compliant with specific URI templates. The URI templates available for querying reflect the natural structure of the IDN-Documents enabling a simple and logic retrieving paradigm.
Querying the system for a resource it is as easy as preparing an HTTP request as follows:
Acceptheaders to "application/xml"
The resource path is useful to express the query in a RESTful fashion and it allows to easily query the IDN-based EPCIS repository. The query is submitted via a GET request on an HTTP-URI compliant with specific URI templates. The URI templates available for querying reflect the natural structure of the IDN-Documents enabling a simple and logic retrieving paradigm. Examples of queries are listed in the following:
The time expression allows to refine the research by time constraint. It Accept an (arbitrary complex) java boolean expression of the variable time and so it is quite expressive. The time values by convention (according to the Date.getTime() method) are expressed in milliseconds from the 1/1/1970.
The time expression is built following the uri parameter approach. It has the
time parameter followed by a time expression as shown in the examples
time>1176069600000 && time <1376258400000
time>1176069600000 && !(time>1176069600000 && time <1378936800000)
The result contains a list of EPCIS elements instances that satisfy the query.
The EPCIS Events are mapped to IDN-Documents to support data reuse and addressability. In the following the Information Model of each event is shown.
The document link are the ones to be used when browsing the resources graph. It is possible to follow this pattern to build the RESTful uri in order to get the EPC related resource from the Query Interface. In the pictures below the black arrows represent the aggregation links while the red arrows represent the reference links.