Externally exposed REST API. How?

Discussions relating to the REST API of Jiwa 7.

Externally exposed REST API. How?

Postby DannyC » Fri Jun 28, 2024 12:16 pm

I'm setting up the REST API for usage by external entities...in this case for Salesforce, but might be website/shops, WMS integrations, whatever.

Assume a SSL certificate has already been obtained, imported into the local cert store, bound to the URL which matches the URL in the JiwaAPISelfHostedService.exe.config file.

Entry has been made in the HOSTS file as per:
127.0.0.1 jiwaapi.mydomain.com.au

Inside the server, I can browse to the API using https://jiwaapi.mydomain.com.au:4444
All good. Note that only was successful after modifying the HOSTS file.

Now getting it accessed externally. What needs to happen? Who needs to be contacted?

Aside from the unique port getting opened on firewall(s), surely somehow the world needs to know about jiwaapi.mydomain.com.au?
Does the business need to get in touch with the domain host (like GoDaddy, VentraIP or whoever) to add a DNS entry?
If so, which record? A, CNAME, something else?

Anything else need to happen?
User avatar
DannyC
Senpai
Senpai
 
Posts: 647
Joined: Fri Mar 22, 2013 12:23 pm
Topics Solved: 31

Re: Externally exposed REST API. How?

Postby Mike.Sheen » Fri Jun 28, 2024 12:24 pm

DannyC wrote:Aside from the unique port getting opened on firewall(s), surely somehow the world needs to know about jiwaapi.mydomain.com.au?
Does the business need to get in touch with the domain host (like GoDaddy, VentraIP or whoever) to add a DNS entry?
If so, which record? A, CNAME, something else?

Anything else need to happen?


Either an A record or a CNAME, depending on the setup.

An A Record will map the domain name jiwaapi.mydomain.com.au to the WAN IP Address - that will always work.

A CNAME should be used instead of an A Record is the machine already has an A Record - such as an AWS or Azure VM - in which case you create a CNAME record mapping jiwaapi to the machine's public DNS Record already in place.

Here is an example of our DNS CNAME for api.jiwa.com.au which points to an Azure VM which has a DNS A Record of apijiwacomau.australiaeast.cloudapp.azure.com
cloudflar_DNS_CNAME_JiwaAPI.png


An A Record will still work, but it's better to do a CNAME in this case in case the IP address changes for the existing record, so using a CNAME insulates you from that change so you won't need to update the DNS entry if the IP address does change.
Mike Sheen
Chief Software Engineer
Jiwa Financials

If I do answer your question to your satisfaction, please mark it as the post solving the topic so others with the same issue can readily identify the solution
User avatar
Mike.Sheen
Overflow Error
Overflow Error
 
Posts: 2476
Joined: Tue Feb 12, 2008 11:12 am
Location: Perth, Republic of Western Australia
Topics Solved: 766


Return to REST API

Who is online

Users browsing this forum: No registered users and 0 guests