Create REST
The Talisman Platform is designed to empower end users to define REST services with ease. Utilizing the flexible and powerful capabilities of Apache Camel, Talisman allows for the creation of RESTful services through a straightforward, REST-style configuration. This approach enables the definition of services using common HTTP verbs such as GET, POST, DELETE, among others, facilitating the rapid development and deployment of REST APIs.
Create new REST Service
To define a REST service in Talisman follow the instructions:
The following YAML will be generated:
- rest:
id: rest-462a
path: /account
consumes: application/json
produces: application/json
bindingMode: auto
get:
- id: get-fb65
to: direct:get-sccount
post:
- id: post-4760
to: direct:post-account
Configuration Elements:
- rest: The root element defining a REST service.
- id: A unique identifier for the REST service.
- path: The base path for the service endpoints.
- consumes: The MIME type that the service can consume.
- produces: The MIME type that the service produces.
- bindingMode: Specifies how request and response messages are bound to the Camel message model. auto lets Camel decide the best mode.
- get/post/delete/etc.: HTTP methods supported by the service. Each method can have multiple operations defined as a list:
- id: Unique identifier for the operation.
- to: Specifies the Camel endpoint to which the request should be routed.