One reason I like to build an application in public is that it keeps me accountable. I can’t run away. If I don’t finish something, it’s ok. At least, I will have something done to show to people. Building in public is not a new idea, a lot of people have used it. In this post, I discuss the design of REST API for Social KPI.
In the previous post here, we discussed the architecture of the application we are building. This will be an ongoing process as we continue to build our application and evolve.
We will follow the following tips to design REST APIs
- We will use Resource to represent object for REST APIs
- API endpoint will represent a resource object in the plural. Example – companies, users
- We will use HTTP status codes for success or failure of the request
- We will use JSON object to represent a response
- And we will use versioning to represent a version of APIs
As discussed in the previous post application idea, we will have APIs for companies, users of those companies, customers, clicks, engagements data. While concluding this short post, I want to say that the next post will include database design as well as URL design for REST APIs.
We will be using Spring Boot to build REST API.
In conclusion, I discussed the design of the REST API for the web application Social KPI. If you want to follow the progress, subscribe here.