Get workspace list
List user's workspaces.
Request
curl -vvv "$API_HOST/open/api/v1/workspaces/" -H "Content-Type: application/json" -H "Authorization: $access-token"
Python example
def openapi_list_workspaces(access_token):
url = '%s/open/api/v1/workspaces/' % API_HOST
headers = {'Authorization': access_token}
req = requests.get(url, headers=headers)
return req.json()
Response
Name | Type | Description |
---|---|---|
detail | array | workspace list |
∟ id | int64 | workspcae id |
∟ type | string | workspcae type: user or org |
∟ name | string | wname |
∟ avatar | string | the url for avatar |
Response body example
{
"code": 0,
"detail": [
{
"id": 164,
"name": "580****9080",
"type": "user",
"avatar": null,
"plan": "base"
}
],
"extra": null,
"message": "OK",
"requestID": null
}