Refernce: https://developers.google.com/drive/v2/reference/
using google drive as reference
1)Version should be part of rest api url even for get, search, insert, update, delete
2)HTTP methods usages
GET for read
POST for insert
PUT for update
DELETE for delete
ex:
#Get file meta data
GET /files/
#insert file
POST /files
#update file
PUT /files/
#delete file
DELETE /files/
note: place holder for fileid
GET /files/234 here 234 is fileid
3)Use plural, nouns for resource name
ex:
files
using google drive as reference
1)Version should be part of rest api url even for get, search, insert, update, delete
ex: https://www. googleapis. com/upload/drive/v2/files
2)HTTP methods usages
GET for read
POST for insert
PUT for update
DELETE for delete
ex:
#Get file meta data
GET /files/
#insert file
POST /files
#update file
PUT /files/
#delete file
DELETE /files/
note:
GET /files/234 here 234 is fileid
3)Use plural, nouns for resource name
ex:
https://www. googleapis. com/upload/drive/v2/files
files
No comments:
Post a Comment