forked from jaeksoft/opensearchserver
-
Notifications
You must be signed in to change notification settings - Fork 0
WEB crawler: list inclusion pattern
AlexandreToyer edited this page Sep 30, 2013
·
3 revisions
This API returns the inclusion pattern list
Requirement: OpenSearchServer v1.5
URL: /services/rest/index/{index_name}/crawler/web/patterns/inclusion
Method: GET
URL parameters:
- index_name (required): The name of the index
- starts_with (optional): A filter to get only the patterns which starts with the given characters
Header (optional returned type):
- Accept:
application/json - Accept:
application/xml
The pattern list is returned either in JSON or XML format
HTTP code: 200
Content (application/json):
{
"successful": true,
"info": "3 item(s) found",
"items": [
"https://github.com/jaeksoft/opensearchserver/*",
"https://sourceforge.net/projects/opensearchserve/*",
"http://www.open-search-server.com/*"
]
}The list was not returned. The reason is provided in the content.
HTTP code: 500
Content (text/plain):
An internal error occurred
Using CURL:
curl -XGET http://localhost:8080/services/rest/index/my_index/crawler/web/patterns/inclusion?starts_with=http://wwwUsing jQuery:
$.ajax({
type: "GET",
dataType: "json",
url: "http://localhost:8080/services/rest/index/my_index/crawler/web/patterns/inclusion console.log(data);
});