Authorizations
Project Bearer token (e.g., "Bearer sk-ac-xxxx")
Path Parameters
Space ID
Query Parameters
Block type
Available options:
page, folder, text, sop Parent ID
from acontext import AcontextClient
client = AcontextClient(api_key='sk_project_token')
# List blocks
blocks = client.blocks.list(
space_id='space-uuid',
parent_id='parent-uuid',
block_type='page'
)
for block in blocks:
print(f"{block.id}: {block.title}"){
"code": 123,
"error": "<string>",
"msg": "<string>",
"data": [
{
"created_at": "<string>",
"id": "<string>",
"is_archived": true,
"parent_id": "<string>",
"props": {},
"sort": 123,
"space_id": "<string>",
"title": "<string>",
"type": "<string>",
"updated_at": "<string>"
}
]
}List blocks in a space. Use type query parameter to filter by block type (page, folder, text, sop, etc.). Use parent_id query parameter to filter by parent. If both type and parent_id are empty, returns top-level pages and folders.
from acontext import AcontextClient
client = AcontextClient(api_key='sk_project_token')
# List blocks
blocks = client.blocks.list(
space_id='space-uuid',
parent_id='parent-uuid',
block_type='page'
)
for block in blocks:
print(f"{block.id}: {block.title}"){
"code": 123,
"error": "<string>",
"msg": "<string>",
"data": [
{
"created_at": "<string>",
"id": "<string>",
"is_archived": true,
"parent_id": "<string>",
"props": {},
"sort": 123,
"space_id": "<string>",
"title": "<string>",
"type": "<string>",
"updated_at": "<string>"
}
]
}Project Bearer token (e.g., "Bearer sk-ac-xxxx")
Space ID
Block type
page, folder, text, sop Parent ID