HOW TO: Installation and Exposing the flaik Resort API to an External URL
API INSTALLER DOWNLOAD
https://drive.google.com/drive/folders/1eTaE-EB3i-c-frJHNvxv-rjGXq_mzI8f
PLEASE SEE RELEASE NOTES FOR VERSIONS

Section 1: Overview and Architecture
Below is a simple overview of the system architecture and the steps required to complete the installation.
Network Architecture
The flaik Resort API typically runs on a server in a public subnet, allowing it to interact with the POS database while being accessible from the flaik servers.
System Requirements
Flaik Database: Microsoft SQL Server 2012 or above.
Flaik Resort Service: Windows 10 or Windows Server 2018 or above.
Network Ports: The flaik service communicates with the POS SQL database over a TCP port (SQL default is 1433).
Section 2: Installation Steps
2.1 Database Setup (Admin)
Create the flaik Database:
Open SQL Server Management Studio.
Create a new database named
flaik
for production orflaik_staging
for staging.
Create SQL Logins:
Create a SQL user called
FlaikId
, and grant itdb_owner
role for the flaik database. You can use AD or SQL server authentication.Ensure the user has read permissions on the resort’s POS database.
Run SQL Scripts:
Execute any provided SQL scripts to modify the database schema as required.
2.2 Installing the flaik Resort Service (System Admin)
Download the Installer: Download the flaik Resort Service installer from this link.
Run the Installer:
Follow the prompts in the MSI file.
Accept the terms in the License Agreement and allow the service to install.
Complete Installation:
Once the installation is complete, the flaik Resort Service will be installed as a Windows service.
Section 3: Configuration for Exposing the API to External URLs
3.1 Configure the appsettings.json
File
appsettings.json
FileAfter installation, you will need to update the configuration file to set the database connection, API key, and (optionally) enable SSL for secure access.
Locate the File: Navigate to
C:\Program Files\Flaik Resort Service\appsettings.json
.Update API Key and Database Connection strings: Replace placeholders with actual values for production environments default to port 8001, staging defaults to 8002:
"FlaikServiceSettings": { "ApiKey": "YourProductionApiKey", "FlaikDatabaseConnectionString": "Server=YourDatabaseServer;Database=FlaikStagingDatabaseHere;Trusted_Connection=True;MultipleActiveResultSets=True;Integrated Security=False;TrustServerCertificate=True;User Id=FlaikId;Password=YourPassword", "ResortDatabaseConnectionString": "Server=YourDatabaseServer;Database=YourStagingPOSDatabaseHere;Trusted_Connection=True;MultipleActiveResultSets=True;Integrated Security=False;TrustServerCertificate=True;User Id=FlaikId;Password=YourPassword", }
Update the POS Connection Type: Replace placeholders with actual values for staging environments using port 8002:
"resortPosSoftwareCode": 0, // 1== RTP|One, 2== Siriusware, 5== Intouch, if in doubt please check
(Optional) Enable SSL: If SSL is required, update the
Kestrel
section to enable HTTPS.For production:
"Kestrel": { "EndPoints": { "Https": { "Url": "https://*:8001" } } }, "Certificates": { "Default": { "Path": "C:\\Path\\To\\YourCertificate.pfx", "Password": "YourCertificatePassword" } }
For staging:
"Kestrel": { "EndPoints": { "Https": { "Url": "https://*:8002" } } }, "Certificates": { "Default": { "Path": "C:\\Path\\To\\YourStagingCertificate.pfx", "Password": "YourStagingCertificatePassword" } }
3.2 Configure Firewall and Ports (Network Admin)
Open Ports:
Ensure that port 8001 (for production) and 8002 (for staging) are open for inbound and outbound traffic.
Whitelist flaik Server IPs:
Whitelist the IP addresses provided by flaik to allow communication between your resort’s server and the flaik servers.
Configure NAT or Reverse Proxy:
If your server is behind a firewall, set up Network Address Translation (NAT) or a reverse proxy to map external traffic to the server running the flaik Resort Service.
Map port 8001 for production and 8002 for staging environments.
Section 4: Testing the flaik Resort API
After installation and configuration, you can test the API to ensure it’s correctly exposed.
Open a Browser:
For production, visit:
http://ExternalURLOrIP:8001/api/test
For staging, visit:
http://ExternalURLOrIP:8002/api/test
If SSL is enabled, use
https://
instead ofhttp://
.
Verify Success:
A confirmation page will appear if the API is correctly exposed and operational. Any issues with the database connection or firewall will be shown on this page.
Section 5: Restarting the flaik Resort Service
Any changes to the appsettings.json
file or firewall configuration require restarting the service.
Open Windows Services:
Go to the Services panel in Windows.
Find the flaik Resort Service:
Right-click the service and select Restart.
Section 6: Troubleshooting
If you encounter issues:
Verify the flaik Resort Service:
Ensure the service is running and listed in Windows Services.
Check Firewall Configuration:
Ensure that ports 8001 (production) and 8002 (staging) are open and that flaik IPs are whitelisted.
Review SSL Setup (if applicable):
Confirm that the certificate paths and passwords in the
appsettings.json
file are correct.
Last updated
Was this helpful?