KCSOS Alertline API Documentation

Signing up for an API Key

Fill out the form located here: https://alertline.kern.org/thirdparty. Upon completing and submitting the form you will receive an email for which you are to confirm by clicking on the provided link. Once confirmed you will receive your token and you may begin consuming available endpoints.

API Endpoints


Access the current alerts posted for the day

/api/1.0/posted/alerts/today/{token}
HTTP GET: Returns the resource identified by {token}.

Currently there is a single available endpoint which you will receive once we've confirmed your request for an API key. The endpoint is in the form: /api/1.0/posted/alerts/today/6940b08f1b11e20238cd1c6a9712122d Where /api/1.0 is the version of the API, /posted/alerts/today is the main path to the endpoint and 6940b08f1b11e20238cd1c6a9712122d is the token which you must replace with the key provided by KCSOS Alertline.

Limit

There is currently a limit of 1000 requests per day per key.

Example JSON feed output from API call

See a sample from this static endpoint: /api/1.0/posted/alerts/test
            
                [
                    {
                    "site_name": "Example Union School District",
                    "description": "2 Hour Fog Delay",
                    "additional_info": null,
                    "alert_category": "Fog Delay",
                    "severity": 2,
                    "updated_at": "2015-05-28 15:08:26"
                    },
                    {
                    "site_name": "Another High School",
                    "description": "Fog Closure",
                    "additional_info": null,
                    "alert_category": "Fog Closure",
                    "severity": 99,
                    "updated_at": "2015-05-28 15:08:26"
                    }
                ]
            
        
PROPERTY DESCRIPTION
site_name Returns a string of the district or site
description Returns a string of the alert posted for the district or site: i.e. 2 Hour Fog Delay
additional_info Returns either NULL if the alert posted has no custom description or string if there is a custom description
alert_category Returns a string for the given alert posted: i.e. Fog Delay for either a 2 or 3 hour Fog Delay
severity Returns an integer with the amount of delay in hours or 99 if it is a site closure
updated_at Returns a DateTime value in the format YYYY-MM-DD H:i:s for the last updated time for the record

Possible Responses

RESPONSE DESCRIPTION
Unauthorized Returns 403 Unauthorized if your token is invalid or disabled
JSON Returns 200 with a JSON feed
Limit Reached Returns 200 and a notice You have exceeded your request limit for the day (if you need to increase your request limit call this organization's tech support)