About the Diagnostics Tool
How to run the tool with Docker, what it checks in each API response, how it returns JSON or PDF reports, and what it doesn't validate, such as CTE/KDE completeness.
An open-source diagnostic tool designed to help identify and resolve real-time data transmission issues between traceability systems. This tool provides a neutral, transparent way to assess data structure correctness, API functionality, and identify common issues like formatting errors or protocol mismatches.
Overview
Digital traceability depends on interoperability that allows systems to reliably exchange standardized data across companies and platforms. In practice, however, interoperability can break down in live environments. Even implementations that have successfully passed certification or capability testing can experience failures due to:
- Variations in implementation
- Software updates
- Configuration changes
- Minor structural inconsistencies
- API behavior
When data exchanges fail, identifying the source of the issue can be difficult. Solution providers may attribute the problem to one another, leaving the industry user without clarity and eroding trust in the standards themselves.
The Diagnostic Tool was developed to address this challenge by providing:
- A neutral, standards-aligned troubleshooting mechanism
- Transparent, step-by-step analysis of data exchanges
- Clear identification of where interoperability issues originate
By reducing ambiguity, the tool accelerates issue resolution and strengthens confidence in digital traceability systems.
Multi-Commodity Support
The Diagnostics Tool is commodity agnostic, supporting traceability across multiple sectors through its flexible architecture:
- Supports beef, leather, seafood, and other commodity supply chains
- New commodities can be added by including additional JSON schemas
- Extensible design allows validation of traceability data from a wide range of products
- Built on shared core standards/frameworks for easy extension
Who Should Use the Diagnostics Tool?
The Diagnostic Tool is intended for organizations that have implemented standards-based digital traceability data exchange in operational environments, including:
- Solution providers
- Certification bodies
- Government agencies
- Industry users (manufacturers, processors, distributors, retailers)
- System integrators
It is particularly valuable when:
- Integrating new interfaces
- Deploying system updates
- Scaling multi-party interoperability
- Investigating failed data exchanges
Using the Diagnostics Tool
Technology Stack
- Framework: C# with .NET 8 (latest LTS version)
- Web Server: ASP.NET Core framework
- License: MIT License (open-source)
- Source Control: Public GitHub repository
Docker Support
The software tool is designed for easy deployment via Docker. Users have two options:
- Docker Hub: Use the pre-built Docker image from Docker Hub for quick deployment
- Source Build: Download and compile the source code directly
Execution Flow
The Diagnostics Tool operates by sending requests to traceability systems and analyzing their responses to ensure compliance with expected traceability standards or frameworks.
- API Request: User calls the Diagnostics Tool API with:
- URL of the target API
- Request parameters for the API request
- Optional parameters:
- Automatic traceback execution
- Automatic master data resolution
- System Verification: The tool executes the request and verifies:
- Response headers and content are formatted correctly and valid
- No unexpected results (e.g., events that don't match query parameters)
- No validity errors (e.g., duplicate Event IDs across multiple events)
- Potential validity warnings (e.g., events recorded before EPC creation)
- Results Documentation: Each verification error is captured with detailed information providing clear insights into API compliance failures
- Response Format: Results are returned synchronously in the original HTTP request as:
- Default: JSON format
- Optional: PDF format (specify in Accept-Content header)
Validation Approach
The tool primarily utilizes JSON schemas to validate API request responses. When JSON schema validation is insufficient, custom C# code handles specific verification requirements.
Scope and Limitations
The Diagnostics Tool does not check for CTE/KDE matrix completeness. It is designed for real-world traceability data, which typically:
- May not contain all KDEs of applicable modules
- May not include all CTEs of the entire supply chain
Getting Started
- Pull the container
docker pull iftgftc/diagnostics-tool:latest - Run the diagnostics tool (publish port 8080 for HTTP):
docker run --rm -p 8080:8080 --name diagnostics-tool iftgftc/diagnostics-tool:latest - Open the UI
- Navigate to
http://localhost:8080to load the Diagnostics Tool web UI. - Use the left navigation to access diagnostics features and saved reports.
- Navigate to
- Call the API directly
- Send requests to the hosted controller endpoints, e.g.:
- Resolve EPC Digital Link URL:
curl -X POST http://localhost:8080/api/v1/diagnostics/digitallink/epcis-url/epc \
-H "Content-Type: application/json" \
-d '{
"epc": "urn:epc:id:sgtin:0614141.107346.2017",
"options": { "url": "https://example.com/epcis" }
}'
- Query EPCIS events:
curl -X POST http://localhost:8080/api/v1/diagnostics/epcis/query/events \
-H "Content-Type: application/json" \
-d '{
"options": { "url": "https://example.com/epcis" },
"parameters": {}
}'
- Send requests to the hosted controller endpoints, e.g.:
- Execute test requests in the UI
- In the UI, choose Diagnostics Tests and pick a template (e.g., EPCIS Query, Traceback).
- Populate connection settings (URL, authentication, EPC/PGLN values) and submit.
- Review the returned diagnostics report and download it if needed.
Impact on the Industry
By introducing a neutral, transparent, and standards-aligned troubleshooting mechanism, the Diagnostic Tool:
- Reduces Resolution Time: Teams can rapidly isolate structural or transmission errors without prolonged cross-vendor debates.
- Improves Accountability: Objective reporting clarifies which system requires correction.
- Strengthens Trust in Standards: Clear diagnostics reinforce confidence in GDST and EPCIS frameworks.
- Accelerates Adoption: Lower friction during integration encourages broader implementation of interoperable digital traceability systems.
- Supports Scalable Infrastructure: The tool contributes to reliable, cross-commodity traceability ecosystems.
Alignment with GFTC's Mission
The Diagnostic Tool advances the mission of the Global Food Traceability Center, a fully traceable food system enabled by interoperable digital solutions accessible to all, by delivering:
- Open-access tools
- Practical implementation support
- Scalable, commodity-agnostic infrastructure
- Confidence-building mechanisms for digital traceability
Together with implementation guidance and capability testing frameworks, the Diagnostic Tool helps move digital interoperable traceability from theory to operational reality.
How did we do?