Automatically generate REST API for scaffolding pattern support
1640
Views
14
Comments
On our RadarOn our Radar
Backend

I'd like to be able to generate a REST API automatically from an entity.  The API should support search/filter, sort, pagination and CRUD operations. Once the API is generated, I'd like to use it with scaffolding patterns to create web screens. This would make implementing a three tier application architecture much easier.

I support (and liked) this idea, especially this part: use scaffolding for the API structures. I raised a Forum question of that yesterday, see this link: https://www.outsystems.com/forums/discussion/39313/why-scaffolding-only-works-for-entities-and-not-for-webservices-and-sap-connector/

By way of scaffolding or just a right click on entity to generate REST API CRUD services, this is a necessary feature when designing microservices based architectures.

Merged this idea with 'expose entity as rest api / service action' (created on 12 Mar 2021 15:53:58 by Rui Madaleno)

Provide the ability to right click on an entity and select the option of "expose as rest service/service action"

This accelerator would create a rest api/service action with methods for querying the data, building the server action to fetch data from the entity, using a server aggregate, including pagination - startindex/numrecords (as we have in the screen scaffolding) and return a structure that represents the data in the entity (decoupling contract from data)


use cases:

  • Accelerator to create domain api's / external API's
  • Allow test automation of end user apps that consume the entity


Example

Merged this idea with 'Accelerator/Wizard to create APIs that expose entities.' (created on 07 May 2021 02:06:01 by Jay Parnau)

The concept is to create accelerators in Service Center with templates for exposing APIs.

The most simple example would be to create  'CRUD API Operations' API methods for an entity.

For example:

1. Right click an entity, select 'advanced', and then select 'Expose via API'

2. Multi-select your actions ->

 ---create

----read*

----update

----delete

----list*

3. Answer the question "Do you want to create API operations in a new or existing endpoint?"  (enter new or select existing)

3. If new, Select REST or SOAP.

4. If new, configure security options


Press go.


The result would be that you've just created an endpoint with a best practice set of actions to do standard data operations on an entity.






This comment was:
- originally posted on idea 'Accelerator/Wizard to create APIs that expose entities.' (created on 07 May 2021 by Jay Parnau)
- merged to idea 'expose entity as rest api / service action' on 07 May 2021 06:04:31 by Daniël Kuhlmann

Hi @Jay Parnau, the ideia is having this accelerator in Service Studio (not in service center)

Yes, Service Studio. 

Changed the category to
Service Studio
Merged this idea with 'api scaffolding' (created on 03 Sep 2024 18:09:51 by Kerollos Adel)

adding option to create full api for any entity by click , like adding option create APIs this options create the actions and APIs for selected Entity

Changed the category to
Data & Integrations

Please first search Ideas before your post, this is one of many ideas you posted that already exist, i will merge it.

This is crucial for accelerating development. Not every client will need to create entities to take advantage of the platform's acceleration.

API-based scaffolding makes perfect sense. Currently, OutSystems' advantage in accelerating development isn't significant, as AI is well-advanced in traditional development.