JSON file: how do i get the word API in the URL for JSON

Hello Community, I created a JSON file as a mock API. The file has a URL as an alias to an existing domain. I checked github for samples of JSON files with URLs and all of them show api. in front of the domain name. How do I get the word api to show in a URL? Do I have to buy a domain and put the word api there? How does it work?

Quite often api.mydomain.com is a sub-domain of mydomain.co.uk

So, yes, you will need your own domain, and adomain/hosting provider that allows and supports sub-domains - this can get tricky if you need SSL (https://)

thank you so much Tim! I already have a domain and JSON is there as an alias. JSON file will have to be connected to an app built with web api blocks. Do I have to have the word api in the URL to ensure full functionality of the JSON file?

No, you do not have to use api in your domain / url. it serves as an obvious identifier to the user / developer.

thank you Tim. Now that we are talking about ways of using JSON file I got yet another question to ask. You probably know Brewbase app made in Thunkable, it is basically web api exchanging data with JSON file. I'm attaching screenshots of all blocks involved. Would I be able to create something similar using AI? What should I use instead of web api component? Tinydb? As you can see by looking at them web api is linked to JSON url(doesn't have to be an acutal api, a URL is all that's needed) Thanks a million


webapi1.jpeg

To begin with, you can use AppInventor AI2....

that was the plan, but what should I use instead of web api component(Thunkable has it, AI doesn't)? Thank you!

The Web component

ok, but what about tinydb? Would you recommend linking JSON file to tinydb?

Why would you need to do that, if your api is online ?

you are right Tim, so I'm gonna go ahead and use the web component then. Thank You