Snapshots
A set of Endpoints to discover information about available snapshots.
/api/snapshot/list
Returns a list of Snapshots, which are accessible for the given user.
| Parameter | Description |
|---|---|
|
A simple filter which checks if the name contains the given String |
$ curl 'http://localhost:8080/api/snapshot/list?filter=intermediaries' -i -X GET
HTTP/1.1 200 OK
X-Rate-Limit-Remaining: 30
Content-Type: application/json
Content-Length: 551
{
"responseHeader" : {
"httpStatus" : null,
"msg" : "",
"query" : "http://localhost:8080/api/snapshot/list?filter=intermediaries",
"state" : "OK"
},
"content" : [ {
"name" : "20121227_intermediaries",
"description" : null,
"indexed" : true,
"textExtracted" : true
}, {
"name" : "20240701_intermediaries",
"description" : null,
"indexed" : false,
"textExtracted" : false
} ],
"page" : {
"size" : 2000,
"number" : 0,
"totalElements" : 2,
"totalPages" : 1
},
"links" : { }
}
/api/snapshot/{snapshot}/domains
Returns the set of Domains included in the specified Snapshot. The information about Domains reflects the imported status of a crawl.
Information can be only obtained about crawled domains (Seeds).
| Parameter | Description |
|---|---|
|
The number of the requested page. |
|
The number of objects of the requested page. |
$ curl 'http://localhost:8080/api/snapshot/20121227_intermediaries/domains?page=0&size=2' -i -X GET
HTTP/1.1 200 OK
X-Rate-Limit-Remaining: 29
Content-Type: application/json
Content-Length: 587
{
"responseHeader" : {
"httpStatus" : null,
"msg" : "",
"query" : "http://localhost:8080/api/snapshot/20121227_intermediaries/domains?page=0&size=2",
"state" : "OK"
},
"content" : [ {
"domainName" : "www.cpu.fr",
"type" : "SEED",
"pages" : 10008
}, {
"domainName" : "www.srhe.ac.uk",
"type" : "SEED",
"pages" : 9995
} ],
"page" : {
"size" : 2,
"number" : 0,
"totalElements" : 114,
"totalPages" : 57
},
"links" : {
"next" : "http://localhost:8080/api/snapshot/20121227_intermediaries/domains?page=1&size=2"
}
}
/api/snapshot/{snapshot}/seeds
Return concise information about seeds, including their crawled status and possible redirects.
|
Note
|
The information of seeds is generated from the Heritrix seed-reports. Status codes can be found here: https://heritrix.readthedocs.io/en/latest/glossary.html#status-codes |
Fields of one seed-item:
| Field | Description |
|---|---|
httpStatusCode |
Extended httpStatusCode for the current uri |
status |
A more humand readable status code |
uri |
The actual URI. |
redirectsTo |
A possible redirect. Return "null", if there was no redirect. Please note, that such a redirect creates following seed-item which in turn could again create a redirect. |
$ curl 'http://localhost:8080/api/snapshot/20121227_intermediaries/seeds?size=3' -i -X GET
HTTP/1.1 200 OK
X-Rate-Limit-Remaining: 29
Content-Type: application/json
Content-Length: 791
{
"responseHeader" : {
"httpStatus" : null,
"msg" : "",
"query" : "http://localhost:8080/api/snapshot/20121227_intermediaries/seeds?size=3",
"state" : "OK"
},
"content" : [ {
"httpStatusCode" : -6,
"status" : "NOTCRAWLED",
"uri" : "http://www.esib.org/",
"redirectsTo" : null
}, {
"httpStatusCode" : -6,
"status" : "NOTCRAWLED",
"uri" : "http://www.forum.eua.be/",
"redirectsTo" : null
}, {
"httpStatusCode" : -6,
"status" : "NOTCRAWLED",
"uri" : "http://www.www2.esf.org/",
"redirectsTo" : null
} ],
"page" : {
"size" : 3,
"number" : 0,
"totalElements" : 157,
"totalPages" : 53
},
"links" : {
"next" : "http://localhost:8080/api/snapshot/20121227_intermediaries/seeds?page=1&size=3"
}
}
/api/snapshot/{snapshot}/searchDomains
Queries the SearchIndex of the crawled documents with a given Query and returns a list of hits in each domain. Only domains which actually have at least one hit are returned.
|
Important
|
The number of hits of a domain is calculated as the sum of hits in each document. Internally a facetted SolrQuery of the index is created which uses the facet.method=fc (see https://solr.apache.org/guide/solr/latest/query-guide/faceting.html). |
| Parameter | Description |
|---|---|
|
A query to search for. Can be an arbitrary Solr-Query. |
|
Optional. A machineName of a Selection. If specified only results of Domains in the Selection will be returned. |
$ curl 'http://localhost:8080/api/snapshot/20121227_intermediaries/searchDomains?query=uni&size=2' -i -X GET
HTTP/1.1 200 OK
X-Rate-Limit-Remaining: 30
Content-Type: application/json
Content-Length: 566
{
"responseHeader" : {
"httpStatus" : null,
"msg" : "",
"query" : "http://localhost:8080/api/snapshot/20121227_intermediaries/searchDomains?query=uni&size=2",
"state" : "OK"
},
"content" : [ {
"domainName" : "www.acquin.org",
"hits" : 2376
}, {
"domainName" : "www.che.de",
"hits" : 1318
} ],
"page" : {
"size" : 2,
"number" : 0,
"totalElements" : 52,
"totalPages" : 26
},
"links" : {
"next" : "http://localhost:8080/api/snapshot/20121227_intermediaries/searchDomains?query=uni&page=1&size=2"
}
}