Welcome to the Ion API!

Documentation is below. <pk> refers to the unique id of a certain object - this is shown as "id" in most lists and references.

The general form of the api link (with /api/ assumed to be prepended) is shown, along with an example URL.

All of the API methods, except for those relating to the Bell Schedule, require authentication.

GET /api
HTTP 200 OK
Allow: GET, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "Schedule": {
        "/schedule": [
            "Get today's schedule",
            "https://ion.tjhsst.edu/api/schedule"
        ],
        "/schedule?page_size=<num>": [
            "Get the schedule for the next <num> days",
            "https://ion.tjhsst.edu/api/schedule?page_size=7"
        ],
        "/schedule/<date>": [
            "Get the schedule for a specific day, in YYYY-MM-DD format",
            "https://ion.tjhsst.edu/api/schedule/2016-04-04"
        ]
    },
    "Announcements": {
        "/announcements": [
            "List announcements",
            "https://ion.tjhsst.edu/api/announcements"
        ],
        "/announcements/<pk>": [
            "Get announcement details",
            "https://ion.tjhsst.edu/api/announcements/2999"
        ]
    },
    "Emergency Announcements": {
        "/emerg": [
            "Get FCPS emergency announcement information",
            "https://ion.tjhsst.edu/api/emerg"
        ]
    },
    "Profile": {
        "/profile": [
            "Get current user profile",
            "https://ion.tjhsst.edu/api/profile"
        ],
        "/profile/<pk>": [
            "Get specific user profile by user ID",
            "https://ion.tjhsst.edu/api/profile/489"
        ],
        "/profile/<username>": [
            "Get specific user profile by username",
            "https://ion.tjhsst.edu/api/profile/2017ewang"
        ],
        "/profile/<pk>/picture": [
            "Get a specific user's profile picture by user ID",
            "https://ion.tjhsst.edu/api/profile/489/picture"
        ],
        "/profile/<username>/picture": [
            "Get a specific user's profile picture by username",
            "https://ion.tjhsst.edu/api/profile/2017ewang/picture"
        ]
    },
    "Search": {
        "/search/<query>": [
            "Search users (see https://ion.tjhsst.edu/search?tips for advanced search documentation)",
            "https://ion.tjhsst.edu/api/search/last:Kim"
        ]
    },
    "Blocks": {
        "/blocks": [
            "List all blocks this year (paginated)",
            "https://ion.tjhsst.edu/api/blocks"
        ],
        "/blocks?start_date=<start_date>": [
            "List all blocks starting on the specified date (in YYYY-MM-DD format; paginated)",
            "https://ion.tjhsst.edu/api/blocks?start_date=2015-11-18"
        ],
        "/blocks?date=<date>": [
            "List all blocks on the specified date (in YYYY-MM-DD format)",
            "https://ion.tjhsst.edu/api/blocks?date=2015-11-18"
        ],
        "/blocks/<pk>": [
            "Get a list of activities on a block",
            "https://ion.tjhsst.edu/api/blocks/3030"
        ]
    },
    "Activities": {
        "/activities": [
            "List all eighth period activities",
            "https://ion.tjhsst.edu/api/activities"
        ],
        "/activities/<pk>": [
            "Get details for a specific eighth period activity (including some scheduling information)",
            "https://ion.tjhsst.edu/api/activities/115"
        ]
    },
    "Signups": {
        "/signups/user": [
            "List eighth signups for the current user, or sign up the current user for an activity",
            "https://ion.tjhsst.edu/api/signups/user"
        ],
        "/signups/user/<user_id>": [
            "List eighth signups for a specific user",
            "https://ion.tjhsst.edu/api/signups/user/8889"
        ],
        "/signups/user/favorites": [
            "List favorited eighth activities for current user, or toggle whether an activity is favorited",
            "https://ion.tjhsst.edu/api/signups/user/favorites"
        ],
        "/signups/scheduled_activity/<scheduled_activity_id>": [
            "List eighth signups for a specific scheduled activity",
            "https://ion.tjhsst.edu/api/signups/scheduled_activity/889"
        ]
    },
    "Bus": {
        "/bus": [
            "Get list of bus routes",
            "https://ion.tjhsst.edu/api/bus"
        ],
        "/bus/<pk>": [
            "Get information about a specific bus route",
            "https://ion.tjhsst.edu/api/bus/3"
        ]
    }
}