A full report on Google Summer of Code 2023 @ FOSSology
Project: "REST API improvements"
A brief introduction about myself
I am Soham Banerjee, a Computer Science and engineering student at RCCIIT Kolkata. I have been a Full-Stack developer and have been working for many organisations since the past 3 years. Have been an open source software enthusiast since I was introduced to it in the 1st year of my college and, I am grateful to be a part of FOSSology under the Google Summer of Code program for 2023.
In this article I am going to outline the details of my contributions as a reference of project completion during the entire duration of Google Summer of Code 2023.
During this period I have mainly worked on two modules for the Fossology Project.
-
Enhancing existing endpoints: In this category we redefined old endpoints and enhanced them with more features.
-
Developing REST APIs: We introduced many more features using API endpoints so that they can used in the UI or can be used as a service.
Let's have a deeper look into the processes and flows that were implemented in this Google Summer of Code!
This particular endpoint provides the user with the openAPI documentation for the existing APIs as a response.
- Endpoint
/openapi
π¨βπ» PR link - feat(api): openapi.yaml exposed through API
This API endpoint would provide the user with the copyright information associated with a particular Item.
- Endpoint
/uploads/{UploadId}/item/{ItemId}/copyrights
π¨βπ» PR link - feat(api): copyright info for file
This particular endpoint can be used to delete a particular endpoint for an Item. The endpoint takes in the hash of the copyright that needs to be deleted.
- Endpoint
DELETE
/uploads/{UploadId}/item/{ItemId}/copyright/<Hash>
π¨βπ» PR link - feat(api): Delete Copyright for a File
This particular endpoint can be used to update the already existing copyrights for a file. The API uses the hash of the copyright to update the endpoint.
- Endpoint
PUT
/uploads/{UploadId}/item/{ItemId}/copyright/<Hash>
π¨βπ» PR link - feat(api): API for updating File copyright content
This particular endpoint can be used to restore a deleted copyright.
- Endpoint -
PATCH
/uploads/{UploadId}/item/{ItemId}/copyright/<Hash>
π¨βπ» PR link - feat(api): restore deleted copyrights
Developed an API endpoint to return the details of the inactive copyrights from the server
- Endpoint -
uploads/{UploadId}/item/{ItemId}/copyrights/inactive
π¨βπ» PR link - feat(api): get inactive copyright details for a file
This particular endpoint provides us with the info of a particular file from the Fossology server.
- Endpoint
/uploads/{UploadId}/item/{ItemId}/info
π¨βπ» PR link - feat(api): File info API
This particular endpoint provides the total number of copyrights in a file.
- Endpoint
/uploads/{UploadId}/item/{ItemId}/totalcopyrights
π¨βπ» PR link - feat(api): API to return total number of copyrights for a file
Developed an endpoint that provides us with the conf info for a specific upload.
- Endpoint
/uploads/{UploadId}/item/{UploadId}/conf
π¨βπ» PR link - feat(api): conf info for upload
Created an endpoint that sends the customise page data from the fossology server
- Endpoint
/customise
π¨βπ» PR link - feat(api): Get Customise page data
This particular endpoint provides us with the banner message that is displayed in the old UI.
- Endpoint -
/customise/banner
API response:
π¨βπ» PR link - feat(api): Get banner message
Developed an endpoint to get the list of all obligations from the server. This particular endpoint can be used to get the data for the dropdown.
- Endpoint
/obligations/list
π¨βπ» PR link - feat(api): api to get the list of obligations
Developed an endpoint that provides us with the details of a particular obligation. The API takes in the id of the obligation as a parameter.
- Endpoint
/obligations/{id}
API response:
π¨βπ» PR link - feat(api): get details of a particular obligation using id
Developed an endpoint that provides user with all the obligations details from the backend server.
- Endpoint
/obligations/
API response:
π¨βπ» PR link - feat(api): Get details of all obligations
This particular endpoint can be used to delete an obligation from tghe server.
- Endpoint
DELETE
/obligations/{ObligationID}
API response:
π¨βπ» PR link - feat(api): Get details of all obligations
During the GSoC period, I got the time to create and organize documentation for the FOSSology REST-API. The documentation contains all the user and developer information of the project and is organized in a way to be easily accessible by all.
The weekly documentation of updates can be found at FOSSology/gsoc
Tasks | Planned | Completed | Remarks |
---|---|---|---|
Adding all the high priority APIs | Yes | βοΈ | All the APIs with High priority have been developed and delivered during the official coding period of the Google Summer of Code 2023 |
Enhanching existing APIs for additional functionality | Yes | βοΈ | APIs with limited functionality have been enhanced with the requirements and demands of the clients and users |
Identifying and fixing some potential the existing bugs | Yes | βοΈ | A lot of pre-existing bugs were sptted in the backend server. Some of them were fixed and for the rest of them issues have been made in the Fossology repository |
Creating rest of the API endpoints for the medium and low priority functionalities | Yes | βοΈ | A lot of new endpoints with completely new features were added and discussed with the mentors in order to enhance the functionality of the Fossology Server |
Writing Test Cases for the existing and New API endpoints | Yes (WAS OPTIONAL) | β | Got the overview, still test cases needs to be implemented, especially for the newer endpoints. |
- Adding test cases for the existing REST-API endpoints so that reliablity of the back-end server can be ensured.
- Working on the new UI in order to continue the migration procedure of the fossology software.
- More testing and enhancement of the APIs upon discussion with the mentors.
- Developing REST API endpoints gave me an in depth overview of the entire process and flow of the Fossology software.
- Proper planning tecniques and discussion with the mentors and peers hepled in the smooth execution of the entire project.
- An excellent learning experience from the mentors while solving real life problems.