Skip to main content

Get workspace details

Show the details of the specified workspace, including workspace profile, project list, and the list of data tables.

Request

curl -vvv "$API_HOST/open/api/v1/workspaces/$type/$id/" -H "Authorization: $access-token"

Python example

def get_workspace_detail(access_token, workspace):
url = '%s/open/api/v1/workspaces/%s/%d/' % (API_HOST, workspace['type'], workspace['id'])
headers = {'Authorization': access_token}
req = requests.get(url, headers=headers)
return req.json()

Response

Response body

NameTypeDescription
detailobjectWorkspace object
∟ currentUserobjectUser info
∟ projectsarrayProject list
∟ recycleProjectsarrayProjects in the trash
∟ dataFilesarrayDataset list
∟ recycleDataFilesarrayDatasets in the trash
∟ unreadNotificationsCountint64Unread notifications count

Project list

NameTypeDescription
projectsarrayProject list
∟ idint64Project ID
∟ namestringProject name
∟ descstringProject description
∟ iconstringProject icon
∟ updateTimestringProject updated time
∟ createTimestringProject created time
∟ memberCountstringProject member count
∟ creatorobjectProject creator
∟ idint64Project creator ID
∟ namestringProject creator name
∟ avatarstringProject creator avatar
∟ tableNodesarrayTables in projects
Table list
NameTypeDescription
tableNodesarrayTable list
∟ idint64Table ID
∟ namestringTable name
∟ typestringtype: table, bigTable, group
∟ subscribedbooleanIs subscribed table
∟ publishedbooleanIs published table
∟ createTimestringCreated time

Response body example

{
"code": 0,
"detail": {
"type": "user",
"detail": {
"currentUser": {
"id": 16,
"name": "587****9399",
"avatar":null },
"projects": [
{
"id": 55,
"name": "Example Project",
"icon": "mapPin",
"desc": "Example Project",
"creator": {
"id": 16,
"name": "587****9399",
"avatar":null },
"updateTime": "2022-04-07T17:24:47.590592+08:00",
"createTime": "2022-04-07T17:24:47.590591+08:00",
"roleInherited":false,
"tableNodes": [
{
"id": 434,
"name": "Parcel List",
"type": "table",
"order": 1,
"parentID":null,
"subscribed":false,
"published":false,
"roleInherited":true,
"createTime": "2022-04-07T17:24:47.611129+08:00",
"updateTime": "2022-04-07T17:24:47.61113+08:00"
},
{
"id": 435,
"name": "Hangzhou Zone1",
"type": "table",
"order": 2,
"parentID":null,
"subscribed":false,
"published":false,
"roleInherited":true,
"createTime": "2022-04-07T17:24:47.636041+08:00",
"updateTime": "2022-04-14T17:47:28.752613+08:00"
}
],
"recycleTableNodes":null,
"mapConfig": {
"center": "120.209276,30.247413",
"zoomLevel": 10,
"positioning":false,
"ranging":true,
"isSet":true,
"baseMap": "AmapLight",
"shareToken": "",
"isShared":false },
"memberCount": 1
}
],
"recycleProjects":null,
"dataFiles":null,
"recycleDataFiles":null,
"unreadNotificationsCount": 0
}
},
"extra":null,
"message": "OK",
"requestID":null
}