Get project details
Get specified project detail infomation
Request
curl -vvv "$API_HOST/open/api/v1/projects/$project_id/" -H "Authorization: $access-token"
Python example
def get_project_detail(access_token,project_id):
url = '%s/open/api/v1/projects/%d/' % (API_HOST, project_id)
headers = {'Authorization': access_token}
req = requests.get(url, headers=headers)
return req.json()
# get first project in workspace
workspace = ma.openapi_list_workspaces(access_token)["detail"][0]
ws_detail= ma.get_workspace_detail(access_token, workspace)
project = ws_detail['detail']['detail']['projects'][0]
resp = ma.get_project_detail(access_token,project["id"])
Response
Name | Type | Description |
---|---|---|
detail | array | Project Detail Info |
∟ id | int64 | project id |
∟ name | string | project name |
∟ icon | string | project icon |
∟ desc | string | project description |
∟ timezone | string | project timezone |
∟ creator | object | project creator info |
∟ updateTime | string | project update time |
∟ createTime | string | project create time |
∟ roleInherited | bool | whether inherited permissions |
∟ tableNodes | array | tables in project |
∟ recycleTableNodes | array | tables in the trash |
∟ mapConfig | object | project map config info |
∟ memberCount | int64 | project members number |
Response example
{
"code": 0,
"detail": {
"id": 16,
"name": "projectName",
"icon": "todo",
"desc": "project description",
"timezone": "Asia/Shanghai",
"creator": {
"id": 1,
"name": "n***@elgo.cc",
"avatar": null
},
"updateTime": "2023-05-12T08:23:48.766653+08:00",
"createTime": "2023-05-12T08:23:48.766652+08:00",
"roleInherited": false,
"tableNodes": [
{
"id": 73,
"name": "新建数据表",
"type": "table",
"order": 1,
"parentID": null,
"subscribed": false,
"published": false,
"roleInherited": true,
"createTime": "2023-05-12T08:23:48.768107+08:00",
"updateTime": "2023-05-12T08:23:52.262989+08:00"
},
{
"id": 75,
"name": "table-copy",
"type": "table",
"order": 2,
"parentID": null,
"subscribed": false,
"published": false,
"roleInherited": true,
"createTime": "2023-05-12T08:23:51.516848+08:00",
"updateTime": "2023-05-12T08:23:52.26389+08:00"
},
{
"id": 74,
"name": "table-test",
"type": "table",
"order": 3,
"parentID": null,
"subscribed": false,
"published": false,
"roleInherited": true,
"createTime": "2023-05-12T08:23:50.01376+08:00",
"updateTime": "2023-05-12T08:23:52.264768+08:00"
}
],
"recycleTableNodes": null,
"mapConfig": {
"center": "108.928439,34.539281",
"zoomLevel": 10,
"positioning": false,
"ranging": true,
"isSet": false,
"is3D": false,
"bearing": 0,
"pitch": 0,
"baseMap": "AmapLight",
"title": null,
"desc": null,
"shareToken": "",
"isShared": false,
"sharePassword": "",
"useSharePassword": false
},
"memberCount": 2
},
"extra": null,
"message": "OK",
"requestID": null
}