Content Repository API
From D3A2wiki
Contents |
API
[Note: this text is draft and subject to change]
This API is very light-weight and consists of three URL-based access queries.
The first form is for requesting annotated assessment items from the repository. These are (mostly? all?) retired test questions from state-wide tests, and they include an answer key and commentary as well as the actual question.
The second form allows for general searching by a string and support two variations: one for returning a list of results as a stream of HTML, and one that redirects the user's browser to the first item in the result set.
The third form is a variation of the keyword search. The results are returned as a stream of XML suitable for ingestion into an external application. The search string behavior is the same as the other search methods.
Requesting an Annotated Assessment Item
Requesting an annotated assessment item will return a document containing a retired assessment item from the ODE IMS. This item contains the question as it appeared on the adminstered test, the correct answer and commentary, as well as the percent of students who passed it statewide.
http://resource.d3a2.org/getD3A2AssessmentItem?urn=XXX
where "XXX" is an Ohio Assessment Item URN.
Keyword Search
HTML Results
This is the URL to search for resources in the repository and have the results returned as an HTML list:
http://resource.d3a2.org/search.do?searchField=YYY
This method will direct the user to the Resource Exchange with a search populated. The Resource Exchange has two search methods: "Subject and Grade Level" and "Academic Content Standards" (aka OSIC). The default is "Subject and Grade Level." In order to direct the user to the Academic Content Standards search instead, add the parameter "searchKind=acs" as in:
http://resource.d3a2.org/search.do?searchField=YYY&searchKind=acs
Redirect
To search and automatically be redirected to the first item returned, use this URL:
http://resource.d3a2.org/redirect.do?searchField=YYY
XML Results
To search the Resource Exchange and have the results returned as an XML stream, use this URL:
http://resource.d3a2.org/d3a2/xmlsearch.do?searchField=YYY
This method will return zero or more <d3a2:resource> elements. See the XML Bulk Loading Guide for more details on this format.
Search String Formatting
Where YYY is a search string. Do not enclose the search string in quotes. The search string can be an OSIC code (e.g. "Y2003.CMA", "Y2003.CSC.S02", etc.), a set of keywords (e.g. "math", "science", "tree biology" etc.), or both (e.g. "Y2003.CMA triangle").
The following parameters can now be used in all searches:
- searchField
Grade Level-related search parameters
- searchGradeLower
- searchGradeUpper
OSIC-related search parameters
- searchSubject
- searchStandard
- searchGradeBand
- searchBenchmark
- searchGradeLevel
- searchIndicator
Content-related search parameters
- types
- formats
- providers
- mediums
Function-related search parameters
- functionGroups
functionContentfunctionInstructionalComponentfunctionItemSourcefunctionItemTypefunctionProfessionalDevelopment
Notes:
- The OSIC-related search parameters (searchSubject through searchIndicator) need to be formatted as a valid OSIC codes, and each requires the search parameter "above it", or it will be ignored. See Examples 1a and 1b below.
- For convenience, a single osic code can be included in the searchSubject parameter. The Resource Exchange will parse it into its component parts.
- All of the search terms following functionGroups are extensions of function group. For convenience and consistency with the website, these are now all represented by the functionGroups parameter. See Examples 2 and 3 below.
- Multiple values are now supported for each of the "plural" parameters. To submit more than one value, simply submit the parameter more than once (eg. formats=word%20document&formats=HTML). This will return resources which have any of the values.
- To search by Grade Level range, include both searchGradeLower and searchGradeUpper. Valid values are "LPK", "LKG", and "L01" through "L12". These parameters should not be combined with a search by OSIC code.
- It is still possible to search on "types" but it is no longer a part of the Resource Exchange's search page. If a user chooses to "refine" a search that included "types," any "types" parameters will be lost.
Examples
1a. To find all resources with the word "government" and aligned to OSIC code "Y2003.CSS.S01.G09-10.BE":
http://resource.d3a2.org/d3a2/xmlsearch.do?searchField=government&searchSubject=Y2003.CSS&searchStandard=S01&searchGradeBand=G09-10&searchBenchmark=BE
or just
http://resource.d3a2.org/d3a2/xmlsearch.do?searchField=government&searchSubject=Y2003.CSS.S01.G09-10.BE
1b. If you did not want to include the keyword search, and wanted the results in HTML instead of XML, this query would be:
http://resource.d3a2.org/d3a2/search.do?searchSubject=Y2003.CSS.S01.G09-10.BE&searchKind=acs
2. To search for all assessment items with the word "government":
http://resource.d3a2.org/d3a2/xmlsearch.do?searchField=government&functionGroups=assessment%20item
3. To search for a lesson plan:
http://resource.d3a2.org/d3a2/xmlsearch.do?functionGroups=instructional%20component&functionGroups=lesson%20plan
could also simply be
http://resource.d3a2.org/d3a2/xmlsearch.do?functionGroups=lesson%20plan
4. To find all resources with the word "government" for kindergarten through third grade:
http://resource.d3a2.org/d3a2/xmlsearch.do?searchField=government&searchGradeLower=LKG&searchGradeUpper=L03
