Skip to main content
GET
/
space
Python
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>"
  }
}

Authorizations

Authorization
string
header
required

Project Bearer token (e.g., "Bearer sk-ac-xxxx")

Query Parameters

limit
integer

Limit of spaces to return, default 20. Max 200.

cursor
string

Cursor for pagination. Use the cursor from the previous response to get the next page.

time_desc
string

Order by created_at descending if true, ascending if false (default false)

Response

200 - application/json

OK

code
integer
error
string
msg
string
data
object