How to design, implement and test a REST service

author
Talend Documentation Team
EnrichVersion
7.1
EnrichProdName
Talend Data Fabric
Talend MDM Platform
Talend Real-Time Big Data Platform
Talend ESB
Talend Data Services Platform
task
Design and Development > Designing Services
EnrichPlatform
Talend Studio

How to design, implement and test a REST service

Talend ESB allows you to initialize a REST service from an OAS/Swagger 2.0 API definition file. This document explains how to design an API in an API Design Studio and build a REST service from it.

Procedure

  1. Design your API in the API Design Studio and fill operations ids. For more information, see https://restlet.com/documentation/studio/user-guide/basics/introduction.
  2. Export your API definition to an OAS / Swagger 2.0 file.
  3. Open Talend Studio, create a Standard Job, and add a tRESTRequest component. For more information, see Getting started with a basic Job.
  4. Import your OAS / Swagger 2.0 file in the tRESTRequest component. For more information about the tRESTRequest component, see tRESTRequest.

    Your tRESTRequest endpoint, API mappings and documentation are now initialized.

    You can also create a Route and import the OAS / Swagger 2.0 file in the cREST component. For more information, see Getting started with a basic Route and cREST.
  5. Implement your service and run it. For more information, see Running Jobs and Routes.
  6. Return to the API Design Studio, open an operation, and click "Try in Client" to open the API Test Client. For more information, see https://restlet.com/documentation/client/user-guide/introduction.