BETA

Skip links

  • Skip to primary navigation
  • Skip to content
  • Skip to footer
Queensland government logo Queensland government logo
Sign in Sign out
Sign in
  • Profile summary
  • Sign out
Department of Education Department of Education Developer Portal
  • Home
  • Tags
  • Chat
  • Beta
    APIs
  • Help
  • Contact us
  • Dark mode
  • Home
  • Tags
  • Chat
  • Beta
    APIs
  • Help
  • Contact us
  • My profile
  • Dark mode

Code examples of connecting your app

Jeny Amatya Government Popular Admin
by Jeny Amatya
11 September 2025
Last updated 16 September 2025
API Getting started
API Getting started

Overview

This guide shows you how to connect to the API sandbox using your application key. It includes examples in cURL, Node.js, Python, and C# so you can make your first API call quickly and confidently.

Authentication 🔑

All API requests must include your application key for authentication.

  • Add it to the request headers using the format:
X-API-KEY: YOUR_APP_KEY

Tip 💡 Replace YOUR_APP_KEY with your actual Application Key before running the examples below.

Example: cURL 📌

curl -X GET "https://dp-mockaco.azurewebsites.net/QT_staff/school-api/schools/111/staff?centreCode =1245" \
      -H "X-API-KEY: YOUR_APP_KEY"

Example: node.js 📌

const axios = require("axios");

axios.get("https://dp-mockaco.azurewebsites.net/QT_staff/school-api/schools/111/staff?centreCode =1245", {
  headers: { "X-API-KEY": "YOUR_APP_KEY" }
})
.then(res => console.log(res.data))
.catch(err => console.error(err));

Example: Python 📌

import requests

url = "https://dp-mockaco.azurewebsites.net/QT_staff/school-api/schools/111/staff?centreCode =1245"
headers = {
    "X-API-KEY": "YOUR_APP_KEY"
}

response = requests.get(url, headers=headers)
print(response.json())

Example: C# 📌

using System.Net.Http;

var client = new HttpClient();
client.DefaultRequestHeaders.Add("X-API-KEY", "YOUR_APP_KEY");

var response = await client.GetStringAsync("https://dp-mockaco.azurewebsites.net/QT_staff/school-api/schools/111/staff?centreCode =1245");
Console.WriteLine(response);

Next steps

Run one of these examples to confirm your application key is working and that you can retrieve data from the sandbox environment safely.

Powered by Link to AI chat
  • Copyright
  • Disclaimer
  • Privacy
  • Right to information
  • Accessibility
  • Jobs in Queensland Government
  • Other languages

© The State of Queensland (Department of Education) 2025

Queensland Government