DomainGraph
A set of Endpoints to export already prepared DomainGraphs. DomainGraphs represent the graph of Domains (Nodes) and their linkages (Edges). Edges additionally have a weight to count how often one Domain links to another.
The API for DomainGraphs uses a Node-Edge representation. Thus you have to use 2 calls to the API to get the data for a DomainGraph.
There may be multiple different DomainGraphs for one Snapshot. DomainGraphs may be created from Variants and Selections.
As for the Variants, currently only one Variant ONLY_SEEDS exists.
-
ONLY_SEEDS: Contains all nodes and edges from from the crawled Snapshot.
|
Note
|
Currently new DomainGraphs can only be created from the backend. |
/api/domaingraph/list
A list with all existing DomainGraphs.
| Parameter | Description |
|---|---|
|
Optional. The name of a snapshot. Can be specified multiple times. |
|
Optional. The name of a panel. |
|
Optional. The machine-name of the selection. If not specified does not filter the result. |
|
Optional. The variant of the DomainGraph. Currently only 'ONLY_SEEDS' is supported. If not specified, does not filter the result. |
|
The number of the requested page. |
|
The number of objects of the requested page. |
$ curl 'http://localhost:8080/api/domaingraph/list?page=0&size=3' -i -X GET
HTTP/1.1 200 OK
X-Rate-Limit-Remaining: 49
Content-Type: application/json
Content-Length: 431
{
"responseHeader" : {
"httpStatus" : null,
"msg" : "",
"query" : "http://localhost:8080/api/domaingraph/list?page=0&size=3",
"state" : "OK"
},
"content" : [ {
"id" : 84,
"snapshotName" : "20121227_intermediaries",
"variant" : "ONLY_SEEDS",
"selectionMachineName" : null
} ],
"page" : {
"size" : 3,
"number" : 0,
"totalElements" : 1,
"totalPages" : 1
},
"links" : { }
}
/api/domaingraph/{id}/nodes
A list with all nodes in the referenced DomainGraph.
| Parameter | Description |
|---|---|
|
The number of the requested page. |
|
The number of objects of the requested page. |
$ curl 'http://localhost:8080/api/domaingraph/84/nodes?page=0&size=3' -i -X GET
HTTP/1.1 200 OK
X-Rate-Limit-Remaining: 49
Content-Type: application/json
Content-Length: 892
{
"responseHeader" : {
"httpStatus" : null,
"msg" : "",
"query" : "http://localhost:8080/api/domaingraph/84/nodes?page=0&size=3",
"state" : "OK"
},
"content" : [ {
"degree" : 12,
"id" : "www.dfg.de",
"indegree" : 8,
"outdegree" : 4,
"outdegree_seeds" : 4,
"type" : "SEED",
"url" : "www.dfg.de"
}, {
"degree" : 30,
"id" : "www.oaq.ch",
"indegree" : 10,
"outdegree" : 20,
"outdegree_seeds" : 20,
"type" : "SEED",
"url" : "www.oaq.ch"
}, {
"degree" : 11,
"id" : "www.europace.org",
"indegree" : 5,
"outdegree" : 6,
"outdegree_seeds" : 6,
"type" : "SEED",
"url" : "www.europace.org"
} ],
"page" : {
"size" : 3,
"number" : 0,
"totalElements" : 113,
"totalPages" : 38
},
"links" : {
"next" : "http://localhost:8080/api/domaingraph/84/nodes?page=1&size=3"
}
}
/api/domaingraph/{id}/edges
A list with all edges in the referenced DomainGraph.
| Parameter | Description |
|---|---|
|
The number of the requested page. |
|
The number of objects of the requested page. |
$ curl 'http://localhost:8080/api/domaingraph/84/edges?page=0&size=3' -i -X GET
HTTP/1.1 200 OK
X-Rate-Limit-Remaining: 49
Content-Type: application/json
Content-Length: 637
{
"responseHeader" : {
"httpStatus" : null,
"msg" : "",
"query" : "http://localhost:8080/api/domaingraph/84/edges?page=0&size=3",
"state" : "OK"
},
"content" : [ {
"source" : "www.dfg.de",
"target" : "www.esf.org",
"weight" : 20
}, {
"source" : "www.dfg.de",
"target" : "erc.europa.eu",
"weight" : 6
}, {
"source" : "www.dfg.de",
"target" : "www.ciee.org",
"weight" : 2
} ],
"page" : {
"size" : 3,
"number" : 0,
"totalElements" : 1126,
"totalPages" : 376
},
"links" : {
"next" : "http://localhost:8080/api/domaingraph/84/edges?page=1&size=3"
}
}