HTTP API
APIBASE exposes deterministic data access over HTTP using bearer tokens.
Stateless Auth
Every request is validated independently using a bearer token.
Coordinate Requests
Read data by addressing coordinates: table / record / column.
Deterministic Output
No hidden state, no sessions. The same request yields the same result.
1. Authentication
All API requests require a bearer token.
Authorization: Bearer YOUR_TOKEN
- Tokens are stored hashed (never plain text).
- No session is required.
- Tokens can be revoked at any time.
2. API Modes
Personal API
Full access to your own BASE (read/write). The token selects the BASE automatically.
/api/get/T2 /api/post/T2 /api/put/T2/L3 /api/put/T2/L3/C2 /api/delete/T2/L3
HIVE Gateway
Collaboration access to a shared department BASE (read/write depending on gateway rules and ACL). Requires a hive-scope token + explicit ACL authorization.
/hive/get/<basekey>/T2 /hive/get/<basekey>/T2/L3 /hive/get/<basekey>/T2/L3/C2
3. API Addressing Model
Structural Identifiers
- Tables are referenced by numeric ids:
T1,T2,T256 - Records are referenced by primary identifiers:
L1,L2,L95 - Columns are referenced by column ids:
C1,C2
L addresses a record by primary identifier, not by physical storage line.
Primary Identifiers
Fields such as id_author or id_equipement define the logical identity of a record.
In API requests, the L segment targets the value of this primary identifier.
4. Read Operations (Personal API)
In API requests, L2 means “record whose primary identifier is 2”.
Using L alone means “all records”.
GET /api/get/T2 GET /api/get/T2/L2 GET /api/get/T2/L2/C2?format=raw GET /api/get/T2/L2?format=assoc
Examples (curl)
# Read a table curl https://apibase.work/api/get/T2 \ -H "Authorization: Bearer YOUR_TOKEN" # Read a record (default format) curl https://apibase.work/api/get/T2/L2 \ -H "Authorization: Bearer YOUR_TOKEN" # Read a record (assoc format) curl https://apibase.work/api/get/T2/L2?format=assoc \ -H "Authorization: Bearer YOUR_TOKEN" # Read a cell (raw value) curl https://apibase.work/api/get/T2/L2/C2?format=raw \ -H "Authorization: Bearer YOUR_TOKEN" # Read a record (meta) curl https://apibase.work/api/get/T2/L2?format=meta \ -H "Authorization: Bearer YOUR_TOKEN"
Example responses
Response (table):
{
"status": "success",
"data": [
{
"1": "1",
"2": "Albert Einstein"
},
{
"1": "2",
"2": "Socrates"
},
{
"1": "3",
"2": "Friedrich Nietzsche"
}
]
}
Response (record):
{
"status": "success",
"data": {
"1": "2",
"2": "Socrates"
}
}
Response (format=assoc):
{
"status": "success",
"data": {
"id_author": "2",
"author": "Socrates"
}
}
Response (raw cell):
Socrates
Response (format=meta):
{
"status": "success",
"data": {
"1": "2",
"2": "Socrates"
},
"header": {
"1": "id_author",
"2": "author"
},
"tlc": {
"table": 2,
"line": 2
},
"rows": 3
}
5. Write Operations (Personal API)
Create (POST)
Insert a new record into a table.
POST /api/post/T2
{
"record": {
"author": "Plato"
}
}
curl -X POST https://apibase.work/api/post/T2 \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "record": { "author": "Plato" } }'
Replace (PUT record)
Replace the full logical content of a record.
PUT /api/put/T2/L2
{
"record": {
"id_author": "2",
"author": "Socrates"
}
}
curl -X PUT https://apibase.work/api/put/T2/L2 \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "record": { "id_author": "2", "author": "Socrates" } }'
Update (PUT cell)
Update a single cell inside a record.
PUT /api/put/T2/L2/C2
{
"value": "Socrates"
}
curl -X PUT https://apibase.work/api/put/T2/L2/C2 \
-H "Authorization: Bearer YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{ "value": "Socrates" }'
Delete
Delete a record by primary identifier.
DELETE /api/delete/T2/L2
curl -X DELETE https://apibase.work/api/delete/T2/L2 \ -H "Authorization: Bearer YOUR_TOKEN"
6. Response Formats
- format=assoc — returns structured associative output (record/table)
- format=raw — returns a scalar value (cell only)
- format=meta — returns table header + row count
GET /api/get/T2/L2?format=assoc GET /api/get/T2/L2/C2?format=raw GET /api/get/T2?format=meta
7. Filtered Reads
Read requests may also apply an operator filter on a table scope. For the full coordinate language and operator details, see the TLC page.
GET /api/get/T14/L/C4/O28?V=N.D GET /api/get/T14/L/C7/O7?V=100 GET /api/get/T14/L/C7/O32?V=101_110 GET /api/get/T14/L/C7/O33?V=294_388_482
7. HIVE Operations (Gateway)
HIVE provides access to a shared BASE through a base key and ACL-controlled gateway.
GET /hive/get/<basekey>/T2 GET /hive/get/<basekey>/T2/L2?format=assoc GET /hive/get/<basekey>/T2/L2/C2?format=raw POST /hive/post/<basekey>/T2 PUT /hive/put/<basekey>/T2/L2 DELETE /hive/delete/<basekey>/T2/L2
curl https://apibase.work/hive/get/inventaire/T2/L2?format=assoc \ -H "Authorization: Bearer YOUR_HIVE_TOKEN"
<basekey> segment.
8. Error Model
400 Bad Request 401 Unauthorized 403 Forbidden 404 Not Found
Errors return structured JSON responses.