Graph Import plugin

For more information about what this plugin does and the data streams it retrieves, see:

Graph Import

The Graph Import plugin allows you to add a data source to index custom data in SquaredUp.

Using the JSON schema you can add new objects (known as vertices in the schema) and relationships (edges in the schema) to the Map. The Map is sometimes referred to as the "graph", hence the name "Graph Import".

This makes the objects available on dashboards, drilldowns and via the search.

This data source is for advanced users, as the data must match the specified schema.

How to add the data source

To add a data source click on the + next to Data Sources on the left-hand menu in SquaredUp. Search for the data source and click on it to open the Configure data source page.

Configure the data source

  1. Display Name:
    Enter a name for your data source. This helps you to identify this data source in the list of your data sources.

  2. URL/Endpoint:
    Provide a URL endpoint to fetch data from.
  3. Method:
    Choose either GET or POST as your HTTP method.
  4. Optionally, select whether you would like to restrict access to this data source instance. By default, restricted access is set to off.

  5. Click Add.

    You can also add a data source from Settings > Data Sources > Add data source, but sample dashboards are not added when using this method.

Using the Graph Import data source

This data source uses the JSON schema to import new objects into SquaredUp.

The JSON schema

The data should contain one or both of the following two array properties:

{
  "vertices": [], // An array of vertices - see Vertex section below
  "edges": [] // An array of edges - see Edge section below
}

Vertex

Mandatory and optional properties of each vertex are shown below. Other properties, specific to the particular object type the vertex represents may also be present.

sourceId
string
Mandatory
A unique id of this vertex within this instance of the data source
sourceType
string
Mandatory
A more specific type, name of relevance to the data source (e.g. for scoping purposes). For example: “vmwareHost“
name
string
Mandatory
The name of the vertex to be displayed
sourceName
string
Optional
A readable identifier of the data source that imported the vertex
{
  "sourceId": "string", // Mandatory. Unique ID for this object, from your source - e.g. azure pipeline ID. This does not need to be globally unique, but should be unique within your data source.
  "sourceType": "string", // Mandatory. the source type of this object, e.g. "Azure.DevOps.Project", "zendesk_ticket", etc.
  "sourceName": "string", // Optional. Name displayed when grouping search results or in grouped visualizations like graph-nodes-as-blocks, e.g. "Azure DevOps Projects" or "Zendesk Tickets". If not provided, the underlying sourceType will be used instead.
  "name": "string", // Mandatory. Name of the object, displayed in the UI.
  "monitorUrl": "url", // Optional. If this is a monitor or an object being monitored (e.g. an app), specify the URL(s) being monitored. A single string or an array of strings can be specified where there are multiple monitored URLs.
  "links": [ // Optional. An array of external links that will be shown in a dropdown in the web app on this item.
    {
      "url": "url", // Mandatory.
      "label": "string" // Mandatory. Link text.
    }
  ]
  
  // Any other properties can be added and will be stored in the graph.
  // These can then be used in tiles or for scoping / possibly filtering.
}

Edge

Each edge should contain the following three properties. Take great care that the label matches the direction of the edge. If your data source has an edge type labeled “contains” intended to connect folder and file objects, the inV value should be the sourceId of the file object.

outV
The sourceId of the vertex from which the edge emanates
label
A readable label for the edge (this will be shown in graph views in SquaredUp)
inV
The sourceId of the vertex in to which the edge goes
{
  "outV": "string", // Mandatory. The from/source vertex (sourceId) for the edge.
  "label": "string", // Mandatory. The label/verb for the edge, e.g. 'hosts' or 'serves'. The 'is' label is currently reserved for internal usage and is the only forbidden value.
  "inV": "string" // Mandatory. The to/target vertex (sourceId) for the edge.
}

Example

{
	"vertices": [{
			"sourceId": "1",
			"sourceName": "Import",
			"name": "Alice",
			"sourceType": "person"
		},
		{
			"sourceId": "2",
			"sourceName": "Import",
			"name": "Bob",
			"sourceType": "person"
		}
	],
	"edges": [{
		"outV": "1",
		"inV": "2",
		"label": "reports to"
	}]
}

Was this article helpful?


Have more questions or facing an issue?