-
Notifications
You must be signed in to change notification settings - Fork 10
REST API
Mark Gorenstein edited this page Jun 6, 2014
·
5 revisions
% curl -u USERNAME:PASSWORD --data 'username=USERNAME&password=PASSWORD' 'http://IP:PORT/_authenticate'
% curl -u USERNAME:PASSWORD -X GET 'IP:PORT/opensyllabus/opensyllabus/_find'
Optional Arguments:
- criteria=search_criteria (object)
- fields=fields_to_return (object)
- sort=sort_fields (object)
- skip=num (number)
- limit=num (number)
- explain=true
- batch_size=num_to_return (number)
Example:
To return three documents:
% curl -u USERNAME:PASSWORD -X GET 'IP:PORT/opensyllabus/opensyllabus/_find?batch_size=3'
Additional explanation and examples at sleepy mongoose docs, and a good tutorial here.