REST API URI design


Rule #1: A trailing forward slash (/) should not be included in URIs
Rule #2: Forward slash separator (/) must be used to indicate a hierarchical relationship
Rule #3: Hyphens (-) should be used to improve the readability of URIs
Rule #4: Underscores (_) should not be used in URIs
Rule #5: Lowercase letters should be preferred in URI paths
Rule #6: File extensions should not be included in URIs
Rule #7: Should the endpoint name be singular or plural? // 简单化总是使用附属

URL 动词 + 宾语
使用复数
HTTP 方法动词的覆盖
URL 避免多级,用查询字符串表达
响应提供链接