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=4&rev2=5 {{attachment:API.png}} == REST API Calls == - === Administration === + === Administration (/admin) === - === Job management === + Responsible class is ''AdminResource''. This API point is created in order to get server status and manage server's state. + + {{{{ + Server status JSON object contains server startup date, availible configuration names, job history and currently running jobs. + GET /admin + { + "startDate":1403716000012, + "configuration":[ + "default" + ], + "jobs":[ + + ], + "runningJobs":[ + + ] + } + }}}} + + It is possible to stop running server using ''/admin/stop''. You can use non-mandatory ''force'' parameter, if you want to stop server despite running tasks. + {{{{ + GET /admin/stop + GET /admin/stop?force=false + GET /admin/stop?force=true + }}}} + __Response__ + {{{{ + Stopping in 5 seconds. + }}}} + + === Jobs === + Responsible class is ''JobResource''. This point is created for job's management. + ==== Listing jobs ==== + + {{{{ + GET /job + }}}} + + __Response__ contains list of all jobs (running and history) + {{{{ + [ + { + "id":"job-id-5977", + "type":"FETCH", + "confId":"default", + "args":null, + "result":null, + "state":"RUNNING", + "msg":"", + "crawlId":"crawl-01" + } + ] + }}}} + === Configuration === === Database === == Nutch Jobs ==