Get Started
To get started with the HomeAccessCenter API, follow the steps below:
Visit the API
You can access the API at the following URL:
Understanding Headers
All API routes require headers for username and password. The link
header is set to the default value of KatyISD. If you are not in KatyISD, you can specify your own link. Some routes may allow additional headers, but they are not mandatory.
'link' : String
The link to your HAC website
Ex: homeaccess.katyisd.org
'user' : String
The username you use to log into HAC
Ex: J1234567
'pass' : String
The password you use to log into HAC
Ex: Doe123!
Formatting Headers in HTTP Requests
When passing headers to the API, use the following format in your HTTP requests:
https://homeaccesscenterapi.vercel.app/api/{route}?{header}={data}&{header2}={data2}&{header3}={data3}
Getting Data from an API
Python
To get data from the API in Python, you can use the requests
library:
import requests
import json
response = requests.get("https://homeaccesscenterapi.vercel.app/api/{route}?{header}={data}&{header2}={data2}&{header3}={data3}")
print(response.json())
JavaScript
To retrieve data from the API in JavaScript, you can use the fetch
function:
fetch('https://homeaccesscenterapi.vercel.app/api/{route}?{header}={data}&{header2}={data2}&{header3}={data3}')
.then((response) => response.json())
.then((data) => console.log(data));
API Response Data
When making a request to the API, it will return a JSON object containing the requested data.
Example:
{
'name': "John Doe"
}
For additional information, please consult the How to Use section of the documentation.