List Blocks For Identity
identities.blocks.list(stridentity_id, BlockListParams**kwargs) -> SyncArrayPage[BlockResponse]
/v1/identities/{identity_id}/blocks
Get all blocks associated with the specified identity.
Parameters
Returns
List Blocks For Identity
from letta_client import Letta
client = Letta(
api_key="My API Key",
)
page = client.identities.blocks.list(
identity_id="identity-123e4567-e89b-42d3-8456-426614174000",
)
page = page.items[0]
print(page.id)
[
{
"id": "id",
"value": "value",
"base_template_id": "base_template_id",
"created_by_id": "created_by_id",
"deployment_id": "deployment_id",
"description": "description",
"entity_id": "entity_id",
"hidden": true,
"is_template": true,
"label": "label",
"last_updated_by_id": "last_updated_by_id",
"limit": 0,
"metadata": {
"foo": "bar"
},
"preserve_on_migration": true,
"project_id": "project_id",
"read_only": true,
"template_id": "template_id",
"template_name": "template_name"
}
]Returns Examples
[
{
"id": "id",
"value": "value",
"base_template_id": "base_template_id",
"created_by_id": "created_by_id",
"deployment_id": "deployment_id",
"description": "description",
"entity_id": "entity_id",
"hidden": true,
"is_template": true,
"label": "label",
"last_updated_by_id": "last_updated_by_id",
"limit": 0,
"metadata": {
"foo": "bar"
},
"preserve_on_migration": true,
"project_id": "project_id",
"read_only": true,
"template_id": "template_id",
"template_name": "template_name"
}
]