from acontext import AcontextClient
client = AcontextClient(api_key='sk_project_token')
# List spaces
spaces = client.spaces.list(limit=20, time_desc=True)
for space in spaces.items:
print(f"{space.id}: {space.configs}"){
"code": 123,
"error": "<string>",
"msg": "<string>",
"data": {
"has_more": true,
"items": [
{
"configs": {},
"created_at": "<string>",
"id": "<string>",
"project_id": "<string>",
"updated_at": "<string>"
}
],
"next_cursor": "<string>"
}
}Get all spaces under a project
from acontext import AcontextClient
client = AcontextClient(api_key='sk_project_token')
# List spaces
spaces = client.spaces.list(limit=20, time_desc=True)
for space in spaces.items:
print(f"{space.id}: {space.configs}"){
"code": 123,
"error": "<string>",
"msg": "<string>",
"data": {
"has_more": true,
"items": [
{
"configs": {},
"created_at": "<string>",
"id": "<string>",
"project_id": "<string>",
"updated_at": "<string>"
}
],
"next_cursor": "<string>"
}
}Project Bearer token (e.g., "Bearer sk-ac-xxxx")
Limit of spaces to return, default 20. Max 200.
Cursor for pagination. Use the cursor from the previous response to get the next page.
Order by created_at descending if true, ascending if false (default false)