API Documentation
- Ian Christopher (Deactivated)
Introduction
This section provides a technical overview of the Scholar Snapp School Info API and includes a link to a formal OpenAPI specification.
API Overview
The Scholar Snapp School Info API is fairly simple and generally adheres to RESTful API design principles. Those developing systems that connect to the Snapp Central API will find many similarities, and, generally speaking, system development and interaction will look familiar to most API developers.
Example API Calls
To get a general sense of the usage, it's helpful to look at a few example calls:
Calling:
GET
https://{{base url}}/api/schools
...will return all schools from the system. By default, the system limits the results to the first 25 sorted by school name. This endpoint provides school records that contain all fields in the system.
Calling:
GET https://{{base url}}/api/schools?state=TX&order=city&limit=100
...will return all schools in Texas limited to the first 100. The list will be sorted by city.
Calling:
GET https://{{base url}}/api/schools?name=Austin&state=TX&order=name
...will return all schools in Texas with "Austin" in the name. The list will be sorted by school name, and will be limited to the first 25 records.
Calling:
GET https://{{base url}}/api/schools?name=Austin&state=TX&order=name&page=2
...will return the second page of results from the query above (i.e., records 26–50).
The examples above all called the primary /api/schools
endpoint, which returns a lot of data for each school. If you only need identifying data points such as a name and location, you can use a different endpoint built for high performance. Calling:
GET https://{{base url}}/api/schoolDirectoryEntries?name=Austin&state=TX&order=name&limit=100
...will return summary information (name, city, state, id).
Endpoints
The School Info API provides two endpoints:
/api/schools.
Provides detailed school information./api/schoolDirectoryEntries.
Provides summary school information.
HTTP Methods
The School Info API provides read-only data. Not surprisingly, the only method supported is GET.
Parameters
The API supports several parameters.
Query parameters include:
- ceebCode. Finds exact matches and starts-with.
- city. Supports partial matches (e.g.,
brown
finds Brownsville, Browning, Brown City, etc.). - name. Supports partial matches (e.g.,
austin
finds Austin High School, Art Institute of Austin, etc.). - ncesId. Finds exact matches and starts-with.
- schoolType. Supports
High School
orCollege
. - state. Use postal code abbreviations (e.g.,
CA
,TX
).
Return control parameters include:
- limit. Limits number of records returned. Default value is 25.
- order. Sorts returned values. Supports
name
,city
,state
. Default isname
. - orderDir. Determines direction of sorted values.
asc
ordesc
. Default isasc
. - page. Specifies the page of results to display, based on the current limit. With a limit of 25, page 2 displays records 26–50.
HTTP Codes & Error Responses
The API uses HTTP codes to indicate the result of a call, including error types. Examples include:
- 200. The call was successful.
- 400. Bad or malformed request.
- 401. Unauthorized request. The credentials or supplied token was not valid.
- 500. Internal server error. Something went wrong on the API host.
- 503. Service unavailable. The server is down for maintenance. Our platform host also returns this value in the event of a timeout, so if an issue persists past a reasonable, brief maintenance window, consider checking for other issues.
The API specification has the full list for each error.
API Specification
The Scholar Snapp School Info API has an interactive OpenAPI specification browsable in a Swagger UI here.
Page Contents:
Site Contents: