Skip to content
Get started

Labric Read Api

tools.read(ToolReadParams**kwargs) -> ToolReadResponse
post/api/v1/tools/read

Read records from a table.

Returns records from the specified table matching the given filters. Use 'single' mode to retrieve exactly one record, or 'multiple' mode to retrieve all matching records.

ParametersExpand Collapse
filters: Dict[str, object]

Key-value filters to apply to the query.

target_name: str

The name of the table to read from.

target_type: Literal["table", "core-table"]

The type of target. Either 'table' or 'core-table'.

Accepts one of the following:
"table"
"core-table"
mode: Optional[Literal["single", "multiple"]]

'single' returns exactly one record and throws an error if more than one matching record exists, 'multiple' returns all matches.

Accepts one of the following:
"single"
"multiple"
ReturnsExpand Collapse
ToolReadResponse = List[Dict[str, object]]
Labric Read Api
from labric import Labric

client = Labric(
    api_key="My API Key",
)
response = client.tools.read(
    filters={
        "foo": "bar"
    },
    target_name="target_name",
    target_type="table",
)
print(response)
[
  {
    "foo": "bar"
  }
]
Returns Examples
[
  {
    "foo": "bar"
  }
]