REST Host
Last updated
Last updated
The RESTHost allows you to assemble and publish a REST web service endpoint by implementing its web methods through events. This can be done using a Swagger API description file, which imports one event for each path defined in the file.
Use the to create a valid OpenAPI 3 definition. Once created, add it to the RESTHost function's API definition property as described below.
A valid OpenAPI 3 definition for your web API in JSON or YAML format. Ensure that it is valid according to the OpenAPI 3 specification before adding it to the API Definition Editor. You can validate your definition online at .
The following aspects of the OpenAPI 3 specification are not supported by the RESTHost:
Variant type definitions, for example:
Empty schema definitions
Objects with empty "properties" lists
Polymorphism:
oneOf
anyOf
allOf
discriminator
Content type wildcards
Configure the base URL of the web service to be hosted on the server where it is deployed.
In Linx, use the +
wildcard character instead of your hostname in the Base URL property:
https://+:{port}/{path}
When the service is deployed, it will use the current server.
Authentication configuration can be defined in the security schemas of the API description. These settings are automatically pulled into the Auth config editor, from which you can update them.
To add an item or field's associated detail, click the Editor icon.
Show details for internal server errors in HTTP responses.
Values: true
/ false
The maximum number of concurrent connections to accept (per client).
The maximum allowed size of any request body, in megabytes.
Default: 30
Select to generate documentation for your API.
Options:
Redocly
Swagger UI
A list of allowed origin URLs for cross-origin resource sharing.
Click the editor icon to add relevant URLs.
Select to show the Authenticate event handler. This handler will execute for every authentication scheme associated with an operation before the execution of the operation.
Select to show the Before-Operation event handler. This handler will execute before the execution of any operation.
Select to show the After-Operation event handler. This handler will execute after the execution of any operation.
To access your generated documentation, append /swagger
or /redocly
to your Base URI, depending on the documentation type. For more on API documentation, go .
For more on response handling, go .