-
Notifications
You must be signed in to change notification settings - Fork 3
new project
Chihjen Ko edited this page Nov 27, 2018
·
1 revision
由於權限控制機制會依使用者在特定計畫的角色決定使用者可進行的操作,使用者在新增計畫前必須要被設定為新計畫的 Project Manager。前提是計畫名稱不存在,也沒有其他使用者擁有與此計畫相關的任何角色。
- endpoint
/project/init
- post data
{"projectTitle": "新計畫的名稱"}
- response
default db response
bulk-insert 或 bulk-replace: bulk-* 系列的操作,post data 的 json root 都是 array,必要時可批次操作,減少 HTTP request 的數量,提高速度;
- endpoint
/project/bulk-insert
- post data
[
{
"projectTitle": "測試計畫1 // 計畫名稱",
"shortTitle": "測1 // 計畫簡稱",
"adminProjectId": "FB-test-cameratrap-01 // 計畫編號",
"funder": "林務局 // 委辦單位",
"principalInvestigator": "測試principalInvestigator // 計畫主持人",
"projectStartDate": "2018-10-15 // 計畫時間:起",
"projectEndDate": "2018-12-10 // 計畫時間:迄",
"adminArea": [ // 計畫地區, 見 WF 2.3.7
"苗栗縣",
"新竹縣"
],
"abstract": "// 計畫摘要",
"remarks": "// 備註",
"coverImage": "http://example.org/kinda_animal_cover.jpg //計畫封面",
"license": { 創用 CC 授權 // WF 2.3.11 ~ WF 2.3.13
"metadata": "CC BY 4.0", // 詮釋資料授權
"data": "CC BY 4.0", // 鑑定資訊授權
"multimedia": "CC BY-NC 4.0" // 影像資料授權
},
"dataFieldEnabled": [ // 欄位設定 WF 3.2.1
"sex", // 性別
"lifeStage", // 年齡
"antler", // 角況
"remarks" // 備註
],
"cameraLocations": [
{
"fullCameraLocationMd5": "md5 string of `$projectTitle/$site/$subSite/$cameraLocation`, use `NULL` for null value",
"projectTitle": "測試計畫1",
"site": "苗栗",
"subSite": "南庄鄉田美村",
"cameraLocation": "HC20A",
"original_x": "122",
"original_y": "23.5",
"original_geodatum": "wgs84",
"elevation": 56,
"wgs84dec_x": 122,
"wgs84dec_y": 23.5,
"twd97tm2_x": 223456,
"twd97tm2_y": 2345678,
"dailyTestTime": [ // 可先略過這項
{
"since": 1539593959,
"time": "12:00:00"
}
],
"vegetation": "榕楠林帶",
"land_cover": "森林"
}
],
"dailyTestTime": [
{
"since": 1539593959,
"time": "12:00:00"
}
],
"timezone": "+8",
"dataPublicDate": "// 資料公開日期,計畫起始時間的兩年後"
}
]
- response
default db response