2
我的系統裏面有Employees,Designation,DesignationHierarchy。並基於DesignationHierarchy我有EmployeeHierarchy。REST調用應該如何?
我有以下REST的URL,
來訪問僱員,
//employees/:empployeeNo
要訪問指定
//designations/:designationNo
要獲得指定員工,
//employees/:employeeNo/designations/:designation/:id //Here I have used id of EmployeeDesignation resource because there are multiple entries for that employee with same designation for different timespans
當一世 說層次結構,它不是EmployeeDesignation資源的Employee層次結構的層次結構。
要更新員工的層次我都用過,
//employees/:empNo/designations/:designation/:id/hierarchy
我也需要休息調用上日期查看員工層次的圖形, 我用下面的網址,
/employee/:employeeNo/designations/:designation/Hierarchy/graph?date=
我有在層次結構下創建子資源圖。
根據標準傳送,這些REST URL是否正確?
請糾正我,如果錯了!
關於縮短網址,我想到了這一點,併爲我認爲作爲主要資源的層次結構資源。對_update_層次結構'// hierarchy /:employeeDesignationId'和_get graph_'// hierarchy/graph'說。這聽起來有效嗎? –
@sillyquestions,是的,它確實有意義。 – Opal