소문자만 사용한다.
Bad
http://restapi.example.com/users/postComments
Good
http://restapi.example.com/users/post-comments
언더스코어_ 대신 하이픈-을 사용한다.
Bad
http://restapi.example.com/users/post_comments
Good
http://restapi.example.com/users/post-comments
마지막에 슬래시/를 포함하지 않는다.
Bad
http://restapi.example.com/users/
Good
http://restapi.example.com/users
행위는 포함하지 않고, HTTP Method로 나타낸다.
Bad
[POST] http://restapi.example.com/users/1/delete-post/1
Good
[DELETE] http://restapi.example.com/users/1/posts/1
파일 확장자는 URI에 포함하지 않는다.
Bad
http://restapi.example.com/users/photo.jpg
Good
GET http://restapi.example.com/users/photo
HTTP/1.1 Host: restapi.example.com Accept: image/jpg
가급적 전달하고자 하는 자원의 명사를 사용하되, 컨트롤 리소스(자원을 컨트롤하기 위한 리소스)을 의미하는 경우 예외적으로 동사를 허용한다.
Bad
http://restapi.example.com/posts/duplicating
Good
http://restapi.example.com/posts/duplicate
1, 2, 3, itemhttp://api.com/items/1items, names, fileshttp://api.com/itemsitems, names, fileshttp://api.com/user-management/users/{userId}/accountsexist, done, registerhttp://api.com/items/1/registeritems/1/memos → item1이 가지고 있는 메모 조회users/1/like/users → 사용자 1이 좋아하는 사용자 조회