Skip to main content
Preview — sample noticesNot for school or travel decisions.
Kern CountyAlert Line

KERN COUNTY ALERT LINE

Media & Integrations

Use the same published notices in your newsroom or software.

Integration preview — off-air testing only

These endpoints contain Test notices, even when real school names appear. Keep them off air and separate from public closure lists, parent notifications, and emergency automation.

1. Choose a feed format

A feed is a structured way for software to retrieve notices. CAP means Common Alerting Protocol: a standard XML message containing the notice identity, issuing organization, affected schools, timing, instructions, and update references. The receiving station pulls the data; Alert Line does not automatically transmit television crawls, email, texts, WEA, or IPAWS alerts.

JSON

Countywide notice snapshot

Current, upcoming, and recently ended notices in separate arrays. Each notice retains its own affected schools and total delay.

https://dev.alertline.kern.org/wp-json/alertline/v1/alerts?lang=en

Open JSON
CAP

CAP discovery index

The index is JSON. Follow each capUrl for the individual CAP 1.2 XML message. It is not one combined CAP document.

https://dev.alertline.kern.org/wp-json/alertline/v1/cap-index?lang=en

Open CAP index

These public links show the current operating context. Approved media software uses the separate read-only partner endpoints below. Public pages never receive partner credentials.

2. Arrange and test the connection

  1. Contact the KCSOS Technology project team through your existing contact. Provide the station, named technical contact, receiver/software, and intended use. Central staff must verify and approve the request.
  2. Use a new read-only media credential delivered through an approved private channel. Send it only in the Authorization: Bearer header over HTTPS. Old Alert Line tokens do not work. Do not put secrets in URLs or public browser code.
  3. Check the HTTP response, messageStatus, sourceVerifiedAt, and validUntil before using data. Configure Test and Actual as separate receiver contexts; never relabel Test as Actual.
  4. Test new notices, updates, total delays, school splits, clearances, cancellations, expiry, outages, recovery, and language handling off air. Actual credentials require recorded acceptance and explicit central authorization in the current operational context.

Partner endpoints

https://dev.alertline.kern.org/wp-json/alertline-media/v1/snapshot?lang=en

https://dev.alertline.kern.org/wp-json/alertline-media/v1/cap-index?lang=en

Both collections share one request allowance every 30 seconds per credential. The overall limit is 120 requests per minute, including individual CAP messages. A 429 response means wait for Retry-After. Coordinate the receiver’s request schedule and capacity with Technology.

The initial secret is shown to the central administrator once. It expires, can be revoked, and must be rotated if lost. Rotation invalidates the old secret immediately. A change of operating context or site origin also invalidates the credential.

3. Apply each notice correctly

id + version / noticeId + revision
Use the stable ID and revision to replace older content and avoid duplicate display. JSON uses id/version; the CAP index uses noticeId/revision.
coverage.schools
Use the issuing organization and the recorded school list. One affected school does not mean every school in its district.
delay.minutes / delay.appliesTo
Delay minutes are the total, not additional minutes. A 180-minute delay is three hours in total. school_day and buses_only are different; effectiveStart is not the school opening time.
change / relatedNotices
Selected-school changes can replace one notice with linked continuations. Preserve the unchanged schools’ instructions. Homepage fog groups are visual only; feed records remain separate.
state / effectiveStart / effectiveEnd
Scheduled has not started; expired has reached its end time. Expiration does not announce an all-clear. Cleared and cancelled reflect explicit publisher actions.
contentLanguage / translationState
Read the actual content language. When a current reviewed Spanish translation is unavailable, clearly identified current English is returned.

The snapshot and CAP index contain the latest revision of each current or upcoming notice plus recently ended notices in a seven-day window. They are not a complete archive or a queue of every revision. Reconcile the full snapshot after downtime, especially beyond seven days. Confirm the receiver’s handling of CAP Alert, Update, and Cancel and its reference chain before going on air.

Failures and stale data

A failed, unreadable, wrong-context, or expired response is unavailable, not an empty closure list. sourceVerifiedAt is the last successful source check; validUntil is the earliest known transition or at most two minutes after verification. Receiving an old response now does not renew it. Honor Retry-After and back off on failures. Agree on the station’s unavailable display and recovery behavior before using the feed.

4. Access and support

Use your existing KCSOS Technology contact for connection requests and problems. Do not send passwords, MFA codes, API secrets, or private server configuration in a general support request. The central partner register records approval and receiver acceptance; it does not certify an untested station or automatically put its receiver on air.