TIX 6 Admin API
API for administrating configuration and data captured.
GET /admin/dataAccess
TODO: Bjørn Konestabo (Unlicensed)
POST /admin/dataAccess
TODO: Bjørn Konestabo (Unlicensed)
POST /admin/object
Update fields on a object without using EPCIS events. The update will not affect the EPCIS events related to the object. The endpoint will return the state of the object after the update.
Parameter | Description |
| ||||
|---|---|---|---|---|---|---|
epc | The EPC of the object to update | query | ||||
field | Name of the field to update.
| query | ||||
oldValue | The current value of the field | query | ||||
newValue | The new value of the field | query |
Example result from updating object 'created' field.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><gqi:GQIResult xmlns:gqi="http://www.tracetracker.com/gqiresult"> <object> <epc>urn.epc1</epc> <label>Default entity</label> <description>Default TradeUnit</description> <created>2013-05-02T20:39:01.930+02:00</created> <lastEventTime>2013-05-02T20:39:01.950+02:00</lastEventTime> </object></gqi:GQIResult>GET /admin/event
Fix events that failed to convert. Use GET /admin/event to get the events that failed to be converted to ttdata.
Parameter | Default | Description |
|
|---|---|---|---|
pageNumber | 1 | Specifies the page number to return. If not specified, the first page is returned. | query |
pageSize | 20 | Specifies the number of log entries to return in the result set. | query |
First, call GET method on the endpoint: /admin/event?nodeId=0800000033000013
<epcis:EPCISDocument schemaVersion="1" creationDate="2013-10-10T14:52:08.644+02:00" xmlns:gtnet-epcis="http://www.globaltraceability.net/schema/epcis" xmlns:epcis="urn:epcglobal:epcis:xsd:1"> <EPCISBody> <EventList> <ObjectEvent epcis_to_ttdata_state="FAILED_UNCONVERTED" database_id="300"> <eventTime>1975-12-17T10:40:00.000+01:00</eventTime> <recordTime>2013-09-26T11:08:22.094+02:00</recordTime> <eventTimeZoneOffset>+00:00</eventTimeZoneOffset> <epcList> <epc>tix-1524</epc> </epcList> <action>ADD</action> <bizStep>urn:epcglobal:cbv:bizstep:commissioning</bizStep> <disposition>urn:epcglobal:cbv:disp:active</disposition> <gtnet-epcis:ProjectNumber xmlns="http://www.globaltraceability.net/schema/epcis">hatch_1</gtnet-epcis:ProjectNumber> <gtnet-epcis:CageNumber xmlns="http://www.globaltraceability.net/schema/epcis">1</gtnet-epcis:CageNumber> <gtnet-epcis:Temperature unit="celsius" xmlns="http://www.globaltraceability.net/schema/epcis">8</gtnet-epcis:Temperature> <gtnet-epcis:HatchingDate xmlns="http://www.globaltraceability.net/schema/epcis">1975-12-18T09:40:00.000+00:00</gtnet-epcis:HatchingDate> <gtnet-epcis:Treatments xmlns="http://www.globaltraceability.net/schema/epcis">a</gtnet-epcis:Treatments> <gtnet-epcis:Mortality xmlns="http://www.globaltraceability.net/schema/epcis">5%</gtnet-epcis:Mortality> <gtnet-epcis:entityClass xmlns="http://www.globaltraceability.net/schema/epcis">Batch</gtnet-epcis:entityClass> <gtnet-epcis:trdType xmlns="http://www.globaltraceability.net/schema/epcis">Hatchery_batch</gtnet-epcis:trdType> </ObjectEvent> <ObjectEvent epcis_to_ttdata_state="FAILED_UNCONVERTED" database_id="721"> <eventTime>2008-06-05T13:00:00.000+02:00</eventTime> <recordTime>2013-09-26T16:15:39.316+02:00</recordTime> <eventTimeZoneOffset>+00:00</eventTimeZoneOffset> <epcList> <epc>ttdata:catchdiary:8215:18:2</epc> </epcList> <action>ADD</action> <bizStep>urn:epcglobal:cbv:bizstep:commissioning</bizStep> <disposition>urn:epcglobal:cbv:disp:active</disposition> <gtnet-epcis:pageno xmlns="http://www.globaltraceability.net/schema/epcis">18</gtnet-epcis:pageno> <gtnet-epcis:haulno xmlns="http://www.globaltraceability.net/schema/epcis">2</gtnet-epcis:haulno> <gtnet-epcis:haulpositionstart xmlns="http://www.globaltraceability.net/schema/epcis">65.1000,5.0000</gtnet-epcis:haulpositionstart> <gtnet-epcis:haulpositionend xmlns="http://www.globaltraceability.net/schema/epcis">65.1000,5.0000</gtnet-epcis:haulpositionend> <gtnet-epcis:haulstarttime xmlns="http://www.globaltraceability.net/schema/epcis">2008-06-05T12:00:00.0Z</gtnet-epcis:haulstarttime> <gtnet-epcis:haulduartion xmlns="http://www.globaltraceability.net/schema/epcis">1.5</gtnet-epcis:haulduartion> <gtnet-epcis:fishingzone xmlns="http://www.globaltraceability.net/schema/epcis">4A</gtnet-epcis:fishingzone> <gtnet-epcis:prawnamount xmlns="http://www.globaltraceability.net/schema/epcis">0</gtnet-epcis:prawnamount> <gtnet-epcis:codamount xmlns="http://www.globaltraceability.net/schema/epcis">500</gtnet-epcis:codamount> <gtnet-epcis:coalfishamount xmlns="http://www.globaltraceability.net/schema/epcis">100</gtnet-epcis:coalfishamount> <gtnet-epcis:haddockamount xmlns="http://www.globaltraceability.net/schema/epcis">125</gtnet-epcis:haddockamount> <gtnet-epcis:other1amount xmlns="http://www.globaltraceability.net/schema/epcis">30</gtnet-epcis:other1amount> <gtnet-epcis:other2amount xmlns="http://www.globaltraceability.net/schema/epcis">400</gtnet-epcis:other2amount> <gtnet-epcis:other3amount xmlns="http://www.globaltraceability.net/schema/epcis">0</gtnet-epcis:other3amount> <gtnet-epcis:other4amount xmlns="http://www.globaltraceability.net/schema/epcis">75</gtnet-epcis:other4amount> <gtnet-epcis:other5amount xmlns="http://www.globaltraceability.net/schema/epcis">0</gtnet-epcis:other5amount> <gtnet-epcis:other6amount xmlns="http://www.globaltraceability.net/schema/epcis">0</gtnet-epcis:other6amount> <gtnet-epcis:entityClass xmlns="http://www.globaltraceability.net/schema/epcis">Batch</gtnet-epcis:entityClass> <gtnet-epcis:trdType xmlns="http://www.globaltraceability.net/schema/epcis">haul</gtnet-epcis:trdType> </ObjectEvent> </EventList> </EPCISBody></epcis:EPCISDocument>POST /admin/event
Upload the fixed document using POST with the events fixed, epcis_to_ttdata_state attributes removed and keep the database_id attributes. Those events will be deleted and re-imported again.
curl -n -F "data=@events-to-update.xml;filename=events-to-update.xml" \ 'http://my.tix.url/tix/api/xml/admin/event?nodeId=0800000033000013'<?xml version="1.0" encoding="UTF-8" standalone="yes"?><collection> <importResult> <bytes>1522</bytes> <filename>events-to-update.xml</filename> <importId>431f584941a406850141a40a135d13d641000001</importId> <userId>administrator</userId> </importResult></collection>GET /admin/auditlog
Get the audit log.
Parameter | Default | Description |
| ||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
epc |
| Filter audit log on epcs | query | ||||||||
entity |
| Filter audit log on entity values. Valid entity values are | query | ||||||||
field |
| Filter audit log on field values. | query | ||||||||
GE_created |
| Limit the search on audit log with created date after GE_created, format | query | ||||||||
LE_created |
| Limit the search on audit log with created date before LE_created, format | query | ||||||||
orderBy | created | The field in the query to order by.
| query | ||||||||
asc | false | Ordering will be ascending if true. Descending if false. | query | ||||||||
pageNumber | 1 | Specifies the page number to return. If not specified, the first page is returned. | query | ||||||||
pageSize | 20 | Specifies the number of log entries to return in the result set. | query |
Example result from getting audit log for an epc.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><audits xmlns="http://www.tracetracker.com/audits"> <audit> <created>2013-05-28T11:48:17.925+02:00</created> <entity>OBJECT</entity> <entityId>ff8081813ee682cf013ee68c33220001</entityId> <epc>urn:epc1</epc> <field>created</field> <oldValue>2013-05-02T20:39:01.950+02:00</oldValue> <newValue>2012-05-02T22:39:01.930+02:00</newValue> <username>administrator</username> <node>0800000033000013</node> </audit></audits>GET /admin/orgMapping
TODO: Jan Erik Robertsen
POST /admin/orgMapping
TODO: Jan Erik Robertsen
POST /admin/gns/refresh
Refresh the GNS data for a Node given a single NodeId.
Parameter | Default | Description |
|
|---|---|---|---|
|
| The | query |
Example: refresh Node '0800000024000011'
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><ns2:gnsResult xmlns:ns2="http://schema.tracetracker.com/tixApi"> <nodeId>0800000024000011</nodeId> <message>Node for 0800000024000011 was updated.</message> <status>UPDATED</status></ns2:gnsResult>Status definition
status | Description |
|---|---|
| Refresh resulted in a new Node to be added to the GNS data |
| Refresh removed the Node for given NodeId |
| Refresh caused existing Node to be updated |
| Refresh did not update GNS data because no data was found for given |
GET /admin/configuration
Queries the configuration from the tt_tixconfig.properties file (which is also updated if the configuration changes). See TIX 6 Configuration file for list of configurations that may be queried.
Parameter | Description |
|
|---|---|---|
propertyName | The configuration key to update | query |
propertyValue | The new value to update the configuration with | query |
Query
somelogoPOST /admin/configuration
Updates the configuration in the tt_tixconfig.properties file. See TIX 6 Configuration file for list of configurations that may be updated.
Property 'logo' updated from 'somelogo' to 'newLogo'.Unsuccessful update
Some properties that are necessary for TIX operation are blacklisted from reading/writing through API
Property 'ldap.url' is blacklisted. It cannot be queried or changed via API.