This is the ThingsDB documentation for version v0, click here for the latest version!
Returns information about a specific collection.
This function requires QUERY
privileges on the requested collection
, or EVENT
privileges on the @thingsdb
scope.
This function does not generate an event.
collection_info(collection)
Argument | Type | Description |
---|---|---|
collection | str/int (required) | Name or Id of the collection |
Returns mpdata about the collection.
Returns information about collection stuff:
collection_info('stuff');
Example return value in JSON format
{
"collection_id": 782,
"created_at": 1579175900,
"name": "stuff",
"things": 61352,
"time_zone": "UTC"
}