Graph queries are performed by following the different relations between the traceable objects on the TIX server, and in GTNet. A traceability graph has an origin which is a starting point for an upstream and a downstream trace. A rendered graph may also have a focus which is a selected object within a traced graph.

Resources

GET /graph

This endpoint retrieves traceability graph traced from the specified origin.

See Graph query response for details on the response.

Parameter

Default

Description

origin

 

EPC Origin of the graph. This is the starting point for the trace and is a required parameter.

remoteNode

 

For setting origin in a remote node. Only possible for graphs of type trade-unit and batch.

type

local

Type of graph. Legal values are "local" (default) "trade-unit", "batch" and "org"

nodeId

 

This parameter provides node context for those users who may be associated with more than one node. It is required unless the TIX can derive it's value through other means. E.g. if the user has only access to one node.

includeProperties

false

If specified, include the object properties associated with the local graph nodes.

<?xml version="1.0" encoding="utf-8"?>
<graph xmlns:gqi="http://www.tracetracker.com/gqiresult">
<node id="TradeUnitId[ID=#EPC#]">
<data key="type">tradeunit</data>
<object nodeId="0800000015000019" type="entityTypeId">
<epc>#EPC#</epc>
<entityClass>TradeUnit</entityClass>
<label>entityTypeLabel</label>
<description>entityTypeDescription</description>
<created>2013-10-18T11:53:51.961+02:00</created>
<NetWeight label="Netweight of Trade Unit" updated="2013-10-18T11:53:51.961+02:00">21,40 kg</NetWeight>
<lastEventTime>2013-10-18T11:53:51.961+02:00</lastEventTime>
<lastPropertyTime>2013-10-18T11:53:51.961+02:00</lastPropertyTime>
</object>
</node>
</graph>

includePropertyLog

true

If set to false, only the last property value for each property type will be returned.

GET /graph/imagemap

Retrieve a HTML fragment of an image map. The HTML fragment will include an img tag with a reference to the graph png end point, all links are relative for easy relocation and inclusion in other web sites. Note the key parameter for the image map URLs and image URLs. This key is unique for this graph for a specific user within a TIX node. The key links the graph session between the image and image map requests to ensure that the same model is being re-used. If the key is omitted, twice the work will be performed, and the image and image map may become out of sync.

See ImageMap response for details on the response.

Parameter

Default

Description

 

origin

 

EPC Origin of the graph. This is the starting point for the trace and is a required parameter.

query

remoteNode

 

For setting origin in a remote node. Only possible for graphs of type trade-unit and batch.

query

focus

 

The focus for the graph.

query

key

 

optional session key for improved performance. It is required to ensure that the ImageMap and image are in sync.

query

width

-1

Optional width parameter, in pixels. -1 lets the graph engine pick the size.

query

height

-1

Optional height parameter, in pixels. -1 lets the graph engine pick the size.

query

type

local

Type of graph. Legal values are "local" (default) "trade-unit", "batch", and "org"

query

nodeId

 

This parameter provides node context for those users who may be associated with more than one node. It is required unless the TIX can derive it's value through other means. E.g. if the user has only access to one node.

query

imageMapName

tree-imagemap

Optional image map name for the HTML fragment returned.

query

includeImgTag

true

Optional boolean flag, let you exclude the img tag from the HTML fragment returned.

query

nocache

false

For debugging purposes. Disables all graph model caching.

query

highLight_[color]:[label]

 

This parameter specifies a color to be used for highlighting objects in the graph based on the EPC as well as an optional label to append to the mouse-over text. Color may be a RGB or RGBA hex value of either one or two digits per component. The value of the parameter may be an explicit EPC or an identity pattern. Any objects with EPC matching the identity pattern will be marked with the specified color.

Two "magic" values exists. downstreamLeaf and upstreamLeaf which will mark all upstream or downstream leaf nodes with the specified color.

The downstreamLeaf/upstreamLeaf colors are applied first, but will be overridden by EPC identity pattern colors. Colors specific to an EPC will overide all others.

query

highLight_[color]:label#EQATTR_[vocabularyattribute]

 

This parameter specifies a color to be used for highlighting organizations or nodes in the graph based on master data, as well as an optional label to append to the mouse-over text. Color may be a RGB or RGBA hex value of either one or two digits per component. The value should be a MD attribute value. An organization with attached master data containing the specified attribute and value will be highlighted with the provided color.

Note that the # must be escaped to a %23.

query

GET /graph/png

This endpoint retrives a png image of a traceability graph traced from the specified origin.

Parameter

Default

Description

 

origin

 

EPC Origin of the graph. This is the starting point for the trace and is a required parameter.

 

remoteNode

 

For setting origin in a remote node. Only possible for graphs of type trade-unit and batch.

 

focus

 

Optional parameter for putting a reticle around a graph node.

 

key

 

optional session key for improved performance. It is required to ensure that the ImageMap and image are in sync.  @param nocache If true do not use cached results.

 

width

-1

Optional width parameter, in pixels. -1 lets the graph engine pick the size.

 

height

-1

Optional height parameter, in pixels. -1 lets the graph engine pick the size.

 

type

local

Type of graph. Legal values are "local" (default) "trade-unit", "batch" and "org"

 

nodeId

 

This parameter provides node context for those users who may be associated with more than one node. It is required unless the user only has access to one TIX node.

 

nocache

false

For debugging purposes. Disables all graph model caching.

 

highLight_[color]

 

This parameter specifies a color to be used for highlighting objects in the graph based on the EPC. Color may be a RGB or RGBA hex value of either one or two digits per component. The value of the parameter may be an explicit EPC or an identity pattern. Any objects with EPC matching the identity pattern will be marked with the specified color.

Two "magic" values exists. downstreamLeaf and upstreamLeaf which will mark all upstream or downstream leaf nodes with the specified color.

 

The downstreamLeaf/upstreamLeaf colors are applied first, but will be overridden by EPC identity pattern colors. Colors specific to an EPC will overide all others.

 

highLight_[color]#EQATTR_[vocabularyattribute]

 

This parameter specifies a color to be used for highlighting organizations or nodes in the graph based on master data. Color may be a RGB or RGBA hex value of either one or two digits per component. The value should be a MD attribute value. An organization with attached master data containing the specified attribute and value will be highlighted with the provided color.

Note that the # must be escaped to a %23.

query


Custom icons

It's possible to define custom images to be used to represent different TRD types by specifying these in the TRD, or by adding a graphImage attribute to the product vocabulary element in the EPCClass vocabulary. The format of this attribute is the same as described on the TRD page.