Planning and Creating 4 Responses 4 HTTP Status Codes, Errors and Messages 4 Data Output Structure 4 Security and Controlled Access 4 Other Considerations
you wish to have and it is very dependent on the features of your application. For instance, building an Android book store might have resources like: users, books, book_categories, book_downloads etc.
to your database so you can run tests and have data returned. Seeds are NOT meant to be used in production. You can use libraries that generate fake data to create fake data for each column in your database table.
handle. This usually starts out with the resources and the CRUD (Create, Read, Update, Delete) operations for them. List each resource out (a resource can be "books" or "places" or "articles")
if it needs additional methods or additional parameters. For instance, you might have a "books" resource and you want a cool feature like "Favorite Book". Those things need to be planned also.
created to generate endpoints that respond to different HTTP verbs. You will need a little knowledge on RESTful APIs and “best practices” for naming conventions. hackernoon.com/restful-api-designing-guidelines-the-best-practices-60e1d954e7c9
create operations, DELETE for delete operations and PUT for update operations. hackernoon.com/restful-api-designing-guidelines-the-best-practices-60e1d954e7c9
and match what you are trying to tell the client. For instance, when a resource is not found, a 404 - Not Found status code must be passed to the client. When a resource is created, you can pass a 201 - Created. https://restfulapi.net/http-status-codes/
"data": [ { "id": 1234 "text": "The tin go skraaaa..." }, { "id": 1234 "text": "Pa pa ka ka ka..." } ] } } } http://jsonapi.org/format/ By using a standard, you will always have consistent response across endpoints. No surprises.