Skip to content

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 ​

FieldTypeDescription
dataNamespaceNamespace information.
durationstringTime taken to process the request, returned in a human-readable format (e.g., "1.234567ms").

Namespace object ​

FieldTypeDescription
namestringThe name of the namespace.
workspacestringThe workspace this namespace belongs to.
created_atstring (date-time)When this namespace was created.
updated_atstring (date-time)When this namespace was last updated.
txinteger<int64>Latest transaction ID in this namespace.
statobject<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"
}