A lightweight version-controlled key-value storage API built with Laravel 12.
- ✅ Store any key with a versioned JSON value.
- ✅ Retrieve the latest value of a key.
- ✅ Retrieve the value of a key at a specific timestamp (UNIX UTC).
- ✅ List all keys with their latest values.
- Laravel 12 (PHP 8.3+)
- MySQL or SQLite
- GitHub Actions for CI
- PHPUnit for testing
| Method | Endpoint | Description |
|---|---|---|
| POST | /api/v1/object-keys |
Save a new value for a key |
| GET | /api/v1/object-keys/{key} |
Get the latest value for a key |
| GET | /api/v1/object-keys/{key}?timestamp=t |
Get value for key at given timestamp |
| GET | /api/v1/object-keys |
Get all historical versions (all keys) |
https://object-key-gmalahito.up.railway.app/api/v1/object-keys
Request Body:
{
"key": "0efe6f71-8867-4b3a-b67d-52ef2683424c"
}Response Body:
{
"message": "Object created successfully",
"data": {
"key": "0efe6f71-8867-4b3a-b67d-52ef2683424c",
"value": "String value",
"type": "string",
"created_at": "2025-08-07T12:58:27.000000Z"
}
}https://object-key-gmalahito.up.railway.app/api/v1/object-keys/0efe6f71-8867-4b3a-b67d-52ef2683424c
Response Body:
{
"data": {
"New String value"
}
}Response Body:
{
"data": {
"String value"
}
}https://object-key-gmalahito.up.railway.app/api/v1/object-keys
Response Body:
{
"data": [
{
"key": "0efe6f71-8867-4b3a-b67d-52ef2683424c",
"value": "String value",
"type": "string",
"created_at": "2025-08-07T13:04:18.000000Z"
},
{
"key": "0efe6f71-8867-4b3a-b67d-52ef2683424c",
"value": "New String value",
"type": "string",
"created_at": "2025-08-07T13:07:52.000000Z"
}
],
"meta": {
"total": 2,
"timestamp": "2025-08-07T13:08:56.675859Z"
}
}