Appearance
Get namespace
GET /v4/namespace/{type}/{namespace}
Get information about a specific namespace. The path parameter type specifies the namespace type (storage or stream), and namespace specifies the namespace name.
Response schema
| Field | Type | Description |
|---|---|---|
| data | Namespace | Namespace information. |
| duration | string | Time taken to process the request, returned in a human-readable format (e.g., "1.234567ms"). |
Namespace object
| Field | Type | Description |
|---|---|---|
| name | string | The name of the namespace. |
| workspace | string | The workspace this namespace belongs to. |
| created_at | string (date-time) | When this namespace was created. |
| updated_at | string (date-time) | When this namespace was last updated. |
| tx | integer<int64> | Latest transaction ID in this namespace. |
| stat | object<string,integer> | Statistics about the namespace (key counts, size, etc.). |
Example
sh
curl --location 'https://api.litebase.io/v4/namespace/storage/sample' \
--header "Authorization: Bearer $LITEBASE_API_KEY"Response:
json
HTTP/1.1 200 OK
Content-Type: application/json
{
"data": {
"name": "sample",
"workspace": "default",
"created_at": "2024-03-20T10:30:00Z",
"updated_at": "2024-03-20T10:35:00Z",
"tx": 2,
"stat": {
"key_count": 2,
"size_bytes": 1024
}
},
"duration": "1.234567ms"
}