Elasticsearch Crowdsource API

Accessing the Data

Get All Documents

GET - http://dunatis.library.illinois.edu:9200/categorize/_search?pretty

Get All Assets

GET - http://dunatis.library.illinois.edu:9200/categorize/asset/_search?pretty

Get All Categorize Instances

GET - http://dunatis.library.illinois.edu:9200/categorize/category/_search?pretty

Get Url of an Asset

GET http://dunatis.library.illinois.edu:9200/categorize/asset/{id}/?fields=Url

Send Categorize Data for an Asset

POST http://dunatis.library.illinois.edu:9200/categorize/category/

This POST request accepts a json document. Each time a user submits categorize information, a document will be indexed in Elasticsearch under type "category," containing three key-value pairs, based on user input about an asset.

Sample Json:

{ "asset_id": 4, "company": "Chances R", "category": "Entertainment" }

Search the Data

GET http://dunatis.library.illinois.edu:9200/categorize/_search

We can use the search api to later recall assets that match specific categories or company names like so:


OR we can find all of the company names or categories associated with a particular asset like so:



Elasticsearch by default returns only 10 results for each search. To increase the number of results returned, add "&size={number_of_results}" to the end of your query.

To view an easier-to-read results set, add "?pretty" to your query. Example: http://dunatis.library.illinois.edu:9200/categorize/_search?pretty&q=category:entertainment