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
Name | Type | Description |
---|---|---|
detail | object | Workspace object |
∟ currentUser | object | User info |
∟ projects | array | Project list |
∟ recycleProjects | array | Projects in the trash |
∟ dataFiles | array | Dataset list |
∟ recycleDataFiles | array | Datasets in the trash |
∟ unreadNotificationsCount | int64 | Unread notifications count |
Project list
Name | Type | Description |
---|---|---|
projects | array | Project list |
∟ id | int64 | Project ID |
∟ name | string | Project name |
∟ desc | string | Project description |
∟ icon | string | Project icon |
∟ updateTime | string | Project updated time |
∟ createTime | string | Project created time |
∟ memberCount | string | Project member count |
∟ creator | object | Project creator |
∟ id | int64 | Project creator ID |
∟ name | string | Project creator name |
∟ avatar | string | Project creator avatar |
∟ tableNodes | array | Tables in projects |
Table list
Name | Type | Description |
---|---|---|
tableNodes | array | Table list |
∟ id | int64 | Table ID |
∟ name | string | Table name |
∟ type | string | type: table, bigTable, group |
∟ subscribed | boolean | Is subscribed table |
∟ published | boolean | Is published table |
∟ createTime | string | Created 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
}