Returns a list of context records belonging to a bank.
Reading
GET /bank/<bank_id>/contexts HTTP/1.1 Host: assess.itemlogic.com |
Search Fields
You may optionally filter your context listing against certain properties. Each property needs to be an array of values.
Name | Description | Type |
---|---|---|
id |
Context ID. | uuid |
id_vendor | Vendor-assigned Context ID. | string |
title | Search Context title. | string |
body | Search Context body. | string |
text | Search Context full text. This currently includes the context's title and body properties. | string |
stat_lexile | Context's Lexile score. Note: Do not add L at the end of the string. |
number |
stat_flesch_kincaid | Context's Flesch-Kincaid score. | number |
stat_count_word | Context's word count. | number |
Search Modifiers
Name | Description | Type |
---|---|---|
rows |
Number of results to return. | integer |
op | Search operator to use ("and" or "or"). "and" produced exclusive results, "or" produces inclusive results. Defaults to "and". | string |
page | The page number of results to return. | integer |
bare | Just return the context IDs. | boolean |
Searching By Number Ranges
Each number input type can be queried by a singular value (ex: 1000), or by range of values. For example:
- Use "[100 TO 500]" to search for numbers between 100 and 500 inclusively.
- Use "{100 TO 500}" to search for numbers between 100 and 500 exclusively.
- You may use the brace or bracket on either side. Both sides do not need to match (ex: "[100 TO 500}").
Searching Context Body
When using body to query context, you'll be provided with snippets of text, contained in the highlights field of the returned payload, belonging to the passage that matches the text provided in the query:
{ "page": 1, "page_count": 1, "result_count": 1, "results": [ { "id": "57", "id_vendor": "123456", "bank": "1", "client": "1", "title": "Oliver's Change", "items": { "id": "58193096-824c-4cae-894f-361bc0a363c9", "id_vendor": "789012", "id_local": "13742", "title": "Which statement accurately describes Stacy's main influence on Oliver?" }, "stat_lexile": 1100, "stat_count_word": 601, "stat_flesch_kincaid": 9 } ], "facets": null, "highlights": { "57": { "body": [ "<em>Oliver</em> was a seemingly healthy teenager before he met Stacy. Often, people commented that <em>Oliver</em> was the very picture of radiant health...most of the time." ] } } } |
Each key in the highlights field corresponds to the context ID. Inside that field will be a field marked body, which contains an array of string fragments from the context that match your query. There may be more than one fragments.
Important: Since this data is returned in JSON, some string fragments themselves may contain double quotes that need to be escaped in order to be included in the payload. You are responsible for unescaping any content returned in these fragments.