ONS
About
ONS, or Object Name Service, is a service for finding TIX nodes based on where an EPC has been seen.
/
The top level gives you a list of nodes based on where the EPC in the epc parameter has been seen.
Valid methods |
|---|
GET |
GET
A GET request will yield a JSON response.
Parameters
Key | Value | Required | Default | Description |
|---|---|---|---|---|
epc | string | X | Electronic Product Code | |
eventtype | string | EPCIS v1.1 EventType. ObjectEvent, QuantityEvent, TransactionEvent, AggregationEvent, TransformationEvent | ||
all | boolean | false | If true, show all involved nodes, up to 1000. | |
first | boolean | false | If true, show only the first event registered for the EPC. Will unset the all parameter. | |
limit | integer | 1000 | Limit the number of nodes returned. (1 – 1000) |
Example JSON response with one node
{ "names": { "node": "Store B", "org": "Micros Retail" }, "node": "1000001123000040", "queries": { "event": "/tix/api/xml/event/ExtendedEventQuery?nodeId=1000001123000040&MATCH_anyEPC=18479760.00016", "graph": { "batch": "/tix/api/xml/graph/imagemap?nodeId=1000001123000040&origin=18479760.00016&type=batch", "org": "/tix/api/xml/graph/imagemap?nodeId=1000001123000040&origin=18479760.00016&type=org", "trade-unit": "/tix/api/xml/graph/imagemap?nodeId=1000001123000040&origin=18479760.00016&type=trade-unit" }, "object": "/tix/api/xml/object/18479760.00016?nodeId=1000001123000040&includeProperties=true&includeMasterData=true" }, "state": "ok", "time": "2014-06-27 12:30:31"}Example JSON response with three nodes
{ "nodes": [ { "names": { "node": "Store B", "org": "Micros Retail" }, "node": "1000001123000040", "queries": { "event": "/tix/api/xml/event/ExtendedEventQuery?nodeId=1000001123000040&MATCH_anyEPC=18479760.00016", "graph": { "batch": "/tix/api/xml/graph/imagemap?nodeId=1000001123000040&origin=18479760.00016&type=batch", "org": "/tix/api/xml/graph/imagemap?nodeId=1000001123000040&origin=18479760.00016&type=org", "trade-unit": "/tix/api/xml/graph/imagemap?nodeId=1000001123000040&origin=18479760.00016&type=trade-unit" }, "object": "/tix/api/xml/object/18479760.00016?nodeId=1000001123000040&includeProperties=true&includeMasterData=true" }, "state": "ok", "time": "2014-06-27 12:30:31" }, { "names": { "node": "Store B", "org": "Micros Retail" }, "node": "1000001123000040", "queries": { "event": "/tix/api/xml/event/ExtendedEventQuery?nodeId=1000001123000040&MATCH_anyEPC=18479760.00016", "graph": { "batch": "/tix/api/xml/graph/imagemap?nodeId=1000001123000040&origin=18479760.00016&type=batch", "org": "/tix/api/xml/graph/imagemap?nodeId=1000001123000040&origin=18479760.00016&type=org", "trade-unit": "/tix/api/xml/graph/imagemap?nodeId=1000001123000040&origin=18479760.00016&type=trade-unit" }, "object": "/tix/api/xml/object/18479760.00016?nodeId=1000001123000040&includeProperties=true&includeMasterData=true" }, "state": "ok", "time": "2014-06-27 12:30:31" }, { "names": { "node": "Store B", "org": "Micros Retail" }, "node": "1000001123000040", "queries": { "event": "/tix/api/xml/event/ExtendedEventQuery?nodeId=1000001123000040&MATCH_anyEPC=18479760.00016", "graph": { "batch": "/tix/api/xml/graph/imagemap?nodeId=1000001123000040&origin=18479760.00016&type=batch", "org": "/tix/api/xml/graph/imagemap?nodeId=1000001123000040&origin=18479760.00016&type=org", "trade-unit": "/tix/api/xml/graph/imagemap?nodeId=1000001123000040&origin=18479760.00016&type=trade-unit" }, "object": "/tix/api/xml/object/18479760.00016?nodeId=1000001123000040&includeProperties=true&includeMasterData=true" }, "state": "ok", "time": "2014-06-27 12:30:31" } ]}Response explanation
Key | Description |
|---|---|
names | Name of organization and node as registered in GNS. |
node | The identifier of the node as used in the TIX query nodeId parameter. |
queries | Some helpful URL's to query TIX for more information. |
state | ok: all data imported and converted*. |
time | Timestamp as registered in the database for the latest event containing the queried EPC. |
* converted refers to the process of converting EPCIS data to ttData, which is required for proper graph functionality.