Selections
A Selection represents a subset of Domains of a Snapshot. They can be used as a filter for various endpoints.
|
Note
|
Filtering on Selections are made on a best effort basis. Assume for example a search request. The Filtering includes all search results which end with a domain in the selection. This is necessary to include search results of redirected crawled data. Yet, this simpler approach might lead to undesired results: |
| Domain in Selection | Domain in Seed-List | Crawled, indexed Domain | Matches |
|---|---|---|---|
bimid.de |
bimid.de |
www.bimid.de |
true |
www.tageszeitung.de |
www.tageszeitung.de |
www.taz.de |
false |
Filter of Selections will be reworked to use a more sophisticated strategy using the redirect-data which will also match the second case.
/api/selection/list
Returns a list of available selections.
| Parameter | Description |
|---|---|
|
The number of the requested page. |
|
The number of objects of the requested page. |
Example
$ curl 'http://localhost:8080/api/selection/list' -i -X GET
HTTP/1.1 200 OK
X-Rate-Limit-Remaining: 99
Content-Type: application/json
Content-Length: 593
{
"responseHeader" : {
"httpStatus" : null,
"msg" : "",
"query" : "http://localhost:8080/api/selection/list",
"state" : "OK"
},
"content" : [ {
"machineName" : "createWithSelection",
"title" : "the title"
}, {
"machineName" : "SelectionControllerTest.SET",
"title" : ""
}, {
"machineName" : "python-test-selection",
"title" : ""
}, {
"machineName" : "wdc.crawler.test.SelectionServiceTest#set",
"title" : ""
} ],
"page" : {
"size" : 2000,
"number" : 0,
"totalElements" : 4,
"totalPages" : 1
},
"links" : { }
}
/api/selection/{selection}/domains
Returns the set of Domains included in the specified Selection.
| Parameter | Description |
|---|---|
|
The number of the requested page. |
|
The number of objects of the requested page. |
Example
$ curl 'http://localhost:8080/api/selection/createWithSelection/domains' -i -X GET
HTTP/1.1 200 OK
X-Rate-Limit-Remaining: 98
Content-Type: application/json
Content-Length: 963
{
"responseHeader" : {
"httpStatus" : null,
"msg" : "",
"query" : "http://localhost:8080/api/selection/createWithSelection/domains",
"state" : "OK"
},
"content" : [ {
"name" : "www.esf.org"
}, {
"name" : "www.oecd.org"
}, {
"name" : "www.nuffic.nl"
}, {
"name" : "www.eua.be"
}, {
"name" : "www.enqa.eu"
}, {
"name" : "www.eqar.eu"
}, {
"name" : "www.inqaahe.org"
}, {
"name" : "www.esmu.be"
}, {
"name" : "www.eaie.org"
}, {
"name" : "www.britishcouncil.org"
}, {
"name" : "eacea.ec.europa.eu"
}, {
"name" : "www.chea.org"
}, {
"name" : "www.aca-secretariat.be"
}, {
"name" : "www.iau-aiu.net"
}, {
"name" : "www.iie.org"
}, {
"name" : "www.aucc.ca"
}, {
"name" : "www.aau.org"
}, {
"name" : "www.nafsa.org"
} ],
"page" : {
"size" : 2000,
"number" : 0,
"totalElements" : 18,
"totalPages" : 1
},
"links" : { }
}
/api/selection/{selection}/set (beta)
Sets the Domains of the Selection. If the Selection does not exist, it will be created.
|
Note
|
This Endpoint is still in evaluation and will be not usefull for "normal" users. As a normal user you won’t be able to edit a newly created Selection. |
|
Note
|
Selections are SecuredObjects and making changes of the object are secured. To edit an existing selection you have to make sure you have the corresponding access rights. |
Example
$ curl 'http://localhost:8080/api/selection/SelectionControllerTest.SET/set' -i -X PUT \
-H 'Content-Type: text/plain' \
-d ' www.eua.be
www.oecd.org
www.enqa.eu
'
HTTP/1.1 201 Created
X-Rate-Limit-Remaining: 99