You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To develop a Spring Boot service that stores in the database (Postgre) and provides access via the REST API to the
data of the Planet and Planetary System entities.
The service must implement the endpoints that will be described below.
Usage
I would you recommended to clone my project from the GitHub.
If you want to do this, please use this command:
{
"message": "The planet: Example Planet with id: 2364 was updated!"
}
Let's start from forth task.
Endpoint
What doing
DELETE /api/planet/{id}
Deletes Planet record by ID
Input Data
DELETE /api/planet/{2364}
Result
{
"message": "The planet by id:2364 was deleted!"
}
Let's start from fifth task.
Endpoint
What doing
POST /api/planet/_list
Returns a data structure that has a list of Entity 1 elements that match the requested page and the total number of pages. Example:
{planetarySystemId: 2, …,page: 1,size: 20}
{list: [...],totalPages: 5 }Entries in the array will have a reduced set of Entity 1 fields (because not all fields are needed in list mode). In the request, you can optionally specify fields (2-3 fields) by which you can filter records (entity2, etc.). Filtering should be at the level of the request to the database! Don't forget about indexes!
Returns a data structure that has a list of Entity 1 elements that match the requested page and the total number of pages. Example:
{planetarySystemId: 2, … }
{list: [...],totalPages: 5 }Entries in the array will have a reduced set of Planet fields (because not all fields are needed in list mode). In the request, you can optionally specify fields (2-3 fields) by which you can filter records (PlanetarySystem, etc.). Filtering should be at the level of the request to the database! Don't forget about indexes!
Accepts the JSON file for which the parser was developed in Task 1 (the format can be adapted). Stores all valid records from this file in the database.
file(planets.json)
In response, it generates a JSON that indicates the number of successfully imported records, as well as unsuccessful ones (for example, no matching PlanetarySystem record was found)