Renovus-Tech / solarec-java

GNU Affero General Public License v3.0
0 stars 1 forks source link

Client's administration functionality #32

Open pferrariuy opened 7 months ago

pferrariuy commented 7 months ago

Feature Request

Description

Craete a Client's administration functionality endpoint so that an administrator can execute the basic CRUD actions on the different clients of the system

Expected Behavior

Create an administration endpoint for users: /api/rest/admin/clients and use the different HTTP methods to implement the corresponding CRUD actions.

GET /api/rest/admin/clients/
POST /api/rest/admin/clients
PUT /api/rest/admin/clients
DELETE /api/rest/admin/clients/#

Additional Context

For the GET method, the following parameters will be used to filter sort the information:

The GET method will support as an additional path the ID of a client, in order to return the full information of the client, while the endpoit without the client ID will return a list of partial client information, as JSON.

The POST and PUT methods will received a full information of the client as JSON.

Implementation Suggestions

The JSON of the client is currently implemented by the object tech.renovus.solarec.vo.rest.entity.Client which will have to be updated to support all the CRUD operations.

The full information must include a list of all the related tables of the database that are directly linked to a client: location, settings, parameters, metdata, etc.

Impact on Existing Features

Current endpoints using the Client object must not be affeceted by the coding of the functionality.

Related Issues