Dear Wiki user, You have subscribed to a wiki page or wiki category on "Nutch Wiki" for change notification.
The "NutchRESTAPI" page has been changed by FjodorVershinin: https://wiki.apache.org/nutch/NutchRESTAPI?action=diff&rev1=13&rev2=14 This page both documents and provides a UML graphic for the Nutch 2.X REST API. It explains the logic behind the entire API and also provides detail on the type of REST calls which can be made to the Nutch 2.x REST API. - This can be read in conjunction with the documentation on [[bin/nutch nutchserver]] command. - - == UML Graphic == - - The Unified Modeling Language (UML) is a general-purpose modeling language in the field of software engineering, which is designed to provide a standard way to visualize the design of a system. - - The graphic below displays the REST API architecture and described the classes as well as the role and context within the API operation. - - {{attachment:API.png}} == REST API Calls == === Administration === @@ -239, +230 @@ }}}} === Database === + Responsible class is ''DbResource''. This point is created in order to get data from database. + + ==== Run query ==== + + Examples: + {{{{ + + POST /db + { + + } + + POST /db + { + "fields": ["headers"] + } + + POST /db + { + "batchId": "batch-id" + } + + POST /db + { + "startKey":"http://google.com", + "endKey":"http://yahoo.com", + "isKeysReversed":"false", + } + + + POST /db + { + "startKey":"com.google", + "endKey":"com.yahoo", + "isKeysReversed":"true" + } + + }}}} + __Response__ contains data from database with filtered fields. + {{{{ + { + "values":[ + { + "headers":{ + + }, + "status":0, + "markers":{ + + }, + "modifiedTime":0, + "score":0.0, + "prevModifiedTime":0, + "url":"http://verta.ee/", + "__g__dirty":"\\x00\\x00\\x00\\x00", + "fetchInterval":0, + "prevFetchTime":0, + "inlinks":{ + + }, + "retriesSinceFetch":0, + "outlinks":{ + + }, + "fetchTime":0, + "metadata":{ + + } + }, + { + "headers":{ + + }, + "status":0, + "markers":{ + + }, + "modifiedTime":0, + "score":0.0, + "prevModifiedTime":0, + "url":"http://voina.com.ru/", + "__g__dirty":"\\x00\\x00\\x00\\x00", + "fetchInterval":0, + "prevFetchTime":0, + "inlinks":{ + + }, + "retriesSinceFetch":0, + "outlinks":{ + + }, + "fetchTime":0, + "metadata":{ + + } + } + ] + } + }}}} == Nutch Jobs == + + + == UML Graphic == + + The Unified Modeling Language (UML) is a general-purpose modeling language in the field of software engineering, which is designed to provide a standard way to visualize the design of a system. + + The graphic below displays the REST API architecture and described the classes as well as the role and context within the API operation. + + {{attachment:API.png}} == Related Documentation == * [[bin/nutch nutchserver]] - run a (local) Nutch server on a user defined port.