Usage
If you have access to the web platform, API access are granted by default. But, you will need to create an API key to use it.
Creating an API key
Follow these steps to create your API key.
-
Open the My API Keys page on the web dashboard by clicking the below link.
-
Then, click on the "Create new API key" button. A popup will appear.
-
Enter the API key name that identifies the purpose. For example, you can name it "Jupyter Notebook" if you're going to use it with Jupyter notebooks. You cannot change it in the future.
-
Click "Create" when you're done.
-
Your newly created API key will appear on the page. Click "Copy to clipboard" to copy the API key value without revealing it.
Using the API
Now you've created an API key, you can start using the API.
You can access the API using any HTTP client or programming language that can do HTTP requests. For this example, we will use Python with requests library to get a list of regions that you have access to.
import requests
url = "https://api.unimelb-transport-technologies.cloud.edu.au/v1/regions"
api_key = "YOUR_API_KEY"
r = requests.get(url, headers={"X-Api-Key": api_key})
data = r.json()
print(data)
API Reference
For a list of API endpoints you can use, refer to the API Reference page. That page also contains a sample code in multiple languages for your reference.