BFC BFC Docs
Integrations

Use the Gateway

Access the Gateway web pages, health check, Swagger explorer, authentication, and value API.

The Gateway is available over HTTP on port 5000 in the Setup Tool deployment:

http://CONTROLLER_IP:5000/

Browser pages

The home page links to:

  • /tags — logs in and polls active RFID tags every 500 ms.
  • /swagger/ — interactive REST API documentation.
  • phpMyAdmin on controller port 8080.

Swagger is the authoritative endpoint reference for the installed build.

Health check

The health endpoint does not require a token:

curl http://CONTROLLER_IP:5000/api/health

Docker also uses this endpoint for the Gateway container health check.

Authenticate

The data API uses JWT bearer tokens. A new empty database creates the preview account admin / admin.

curl -X POST http://CONTROLLER_IP:5000/api/auth/login \
  -H "Content-Type: application/json" \
  -d '{"username":"admin","password":"admin"}'

The response includes token, permission, and expiresAt. Send the token on protected requests:

curl http://CONTROLLER_IP:5000/api/LuaValue \
  -H "Authorization: Bearer TOKEN"

Read a latest value

Typed endpoints return the latest value:

curl http://CONTROLLER_IP:5000/api/LuaValue/temphum/temp/float/value \
  -H "Authorization: Bearer TOKEN"

The generic latest-value endpoint is:

GET /api/LuaValue/{sourceName}/{keyName}/value

History endpoints accept a count query parameter and return newest records first:

GET /api/LuaValue/{sourceName}/{keyName}/float/history?count=100

Store a value

Write endpoints accept a typed object:

curl -X POST http://CONTROLLER_IP:5000/api/LuaValue/demo/temperature/float/value \
  -H "Authorization: Bearer TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"value":23.5,"unitCode":"°C","validity":"VALID"}'

The Gateway maintains the latest record and appends a history record for each write.

RFID tags

The tag API exposes all tags, active tags, a tag by ID, and tag history:

GET /api/Tag
GET /api/Tag/active
GET /api/Tag/{tagID}
GET /api/Tag/{tagID}/history

HTTPS

The container also publishes port 5001 and generates a self-signed certificate when needed. Clients will not trust that certificate automatically. Use a controlled HTTP network for evaluation or install a properly managed certificate before treating HTTPS as production-ready.

Built with ASP.NET Core and Markdig. BFC user documentation · preview release