I posted to
’s The Kākā subscriber chat yesterday in a thread on the perennial topic of Debt-to-GDP ratios:“An alternative perspective: the AoNZ public sector as it is currently structured is inefficient and unscalable and becoming more so. They are stuggling to keep up with technology change and digitise services. Pumping more money into its current form will not achieve desired outcomes and is effectively just pouring future generations' wealth down a hole.
Personally I think you could remodel most of AoNZ government bureaucracy as a software API which would do the same or better job, cost a fraction of the current overhead to run and free up the people inside it up to do more productive, creative work.
We should be seeing the dividends from exponential technology to do far more with far less, not doubling down on last century's public sector bloatware.”
After sleeping on this overnight, I sat down for 10 minutes this morning and typed in the following into ChatGPT:
“I want to provide an API for all New Zealand government services. Write me the full API reference summary documentation.”
What came back amazed *even me* in its simplicity.
(Compare the responses below to the incoherent mishmash of 20 random hardly-functional APIs which are currently available…).
GCDO JFDI…?
Title: New Zealand Government Services API (NZGSA) Reference
Version: 1.0.0
Last Updated: May 12, 2023
Introduction:
The New Zealand Government Services API (NZGSA) provides a unified and streamlined access point to various government services, including public records, licensing, benefits, and more. This API aims to simplify and automate the exchange of information between the public, businesses, and the government.
Base URL: https://api.nzgsa.govt.nz/
Authentication:
NZGSA uses OAuth2 for authentication. To access the API, you need to register your application and obtain an API key. For details on registration and authentication, refer to the authentication guide.
Rate Limits:
To ensure fair usage, NZGSA imposes rate limits on API requests. Free-tier users are limited to 1000 requests per day, while premium users have higher limits. For detailed information, refer to the rate limiting guide.
Endpoints:
1. Public Records:
- /public-records/search
- /public-records/{id}
2. Licensing:
- /licensing/applications
- /licensing/applications/{id}
- /licensing/licenses
- /licensing/licenses/{id}
3. Benefits:
- /benefits/eligibility
- /benefits/applications
- /benefits/applications/{id}
4. Taxes:
- /taxes/income
- /taxes/property
- /taxes/business
5. Immigration:
- /immigration/visas
- /immigration/visas/{id}
- /immigration/applications
- /immigration/applications/{id}
6. Education:
- /education/schools
- /education/schools/{id}
- /education/scholarships
- /education/scholarships/{id}
7. Healthcare:
- /healthcare/providers
- /healthcare/providers/{id}
- /healthcare/claims
- /healthcare/claims/{id}
8. Environment:
- /environment/conservation
- /environment/conservation/{id}
- /environment/waste-management
- /environment/waste-management/{id}
Error Handling:
NZGSA returns standard HTTP status codes to indicate the success or failure of an API request. Refer to the error handling guide for details on error codes and their meanings.
Support:
For assistance, please contact the NZGSA support team at support@nzgsa.govt.nz.
Terms of Use:
By using the New Zealand Government Services API, you agree to the terms of use outlined in the API Terms of Service document.
Changelog:
For a detailed list of changes and updates to the API, refer to the changelog document.
Examples and Tutorials:
To get started with the API, explore the examples and tutorials provided in the documentation.
Next prompt:
Now expand the list of endpoints to include the remaining government services not already listed
Response:
9. Transport:
- /transport/vehicle-registration
- /transport/vehicle-registration/{id}
- /transport/road-safety
- /transport/road-safety/{id}
- /transport/public-transit
- /transport/public-transit/{id}
10. Employment:
- /employment/job-listings
- /employment/job-listings/{id}
- /employment/employment-rights
- /employment/employment-rights/{id}
- /employment/workplace-safety
- /employment/workplace-safety/{id}
11. Housing:
- /housing/public-housing
- /housing/public-housing/{id}
- /housing/rental-assistance
- /housing/rental-assistance/{id}
- /housing/homeowner-support
- /housing/homeowner-support/{id}
12. Justice and Law:
- /justice/court-cases
- /justice/court-cases/{id}
- /justice/legal-aid
- /justice/legal-aid/{id}
- /justice/victim-support
- /justice/victim-support/{id}
13. Business and Economy:
- /business/starting-business
- /business/starting-business/{id}
- /business/grants-and-funding
- /business/grants-and-funding/{id}
- /business/intellectual-property
- /business/intellectual-property/{id}
14. Agriculture and Fisheries:
- /agriculture/farming-regulations
- /agriculture/farming-regulations/{id}
- /agriculture/fisheries-management
- /agriculture/fisheries-management/{id}
- /agriculture/animal-welfare
- /agriculture/animal-welfare/{id}
15. Emergency Services:
- /emergency/police
- /emergency/police/{id}
- /emergency/fire-and-rescue
- /emergency/fire-and-rescue/{id}
- /emergency/civil-defence
- /emergency/civil-defence/{id}
16. Arts and Culture:
- /arts-culture/heritage-sites
- /arts-culture/heritage-sites/{id}
- /arts-culture/funding-opportunities
- /arts-culture/funding-opportunities/{id}
- /arts-culture/events
- /arts-culture/events/{id}
17. Social Services:
- /social-services/childcare
- /social-services/childcare/{id}
- /social-services/community-organizations
- /social-services/community-organizations/{id}
- /social-services/disability-services
- /social-services/disability-services/{id}
18. Elections and Voting:
- /elections/voter-registration
- /elections/voter-registration/{id}
- /elections/voting-locations
- /elections/voting-locations/{id}
- /elections/candidates
- /elections/candidates/{id}
Prompt:
Continue listing endpoints which have not already been listed
Response:
19. National Security and Defence:
- /security-defence/armed-forces
- /security-defence/armed-forces/{id}
- /security-defence/intelligence-agencies
- /security-defence/intelligence-agencies/{id}
- /security-defence/cyber-security
- /security-defence/cyber-security/{id}
20. Infrastructure and Energy:
- /infrastructure-energy/electricity-providers
- /infrastructure-energy/electricity-providers/{id}
- /infrastructure-energy/water-supply
- /infrastructure-energy/water-supply/{id}
- /infrastructure-energy/renewable-energy
- /infrastructure-energy/renewable-energy/{id}
21. Communications and Media:
- /communications-media/broadcasting-regulations
- /communications-media/broadcasting-regulations/{id}
- /communications-media/telecommunications
- /communications-media/telecommunications/{id}
- /communications-media/postal-services
- /communications-media/postal-services/{id}
22. Foreign Affairs and Trade:
- /foreign-affairs/trade-agreements
- /foreign-affairs/trade-agreements/{id}
- /foreign-affairs/consular-services
- /foreign-affairs/consular-services/{id}
- /foreign-affairs/international-organizations
- /foreign-affairs/international-organizations/{id}
23. Tourism and Recreation:
- /tourism-recreation/national-parks
- /tourism-recreation/national-parks/{id}
- /tourism-recreation/recreational-areas
- /tourism-recreation/recreational-areas/{id}
- /tourism-recreation/tourist-attractions
- /tourism-recreation/tourist-attractions/{id}
24. Weather and Climate:
- /weather-climate/weather-forecasts
- /weather-climate/weather-forecasts/{id}
- /weather-climate/climate-data
- /weather-climate/climate-data/{id}
- /weather-climate/extreme-weather-events
- /weather-climate/extreme-weather-events/{id}
25. Science and Innovation:
- /science-innovation/research-funding
- /science-innovation/research-funding/{id}
- /science-innovation/research-institutions
- /science-innovation/research-institutions/{id}
- /science-innovation/technology-transfer
- /science-innovation/technology-transfer/{id}
26. Indigenous Affairs:
- /indigenous-affairs/maori-land
- /indigenous-affairs/maori-land/{id}
- /indigenous-affairs/cultural-heritage
- /indigenous-affairs/cultural-heritage/{id}
- /indigenous-affairs/maori-language
- /indigenous-affairs/maori-language/{id}
27. Local Government:
- /local-government/councils
- /local-government/councils/{id}
- /local-government/regional-plans
- /local-government/regional-plans/{id}
- /local-government/community-funding
- /local-government/community-funding/{id}
And once more with the same prompt:
28. Consumer Protection:
- /consumer-protection/consumer-rights
- /consumer-protection/consumer-rights/{id}
- /consumer-protection/product-safety
- /consumer-protection/product-safety/{id}
- /consumer-protection/scam-alerts
- /consumer-protection/scam-alerts/{id}
29. Privacy and Information Security:
- /privacy-information/privacy-act
- /privacy-information/privacy-act/{id}
- /privacy-information/data-breaches
- /privacy-information/data-breaches/{id}
- /privacy-information/data-protection
- /privacy-information/data-protection/{id}
30. Customs and Border Control:
- /customs-border/travel-restrictions
- /customs-border/travel-restrictions/{id}
- /customs-border/import-export-regulations
- /customs-border/import-export-regulations/{id}
- /customs-border/border-security
- /customs-border/border-security/{id}
31. Maritime and Aviation:
- /maritime-aviation/ports
- /maritime-aviation/ports/{id}
- /maritime-aviation/airports
- /maritime-aviation/airports/{id}
- /maritime-aviation/regulations
- /maritime-aviation/regulations/{id}
32. Veterinary Services and Animal Control:
- /veterinary-animal-control/animal-health
- /veterinary-animal-control/animal-health/{id}
- /veterinary-animal-control/veterinary-services
- /veterinary-animal-control/veterinary-services/{id}
- /veterinary-animal-control/animal-control
- /veterinary-animal-control/animal-control/{id}
33. Citizenship and Identity:
- /citizenship-identity/passports
- /citizenship-identity/passports/{id}
- /citizenship-identity/births-deaths-marriages
- /citizenship-identity/births-deaths-marriages/{id}
- /citizenship-identity/name-changes
- /citizenship-identity/name-changes/{id}
34. Official Statistics:
- /official-statistics/population-data
- /official-statistics/population-data/{id}
- /official-statistics/economic-data
- /official-statistics/economic-data/{id}
- /official-statistics/environmental-data
- /official-statistics/environmental-data/{id}
35. Government Procurement:
- /government-procurement/tenders
- /government-procurement/tenders/{id}
- /government-procurement/contracts
- /government-procurement/contracts/{id}
- /government-procurement/suppliers
- /government-procurement/suppliers/{id}
Please note that this list covers most of the government services that can be accessed through the API. However, there might be specific endpoints or services provided by individual government agencies that are not listed here. To access those services, you may need to consult the documentation of the respective agency.
Clearly the list above is 99% incomplete and needs filling out with the complete Government service catalogue… but this only took 10 minutes!
Background project of mine:
Catalogue a full API of Aotearoa Government Services
Put it into GitHub and get the community to start writing the APIs… See how fast we can go!
yojoflo
3 min ago
On to it Ben. And, we have the human expertise / OS community to build it… Some prototyping / capability building with an awesome group of serious folk committed to public-digital-infrastructure, gov-as-platform and rules-as-code in progress here: https://github.com/digitalaotearoa/legaleligibility Ooo and hosted by our only onshore, kiwi owned cloud to ensure sovereignty and Te Tiriti compliance: https://catalystcloud.nz/
In support of this, in between things, I have just started pitching a business case to setup a secure point to point (no middle data store) inter agency data exchange. Following the same approach that underpins the Estonian and Finnish governments data interoperability capability.
It allows orgs to maintain their own agnostic data / information systems and retain their data sovereignty. Moving away from sharing data files with each other over sftp or email and instead enabling encrypted access to data at source, through apis and a secure front door on a closed network.
Enabled across govt and key sectors, this extends out to citizen access of their held data (via realme credentials) and its sharing to those they want to access the info I.e. think quick and easy approval for loans where you allow a bank temporary access to your earnings records from ird rather than certified copies of your pay slips.
If you are keen to know more hit me up. All the building blocks and capability exists. I’ve got the vendors etc ready to roll, it just needs 1 or 2 more senior dce’s onboard to get the pilot started.
Enabling this here in nz, following what other countries have already done, could radically change govt’s ability to service its citizens and also for citizens to have more control and use of their govt held taonga.
With the right support I could deliver a working implementation in 3-6 months with a full production pilot connected to the govt pki service to manage the encryption and security layer in 12 months. Within 3 years we could have all major ministries/agencies connected and citizens accessing their key private data held in those orgs.