FasTnT EPCIS is a lightweight GS1 EPCIS 1.2 and EPCIS 2.0 repository written in C# using .NET7 and backed using EntityFramework Core.
The repository fully supports the following databases:
- SqlServer (provider: SqlServer)
- PostGreSQL (provider: Postgres)
- Sqlite (provider: Sqlite)
There is a sandbox available if you want to quickly test this EPCIS repository capabilities.
A Postman team is also available that contains collections for both XML/SOAP and JSON endpoints. Alternatively, a SoapUI project can be found in the source code that contains queries for the v1.2 implementation.
- Download the source code, and setup a database for FasTnT ;
- Start the repository with the command
$ dotnet run -p src\FasTnT.Host\FasTnT.Host.csproj --urls "http://localhost:5102/" --connectionStrings:FasTnT.Database "Data Source=fastnt.db;" --FasTnT.Database.Provider "Sqlite"
;
That's it! You have a properly working EPCIS repository using Sqlite as storage.
You can obviously replace the Connection String and Database Provider with the values that suits better your needs (SqlServer or PostGreSQL).
You can also setup FasTnT EPCIS using the Docker image or in Azure very easily. Check the wiki for more details.
The API is secured using HTTP Basic auth by default. The users are not stored in the database, but a hash of the authorization value is stored alongside the request. By default the events and masterdata returned in a query are restricted to the ones captured with the same authorization header.
FasT&T provides a full implementation of the EPCIS 1.2 specification. The endpoints are:
- Capture:
POST /v1_2/Capture
- Queries :
POST /v1_2/Query.svc
Capture endpoint only supports requests with content-type: application/xml
or content-type: text/xml
header and XML payload.
Queries endpoint supports SOAP requests on endpoint /v1_2/Query.svc
.
See the wiki for more details.
This is the list of implemented 1.2 features in the repository:
- Capture
- Events
- Capture Master Data (CBV)
- Queries:
- GetVendorVersion
- GetStandardVersion
- GetQueryNames
- GetSubsciptionIDs
- Poll
- SimpleEventQuery
- SimpleMasterDataQuery
- Query Callback:
- CallbackResults
- CallbackQueryTooLargeException
- CallbackImplementationException
- Subscriptions:
- Subscribe to an EPCIS request
- Unsubscribe from EPCIS repository
- Trigger subscriptions that register to specific trigger name
- Execute subscription based on schedule
The repository also implements the EPCIS 2.0 specification. The endpoints are:
- Capture:
POST /v2_0/Capture
- Query :
GET /v2_0/events
Capture endpoint supports requests with both content-type: application/xml
or content-type: application/json
headers and payload.
Queries endpoint supports HTTP requests and supports both accept: application/json
and accept: application/xml
headers.
The subscriptions will always receive the results in JSON format.
The OpenApi definition of the EPCIS 2.0 endpoints is available at the URL /v2_0/openapi.json
. See the wiki for more details.
This is the list of implemented 2.0 features in the repository:
- Capture
- Capture list of Events
- Capture a single Event
- Capture CBV masterdata
- Queries:
- List events
- Event pagination
- Create/Delete a named query
- Execute a named query
- Subscriptions:
- Subscribe to an EPCIS request (webhook)
- Subscribe to an EPCIS request (websocket)
- Discovery endpoints
- EventType discovery endpoint
- EPCs discovery endpoint
- Business Steps discovery endpoint
- Business Locations discovery endpoint
- Read Points discovery endpoint
- Dispositions discovery endpoint
- Only
rollback
value is accepted forGS1-Capture-Error-Behaviour
header - Only
Never_Translates
value is accepted forGS1-EPC-Format
header
External contributions on this EPCIS repository are welcome from anyone. This project was created an is primarily maintained by Louis-Axel Ambroise.
This project is licensed under the Apache 2.0 license - see the LICENSE file for details
Contact: fastnt@pm.me