Conventions in this Document:
Text inbold is required. Text initalics should be substituted with the value of a parameter.
All URIs are relative to https://apps.illinoisworknet.com/.
API interfaces
Events
Gets list of all events meeting the search criteria. All parameters are optional except radius, which is required if you specify a zip. NOTE: You will never find a grade level of "All" (id 1) or "Not Applicable" (id 19) in the database. "All" exists for the convenience of the user entering the event, and selects "Pre-Kindergarten" through "Technical" (ids 2-18). "Not Applicable" exists for validation purposes, to require that the user select at least one grade level. It is not stored in the database.
GET
/CalendarAPI/api/Events/{id}?searchCalendars={searchCalendars}&eventtype={eventtype}&keyword={keyword}&zipcode={zipcode}&miles={miles}&zipcodelist={zipcodelist}&interval={interval}&skip={skip}&approval={approvalStatus}&createdby={createdby}&start={start}&end={end}&audienceType={audienceType}&gradeLevel={gradeLevel}&interest={interest}
- id
- integer ID of the Calendar.
- searchCalendars
- CSV list of calendar IDs (all integers).
- eventType
- CSV list of event type IDs (all integers).
- keyword
- Keyword to search on.
- zipcode
- A single zipcode to use as a starting point for a search (specifying this requires also specifying miles).
- miles
- Radius from zipcode to search within (required if zipcode is specified).
- zipcodelist
- CSV of zipcodes to search near - useful for searching by LWIA or county.
- interval
- Number of events to return.
- skip
- Number of matches to skip before returning results.
- approvalStatus
- Approved, Unapproved, or All
- createdby
- Name of the account that created the event
- start
- Start date for the events
- end
- End date for the events
- audienceType
- CSV of Audience IDs (all integers)
- gradeLevel
- CSV of Grade Level IDs (all integers)
- interest
- CSV of Interest IDs (all integers)
Audience
Method | URI | Parameters | Description |
GET | /CalendarAPI/api/Audience/ | None | Gets list of all Audiences |
GET | /CalendarAPI/api/Audience/id | id | Retrieves the audience whose Id = id. |
Bad Words
Method | URI | Parameters | Description |
GET | /CalendarAPI/api/Badwords/?inputtext=text | text | Checks text for bad words. |
Calendar
Method | URI | Parameters | Description |
GET | /CalendarAPI/api/Calendar/ | None | Gets list of all available calendars |
GET | /CalendarAPI/api/Calendar/?defaultcalendar=true | defaultcalendar | Retrieves the default calendar |
GET | /CalendarAPI/api/Calendar/id | id | Retrieves the calendar with Id = id. |
POST | /CalendarAPI/api/Calendar/ | CalendarDTO | Creates the calendar specified in the CalendarDTO in the body of the request. CalendarDTO is a JSON object. Requires authentication. |
City
Method | URI | Parameters | Description |
GET | /CalendarAPI/api/City/city=city&take=nbr | city is the start of a city name. take is the number of results to return. | Lookup city from first few characters. |
GET | /CalendarAPI/api/City/zipcode=zip | Zip | Lookup city by zipcode. |
Event Details
Method | URI | Parameters | Description |
GET | /CalendarAPI/api/EventDetails/id | id | Gets Event details of the event whose Id = id. |
DELETE | /CalendarAPI/api/EventDetails/id | id | Retrieves the audience whose Id = id. Requires authentication. |
POST | /CalendarAPI/api/EventDetails/ | EventDTO | Creates the event specified in the EventDTO in the body of the request. EventDTO is a JSON object. Requires authentication. |
PUT | /CalendarAPI/api/EventDetails/ | EventDTO | Updates the event specified in the EventDTO in the body of the request. EventDTO is a JSON object. Requires authentication. |
Event Types
Method | URI | Parameters | Description |
GET | /CalendarAPI/api/EventTypes | None | Gets list of all Event Types |
GET | /CalendarAPI/api/EventTypes/id | id | Retrieves the event type whose Id = id. |
POST | /CalendarAPI/api/EventTypes/ | EventTypeDTO | Creates the event type specified in EventTypeDTO in the body of the request. EventTypeDTO is a JSON object. Requires authentication. |
Fields of Interest
Method | URI | Parameters | Description |
GET | /CalendarAPI/api/FieldOfInterest/ | None | Gets list of all fields of interest. |
GET | /CalendarAPI/api/FieldOfInterest/id | id | Retrieves the field of interest whose Id = id. |
Grade Level
Method | URI | Parameters | Description |
GET | /CalendarAPI/api/GradeLevel/ | None | Gets list of all grade levels. |
GET | /CalendarAPI/api/GradeLevel/id | id | Retrieves the grade level whose Id = id. |
iCal
Method | URI | Parameters | Description |
GET | /CalendarAPI/api/iCal/id | id | Retrieves the event whose Id = id in iCal format, suitable for importing into Outlook or other calendars. |
Luminosity
Method | URI | Parameters | Description |
GET | /CalendarAPI/api/Luminosity/ ?pColor1=color1 &pColor2=color2 | color1 and color2 | Calculates luminosity ratio for two colors, expressed as standard color names (e.g. Blue) or as hex codes. Useful for determining if two colors are accessible or not. Returns a float. |
Spell Check
Method | URI | Parameters | Description |
POST | /CalendarAPI/api/SpellCheck/ | SpellDTO | Returns JSON object with list of incorrect words or suggested words based on the action parameter. |
GET | /CalendarAPI/api/SpellCheck/ | SpellDTO | Returns JSON object with list of incorrectly spelled words. |
ZIP Code
Method | URI | Parameters | Description |
GET | /CalendarAPI/api/Zipcode/?zipcode=zip &take=take | zip – zip code fragment take – number of results to return | Gets list of zipcodes based on partial string value of a zipcode. Used for autocomplete features for a zipcode field. |
GET | /CalendarAPI/api/FieldOfInterest/?city=city | city | Retrieves a list of zipcodes for a city name. |
Data Transfer Object (DTO) classes
CalendarDTO
public class CalendarDTO
{
public int Id;
public string Name;
public bool Default;
public string Description;
}
EventDTO
public class EventDTO
{
public int Id;
public string Title;
public DateTime Start;
public DateTime StartUTC;
public DateTime End;
public DateTime EndUTC;
public string Code;
public string Description;
public string DescriptionHtml;
public bool Active;
public bool Virtual;
public string Url;
public bool AllDay;
public string Address;
public string City;
public string Zipcode;
public decimal Latitude;
public decimal Longitude;
public string ContactInfo;
public bool ApprovalRequired;
public bool Approved;
public DateTime ApprovalDate;
public string ApprovedById;
public DateTime RegistrationCloseDate;
public int EventTypeId;
public string EventTypeName;
public string CreatedById;
public DateTime CreatedDateUTC;
public string UpdatedById;
public string RemainingDates;
public string AllEventDates;
public bool ApproveAllEvents;
public bool IsInOccurrence;
public bool EditAsSingleEvent;
public int OccurrenceId;
public OccurrenceDTO Occurrence;
public int CalendarId;
public string CalendarName;
public virtual ICollection<AudienceDTO> Audiences;
public virtual ICollection<GradeLevelDTO> GradeLevels;
public virtual ICollection<FieldOfInterestDTO> FieldsOfInterest;
public ICollection<int> AudienceIDs;
public ICollection<int> GradeLevelIDs;
public ICollection<int> FieldsOfInterestIDs;
public string GoogleCalendarURL;
public string LiveCalendarURL;
public string YahooCalendarURL;
}
EventType DTO
public class EventTypeDTO
{
public string Name;
}
SpellDTO
public class EventTypeDTO
{
public string Name;
}