Enterworks - ETT 125 - How to Create a Simplified REST API Using a Java Microservice

Enterworks - ETT 125 - How to Create a Simplified REST API Using a Java Microservice

Application Development, Rest API

rate limit

Code not recognized.

About this course

The EnterWorks REST API is ID-centric meaning most objects are referenced by their internal ID numbers. This requires either first making the appropriate calls to get the mappings between names and IDs and then translating between the two when doing updates or retrievals, or hard-coding IDs within the API calls. The former option requires additional programming and may not be an option within some client applications that support defining REST calls. The latter increases maintenance efforts as numbers representing repositories and attributes are less meaningful than names. There is also the risk of those IDs changing between environments or if objects are deleted and re-created, resulting in malfunctioning client applications. 

By creating a micro-service, it is possible to create a REST API that is name centric that performs the translations between names and IDs, so the client applications can be kept simple, highly portable and less susceptible to environmental changes. It is also possible to implement REST API calls that are higher-level than what is provided in the EnterWorks REST API. These higher-level calls can be implementation-specific, resulting in less client processing and a shorter learning curve. Implementing a REST API layer on top of the EnterWorks REST API also makes it possible to meter calls made from the client to reduce the possibility of client applications overwhelming EnterWorks with what would otherwise seem like a denial-of-service attack.

The example micro-service includes a simplified CRUD API layer (Create, Read, Update, Delete). The Create, Update, and Delete endpoints mirror the EnterWorks REST API while the Read endpoint covers the most common, but not all the operations supported by the EnterWorks REST API counterpart. This session covers how this layer is implemented and demonstrates the various calls that can be made and reviews the steps necessary to install and configure the micro-service, which also includes previous examples for downloading files, executing SQL from Widgets or the REST API, and launching Scheduled Import jobs from widgets in the new UI.

 Prerequisites - ETT 117, ETT 108, ETT 020, ETT 041

Update 12/22/2023

  • Added support for secure EnterWorks UI (SSL)

Update 03/22/2024

  • Corrected issues with SSL support

About this course

The EnterWorks REST API is ID-centric meaning most objects are referenced by their internal ID numbers. This requires either first making the appropriate calls to get the mappings between names and IDs and then translating between the two when doing updates or retrievals, or hard-coding IDs within the API calls. The former option requires additional programming and may not be an option within some client applications that support defining REST calls. The latter increases maintenance efforts as numbers representing repositories and attributes are less meaningful than names. There is also the risk of those IDs changing between environments or if objects are deleted and re-created, resulting in malfunctioning client applications. 

By creating a micro-service, it is possible to create a REST API that is name centric that performs the translations between names and IDs, so the client applications can be kept simple, highly portable and less susceptible to environmental changes. It is also possible to implement REST API calls that are higher-level than what is provided in the EnterWorks REST API. These higher-level calls can be implementation-specific, resulting in less client processing and a shorter learning curve. Implementing a REST API layer on top of the EnterWorks REST API also makes it possible to meter calls made from the client to reduce the possibility of client applications overwhelming EnterWorks with what would otherwise seem like a denial-of-service attack.

The example micro-service includes a simplified CRUD API layer (Create, Read, Update, Delete). The Create, Update, and Delete endpoints mirror the EnterWorks REST API while the Read endpoint covers the most common, but not all the operations supported by the EnterWorks REST API counterpart. This session covers how this layer is implemented and demonstrates the various calls that can be made and reviews the steps necessary to install and configure the micro-service, which also includes previous examples for downloading files, executing SQL from Widgets or the REST API, and launching Scheduled Import jobs from widgets in the new UI.

 Prerequisites - ETT 117, ETT 108, ETT 020, ETT 041

Update 12/22/2023

  • Added support for secure EnterWorks UI (SSL)

Update 03/22/2024

  • Corrected issues with SSL support