This sample implements a Linx REST API based on the Swagger 'Petstore' OpenAPI definition and is hosted on a Linx Cloud Server, more details on the original 'Petstore' GitHub project can be found here. The operations of the Linx API do not persist any data, but rather, request data is forwarded to actual 'Petstore' server via HTTP requests.
View the live demo hosted on a Linx Cloud Server.
This solution can be deployed directly to your Linx Cloud server instance.
- Register for a Linx trial cloud server here.
- You will receive an email containing your Linx cloud server credentials when your trial server has been activated.
- Log into your cloud server instance and upload the Solution (Top Menu > Server > Upload).
- On the Solution's service dashboard page, start all of the services for the Solution.
- Once the service has started, you are able to make requests using the base URL of:
https://{your instance name}.api.linx.twenty57.net/petstore
The below steps describe how to setup the sample to run on your local Linx Designer environment.
- Download and install the Linx Designer here.
- Open the sample Solution (.lsoz) in your Linx Designer.
- Alter the below Solution Settings:
LinxIsLocalDevEnv
:True
- Select the RESTHost service, right click and select debug. Once initialised, start the debugger.
- Once the debugger has started, you are able to make requests locally to:
https://localhost:8080/petstore
-
Open Postman and import the provided request collection in Postman.
-
Alter the collection variables to reflect your cloud environment.
-
Open each request and pass or change parameters and body values as described in
https://petstore3.swagger.io/
For questions please ask the Linx community or use the Slack channel.