Summarize Graph

Returns a summary of what is in the graph.

The Summarize Graph API returns a summary of the number of nodes and edges in the graph, and details of the stored edge and node attributes.

Quick Start

The following query returns the summary for the English Wikipedia graph.

POST /1/api/[async|sync]/summarizegraph/v1?

The API returns the number of nodes and edges in the graph, and the attributes stored for the nodes and edges.

{
  "nodes": 4574367,
  "edges": 113805296,
  "attributes": [
    {
      "name": "weight",
      "element_type": "edge",
      "data_type": "float",
      "number": 113805296
    },
    {
      "name": "indegree",
      "element_type": "node",
      "data_type": "integer",
      "number": 4574367
    }
  ]
}
Synchronous
https://api.havenondemand.com/1/api/sync/summarizegraph/v1
Asynchronous
https://api.havenondemand.com/1/api/async/summarizegraph/v1
Authentication

This API requires an authentication token to be supplied in the following parameter:

Parameter Description
apikey The API key to use to authenticate the API request.
Parameters

This API accepts the following parameters:

Optional
Name Type Description
graph
enum The graph you want to query. Default value: wiki_eng.
Enumeration Types

This API's parameters use the enumerations described below:

graph
The graph you want to query.
wiki_eng English Wikipedia
Graph where the nodes come from English Wikipedia pages.

This API returns a JSON response that is described by the model below. This single model is presented both as an easy to read abstract definition and as the formal JSON schema.

Asynchronous Use

Additional requests are required to get the result if this API is invoked asynchronously.

You can use /1/job/status/<job-id> to get the status of the job, including results if the job is finished.

You can also use /1/job/result/<job-id>, which waits until the job has finished and then returns the result.

Model
This is an abstract definition of the response that describes each of the properties that might be returned.
Summarize Graph Response {
attributes ( array[Attributes] , optional)
edges ( integer ) The number of edges in the graph.
nodes ( integer ) The number of nodes in the graph.
}
Summarize Graph Response:Attributes {
data_type ( string ) The type of the attribute.
element_type ( string ) Whether the attribute is for nodes or edges.
name ( string ) The name of the attribute.
number ( integer ) The number of elements that have this attribute set.
}
Model Schema
This is a JSON schema that describes the syntax of the response. See json-schema.org for a complete reference.
{
    "properties": {
        "attributes": {
            "items": {
                "properties": {
                    "data_type": {
                        "enum": [
                            "string",
                            "integer",
                            "float",
                            "enum"
                        ],
                        "type": "string"
                    },
                    "element_type": {
                        "enum": [
                            "node",
                            "edge"
                        ],
                        "type": "string"
                    },
                    "name": {
                        "type": "string"
                    },
                    "number": {
                        "minimum": 0,
                        "type": "integer"
                    }
                },
                "required": [
                    "name",
                    "element_type",
                    "data_type",
                    "number"
                ],
                "type": "object"
            },
            "type": "array"
        },
        "edges": {
            "minimum": 0,
            "type": "integer"
        },
        "nodes": {
            "minimum": 0,
            "type": "integer"
        }
    },
    "required": [
        "nodes",
        "edges"
    ],
    "type": "object"
}
https://api.havenondemand.com/1/api/sync/summarizegraph/v1
/api/api-example/1/api/sync/summarizegraph/v1
Examples
See this API for yourself - select one of our examples below.
Summarize Graph
Show node and edge counts in the English Wikipedia graph
Parameters
Optional
Name Type Value
graph
enum


ASync – Response An error occurred making the API request
Response Code:
Response Body

	
Making API Request…
Checking result of job

To try this API with your own data and use it in your own applications, you need an API Key. You can create an API Key from your account page - API Keys.

Output Refresh An error occurred making the API request View Input
Rendered RawHtml Response
Result Display
Response Code:
Response Body:

			
Make this call with curl


If you would like to provide us with more information then please use the box below:

We will use your submission to help improve our product.