Assemble and publish a REST web service endpoint by implementing its web methods through events using SimpleRESTHost.
The Base Url of the web service must be configured to be hosted on the server that it is deployed to.
To achieve this in Linx, use the
When the service is deployed it will use the current server.
The security scheme to use.
API Key and HTTP Bearer are supported.
When hosting a web service you need to indicate what the security requirements are for granting clients access to your web service.
When selecting the API Key security scheme it means that:
a) a client that consumes your web service must provide a key value that is associated with your API, and
b) your application must authenticate the key value that is received from the client.
Your web service application will receive the API key via a request header, named 'Authorization', that Linx makes available at
Authentication of the received key is performed in the SimpleRESTHost service's OperationEvents_Authenticate event handler.
Do the following:
Set a String variable to $.Input.Data.AuthenticationData.ApiKey.ProvidedToken.
If the required key is stored in a database, check if the provided key matches the key in the database.
If there is a match, set
Only available when 'HTTP Bearer' is selected for the Security property.
The HTTP bearer secret key, for issuing and authenticating security tokens.
Define your web API operations. Click on the Operations Editor icon [...] to add your operations.
Show server errors
Hide or show details for internal server errors in HTTP responses. Note that this is a security consideration for production systems.
Values: True / False
The maximum number of concurrent connections to accept (per client). Use
Max request size
The maximum allowed size of any request body, in megabytes.
Select either 'Redocly' or 'Swagger UI' to generate documentation for your API.
To access your generated documentation, append
For more on API documentation go here.
A list of allowed origin URLs for cross-origin resource sharing.