API

LubeLogger provides API endpoints to retrieve and add records, full documentation of these endpoints can be found at /api.

Authentication

If authentication is enabled, it implements Basic Auth based on RFC2617, which stipulates that the "token" is passed in as a Base64-encoded string comprising of a username and password separated by a colon(":"). Because of this, neither the username nor password can contain a colon(":") character.

POST/PUT Encoding

As of 1.4.2, LubeLogger supports bodies in both form-data, x-www-form-urlencoded, and JSON format.

Note that form-data and x-www-form-urlencoded will always convert any data into strings even if you are passing in a number. Post bodies in JSON if you wish to pass in numbers and integers.

Locale-Invariant Formatting

By default, LubeLogger will return all data as strings for GET methods and it is locale-sensitive:

Note the date and decimal formatting.

If you wish for locale invariant and type-rich formatting(numbers are returned as numbers instead of string), you can either inject the following environment variable:

LUBELOGGER_INVARIANT_API=true

Or add the following Header Key in your API request:

culture-invariant

No values are needed, the presence of the key is sufficient for LubeLogger to format the API response:

Testing

You can utilize any REST API testing tool to test your use-case.

Postman Collection

Example Use Cases

0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9