Assignments

/assignments

Base API URL

The base URL for the API endpoint to retrieve assignments is:

https://homeaccesscenterapi.vercel.app/api/assignments

Headers

To make a successful API request, you need to include the following headers in your request:

{
    "link": "Link to HAC",
    "user": "HAC username",
    "pass": "HAC password",
    "class": "Class Name (as written on HAC)",
}
  • link : The link to the Home Access Center (HAC) website.
  • user (required): Your HAC username.
  • pass (required): Your HAC password.
  • class : The name of the class as it appears on HAC.

Note: The user and pass headers are required for authentication and identifying the specific class's assignments.

Example API Request

To retrieve the assignments for a specific class, send a GET request to the API endpoint with the required headers as query parameters:

GET https://homeaccesscenterapi.vercel.app/api/assignments?link=https://homeaccess.katyisd.org/&user=D1234567&pass=Doe1234

Replace the values in the query parameters (link, user, pass, and class) with the actual URL to the HAC website, your HAC username, your HAC password, and the class name as it appears on HAC respectively. Note that spaces in the class name should be URL encoded as %20.

Example API Response

A successful API response will be in JSON format and will include information about the class's assignments:

{
    "1234A - ALG 1": {
        "average":"93",
        "assignments":
        [
            [],
            [],
        ],
        "categories":
        [
            [],
            [],
        ],
    }
}

The response includes the following fields:

  • "average": The average grade for the class.
  • "assignments": An array of assignments for the class.
  • "categories": An array of assignment categories.

By following these guidelines, you can make API requests to retrieve the assignments for a specific class from the HomeaccessCenterAPI. Make sure to include the required headers with valid values for authentication and identifying the class, and replace the placeholders with actual values in your requests and responses.