All versions of this documentation
X

Linkurious

Linkurious - Get status

Get the status of the Linkurious Server.

/api/status

Success 200

Field Type Description
status object

Status of the server

  code number

Status code of the server (100 : starting, 200 : OK, >400 : problem)

  name string

Current server status

  message string

Description of the current server status

  uptime number

Seconds since the server is up

HTTP/1.1 200 OK
{
  "status": {
    "code": 200,
    "name": "initialized",
    "message": "Linkurious ready to go :)",
    "uptime": 122
  }
}

Linkurious - Get version

Get Linkurious' current version information.

/api/version

Success 200

Field Type Description
tag_name string

Version tag

name string

Version name

prerelease boolean

Whether this is a pre-release

enterprise boolean

Whether this is Linkurious Enterprise or Linkurious Starter

HTTP/1.1 200 OK
{
  "tag_name": "v0.5.0",
  "name": "Nasty Nostradamus",
  "prerelease": true,
  "enterprise": true
}

Linkurious - Get data-sources status

Get the status of all the data-sources.

/api/dataSources

Success 200

Field Type Description
sources object[]

Data-sources

  name string

Name of the data-source

  configIndex number

Index of the data-source in the dataSources array in the configuration

  key string

Unique key of this data-source (it's null if the data-source is not connected)

  connected boolean

Whether the data-source is connected

  state string

Current state of the data-source

Allowed values: "offline", "connecting", "needConfig", "needFirstIndex", "needReindex", "indexing", "ready"

  reason string

Explanation of the current state

  error optional string

The error that caused the current state, if any

HTTP/1.1 200 OK
{
  "sources": [
    {
      "name": "Database #0",
      "configIndex": 0,
      "key": "a2e3c50f",
      "connected": true,
      "state": "ready",
      "reason": "The data-source is ready."
    }, {
      "name": "Database #1",
      "configIndex": 1,
      "key": "ef984bb0",
      "connected": true,
      "state": "needFirstIndex",
      "reason": "The data-source needs to be indexed at least once."
    }, {
      "name": "Database #2",
      "configIndex": 2,
      "key": null,
      "connected": false,
      "state": "offline",
      "reason": "Could not connect to graph database server.",
      "error": "Connection refused (check your username and password)"
    }
  ]
}

Linkurious - Get the configuration

Return the configuration of the application.

/api/config

Parameter

Field Type Description
sourceIndex optional number

configIndex of a data-source (to indicate current data-source)

Default value: 0

Success 200

Field Type Description
config object

Configuration of Linkurious.

  advanced object

General data-sources configuration.

    maxPathLength number

Maximum path length returned by the shortest path API.

    shortestPathsMaxResults number

Maximum number of results returned by shortest paths API.

    connectionRetries number

Maximum number of retries when connecting/reconnecting to data-source.

    pollInterval number

Number of seconds between "pings" to a data-source when connected.

    indexationChunkSize number

Number of nodes/edges read at once from a data-source when indexing it.

    expandThreshold number

Number of expanded nodes that will trigger the "limit expand to" alert popup.

    searchAddAllThreshold number

Maximum number add nodes using the "add all" in a search.

    searchThreshold number

Maximum value of the "size" parameter in all search APIs.

    minSearchQueryLength number

Minimum number of characters in a search query before it is sent to the server.

    rawQueryTimeout number

Timeout of pattern queries (cypher, gremlin, etc.) in milliseconds.

  rights object

client access configuration.

    authRequired boolean

Whether authentication is required.

    dataEdition boolean

Whether data-edition is enabled.

    loginTimeout boolean

User login timeout.

    widget boolean

Whether the widget feature is enabled.

    oauth2Provider string

The current oauth2 provider (or null if none).

  analytics object

Google analytics configuration for the client.

    enabled boolean

Whether to enable Google analytics on the client.

    code: string

Google analytics tracking code.

    domain string

Google analytics tracking domain.

  sigma object

Sigma configuration.

  palette object

Sigma design palette configuration.

  styles object

Styles configuration.

  leaflet object[]

Leaflet layer configurations for geo mode.

    name string

Name of the layer.

    thumbnail string

Path of this layer's thumbnail, relative to client root.

    urlTemplate string

Tile-URL template for this layer.

    attribution string

Copyright attribution text for this layer.

    subdomains string

subdomain letters to use in tile-URL template.

    id string

Layer ID (needed for MapBox layers).

    accessToken string

Layer access token (user for MapBox layers).

    minZoom number

Minimum valid zoom of the layer.

    maxZoom number

Maximum valid zoom of the layer.

  source object

Current source public configuration.

    features object

Current source features.

      schema object

Whether the schema is available.

        counts boolean

Whether the schema can be modified or not. (false implies that the schema is frozen)

        properties boolean

Whether the properties of each category/type are included in the schema.

        nodes boolean

Whether the schema of nodes is available.

        edges boolean

Whether the schema of edges is available.

      inferredSchema boolean

Whether inferred node/edge-types are detected in the schema.

      directory boolean

Whether the directory is available.

      typing boolean

Whether property types are available in the schema.

      edgeProperties boolean

Whether edge properties are allowed.

      immutableNodeCategories boolean

Whether node categories are immutable.

      minNodeCategories number

Minimum number of categories for a node.

      maxNodeCategories number

Maximum number of categories for a node.

      canCount boolean

Whether one among the graph or the index can count nodes and edges.

      alerts boolean

Whether alerts are available.

      dialects string[]

Dialects supported by the graph database.

      shortestPath boolean

Whether shortest paths queries are allowed.

      externalIndex boolean

Whether the search index is internal (e.g: Elasticsearch) or external (e.g: DSE Search)

      alternativeIds boolean

Whether alternative IDs can be used.

      fuzzy boolean

Whether the search index allows fuzzy search queries.

      canIndexEdges boolean

Whether the search index can index edges.

      canIndexCategories boolean

Whether the search index can index categories.

      versions boolean

Whether nodes and edges versions is increased on edit.

      advancedQueryDialect string

Whether the index can provide advanced search queries and of which dialect. (undefined if not supported)

      searchHitsCount boolean

Whether the search result will contain 'totalHits' or 'moreResults'.

    alternativeIds object

Current source alternative IDs.

      node string

Alternative node ID.

      edge string

Alternative edge ID.

    latitudeProperty string

The default node property used for latitude.

    longitudeProperty string

The default node property used for longitude.

    directory object

Which parts of the current data-source's directory feature are enabled.

      nodes boolean

Whether nodes-directory enabled (depends on ElasticSearch memory allocation).

      edges boolean

Whether edges-directory is enabled (depends on ElasticSearch memory allocation).

    skipEdgeIndexation boolean

Whether edges are not indexed for this source

    readOnly boolean

Whether the source is in readonly mode.

    specialProperties object[]

Properties with special access-rights for this source.

      key string

Key of the property.

      read boolean

Whether the property can be read.

      create boolean

Whether the property can be created.

      update boolean

Whether the property can be updated.

  graphDb object

Current data-source's graph configuration (if admin).

  index object

Current data-source's index configuration (if admin).

  sourceName object

Current data-source's name (if admin).

  enterprise boolean

Whether the server is a Linkurious Enterprise server.

  domain string

the server's domain, useful to generate URLs.

  alerts object

The alerts configuration.

    maxMatchTTL number

The maximum and default time to live for a match (in days).

    maxMatchesLimit number

The maximum and default number of matches stored for an alerts.

    maxRuntimeLimit number

The maximum and default runtime limit for an alert update (in milliseconds).

    maxConcurrency number

Maximum number of alerts updated at the same time.

Linkurious - Update the configuration

Update Linkurious' configuration.

/api/config

Permission: admin  

Parameter

Field Type Description
path string

The configuration path to override (use dataSource.* to edit the current data-source configuration)

configuration any

The configuration value to set for the given path

sourceIndex optional number

Index of the data-source in the dataSources array in the configuration

Default value: 0

reset optional boolean

Whether to reset the configuration to default values (the configuration parameter will be ignored). If the path parameter is specified, only the configuration corresponding to the specified path will be reset

Default value: false

{
    "path": "dataSource.name",
    "configuration": "New data-source name",
    "sourceIndex": 2
}
HTTP 1.1 201 Created

Linkurious - Find users

Find users by e-mail, username or group id.

/api/findUsers

Permission: authenticated  

Parameter

Field Type Description
filter optional string

Text filter to search on the e-mail or the username fields

group_id optional number[]

Filter on groups

unwanted_ids optional number[]

Unwanted user IDs in the result

size optional number

Page size (maximum number of returned users)

start optional number

Offset from the first result

Success 200

Field Type Description
found number

Number of hits

results object[]

Users

  id number

ID of the user

  username string

Username of the user

  email string

E-mail of the user

  source string

Source of the user (local, ldap, oauth2, etc.)

  groups group[]

Groups of the user

  admin boolean

Whether the user is an administrator

  preferences preferences

Preferences of the user

  visCount number

Number of visualization owned by the user

HTTP/1.1 200 OK
{
  "found": 1,
  "results": [
    {
      "id": 2,
      "username": "john",
      "email": "john@example.com",
      "groups": [
        {
          "id": 2,
          "name": "admin",
          "builtin": true
        }
      ],
      "source": "local",
      "admin": true,
      "preferences": {},
      "visCount": 0
    }
  ]
}

Auth

Auth - Login

Log a user in by e-mail or username and password and return it.

/api/auth/login

Parameter

Field Type Description
usernameOrEmail string

User e-mail or username

password string

User password

Success 200

Field Type Description
user object

User

  id number

ID of the user

  username string

Name of the user

  email string

E-mail of the user

  source string

Source of the user ("local", "ldap", "oauth2", etc.)

  groups group[]

Groups the user belongs to

  admin boolean

Whether the user is an administrator

  preferences preferences

Preferences of the user

  actions object

Arrays of authorized actions indexed by data-source key. The special key all lists actions authorized on all the data-sources

HTTP/1.1 200 OK
{
  "user": {
    "id": 3,
    "username": "john",
    "email": "john@linkurio.us",
    "groups": [
      {
        "id": 1,
        "name": "default",
        "builtin": true
      }
    ],
    "source": "local",
    "admin": false,
    "preferences": {
      "pinOnDrag": true
    },
    "actions": {
      "all": [],
      "a0df89fb": ["rawReadQuery"]
    }
  }
}

Auth - Login and redirect

Log a user in by e-mail or username and password and redirect him to a given path.

/api/auth/loginRedirect

Parameter

Field Type Description
usernameOrEmail string

User e-mail or username

password string

User password

path optional string

Path to redirect to

Default value: /

errorPath optional string

Path to redirect to in case of error

Default value: path

HTTP/1.1 302 Redirect
Location: /

Auth - Logout

Log the current user out.

/api/auth/logout
HTTP/1.1 204 No Content

Auth - Check if authenticated

Check if a user is authenticated.

/api/auth/authenticated
HTTP/1.1 204 No Content
HTTP/1.1 401 Unauthorized
{
  "key": "unauthorized",
  "message": "Unauthorized."
}

Auth - Check if admin

Check if the user is authenticated as an admin.

/api/auth/admin
HTTP/1.1 204 No Content
HTTP/1.1 401 Unauthorized
{
  "key": "unauthorized",
  "message": "Unauthorized."
}

Auth - Get current user

Get the profile of the current user.

/api/auth/me

Permission: authenticated  

Success 200

Field Type Description
user object

User

  id number

ID of the user

  username string

Name of the user

  email string

E-mail of the user

  source string

Source of the user ("local", "ldap", "oauth2", etc.)

  groups group[]

Groups the user belongs to

  admin boolean

Whether the user is an administrator

  preferences preferences

Preferences of the user

  actions object

Arrays of authorized actions indexed by data-source key. The special key all lists actions authorized on all the data-sources

HTTP/1.1 200 OK
{
  "user": {
    "id": 3,
    "username": "john",
    "email": "john@linkurio.us",
    "groups": [
      {
        "id": 1,
        "name": "default",
        "builtin": true
      }
    ],
    "source": "local",
    "admin": false,
    "preferences": {
      "pinOnDrag": true
    },
    "actions": {
      "all": [],
      "a0df89fb": ["rawReadQuery"]
    }
  }
}
HTTP/1.1 401 Unauthorized
{
  "key": "unauthorized",
  "message": "Unauthorized."
}

Auth - Update current user

Update the current user.

/api/auth/me

Permission: authenticated  

Parameter

Field Type Description
username optional string

New username

email optional string

New e-mail

password optional string

New password

preferences optional object

New user preferences

Success 200

Field Type Description
id number

ID of the user

username string

Name of the user

email string

E-mail of the user

source string

Source of the user ("local", "ldap", "oauth2", etc.)

groups group[]

Groups the user belongs to

admin boolean

Whether the user is an administrator

preferences preferences

Preferences of the user

actions object

Arrays of authorized actions indexed by data-source key. The special key all lists actions authorized on all the data-sources

HTTP/1.1 200 OK
{
  "id": 3,
  "username": "john",
  "email": "john@linkurio.us",
  "groups": [
    {
      "id": 1,
      "name": "default",
      "builtin": true
    }
  ],
  "source": "local",
  "admin": false,
  "preferences": {
    "pinOnDrag": true
  },
  "actions": {
    "all": [],
    "a0df89fb": ["rawReadQuery"]
  }
}

Auth - Login via OAuth2

Redirect the user to the OAuth2 provider for authorization.

/api/auth/oauth2/login
HTTP/1.1 302 Redirect

Applications

Applications - Get all the applications

Get all the API applications.

/api/admin/applications

Permission: admin  

Success 200

Field Type Description
applications object[]

Applications

  id number

ID of the application

  name string

Name of the application

  apiKey string

Generated key (32 hexadecimal characters)

  enabled boolean

Whether the application is enabled

  rights string[]

Enabled actions for the application

  groups group[]

Groups the application can act on behalf of

  createdAt string[]

Creation date in ISO-8601 format

  updatedAt string[]

Last update date in ISO-8601 format

HTTP/1.1 200 OK
[
  {
    "id": 1,
    "enabled": true,
    "apiKey": "e3fadcbd39ddb21fe8ecb206dadff36d",
    "name": "test_app",
    "rights": [
      "visualization.create",
      "visualization.edit",
      "visualization.read",
      "visualization.delete"
    ],
    "groups": [
      {
        "id": 1,
        "name": "default",
        "builtin": true
      }
    ],
    "createdAt": "2017-01-24T11:14:51.337Z",
    "updatedAt": "2017-01-24T11:31:13.769Z"
  },
  {
    "id": 2,
    "enabled": true,
    "apiKey": "738c9f3b66aad7218c69843a78905ccd",
    "name": "test_app_2",
    "rights": [
      "visualization.read"
    ],
    "groups": [
      {
        "id": 1,
        "name": "default",
        "builtin": true
      }
    ],
    "createdAt": "2017-01-24T11:16:02.417Z",
    "updatedAt": "2017-01-24T11:16:02.417Z"
  }
]

Applications - Create an application

Add a new API application.

/api/admin/applications

Permission: admin  

Parameter

Field Type Description
name string

Name of the application

enabled optional boolean

Whether the application is enabled

Default value: true

groups number[]

IDs of the groups the application can act on behalf of

rights string[]

Enabled actions for the application

Allowed values: "visualization.read", "visualization.create", "visualization.edit", "visualization.delete", "visualization.list", "visualizationFolder.create", "visualizationFolder.edit", "visualizationFolder.delete", "visualizationShare.read", "visualizationShare.create", "visualizationShare.delete", "sandbox", "widget.read", "widget.create", "widget.edit", "widget.delete", "graphItem.read", "graphItem.create", "graphItem.edit", "graphItem.delete", "graphItem.search", "savedGraphQuery.read", "savedGraphQuery.create", "savedGraphQuery.edit", "savedGraphQuery.delete", "graph.rawRead", "graph.rawWrite", "graph.shortestPath", "alert.read", "alert.doAction", "schema"

Success 200

Field Type Description
id number

ID of the application

name string

Name of the application

apiKey string

Generated key (32 hexadecimal characters)

enabled boolean

Whether the application is enabled

rights string[]

Enabled actions for the application

groups group[]

Groups the application can act on behalf of

createdAt string[]

Creation date in ISO-8601 format

updatedAt string[]

Last update date in ISO-8601 format

HTTP/1.1 200 OK
{
  "id": 1,
  "enabled": true,
  "apiKey": "76554081e5b0a2d7852deec4990ebc58",
  "name": "test_app",
  "rights": [
    "visualization.create",
    "visualization.edit",
    "visualization.read",
    "visualization.delete"
  ],
  "groups": [
    {
      "id": 1,
      "name": "default",
      "builtin": true
    }
  ],
  "createdAt": "2017-01-24T11:16:03.445Z",
  "updatedAt": "2017-01-24T11:16:03.445Z"
}

Applications - Update an application

Update an API application.

/api/admin/applications/:id

Permission: admin  

Parameter

Field Type Description
name optional string

Name of the application

enabled optional boolean

Whether the application is enabled

Default value: true

groups optional number[]

IDs of the groups the application can act on behalf of

rights optional string[]

Enabled actions for the application

Allowed values: "visualization.read", "visualization.create", "visualization.edit", "visualization.delete", "visualization.list", "visualizationFolder.create", "visualizationFolder.edit", "visualizationFolder.delete", "visualizationShare.read", "visualizationShare.create", "visualizationShare.delete", "sandbox", "widget.read", "widget.create", "widget.edit", "widget.delete", "graphItem.read", "graphItem.create", "graphItem.edit", "graphItem.delete", "graphItem.search", "savedGraphQuery.read", "savedGraphQuery.create", "savedGraphQuery.edit", "savedGraphQuery.delete", "graph.rawRead", "graph.rawWrite", "graph.shortestPath", "alert.read", "alert.doAction", "schema"

Success 200

Field Type Description
id number

ID of the application

name string

Name of the application

apiKey string

Generated key (32 hexadecimal characters)

enabled boolean

Whether the application is enabled

rights string[]

Enabled actions for the application

groups group[]

Groups the application can act on behalf of

createdAt string[]

Creation date in ISO-8601 format

updatedAt string[]

Last update date in ISO-8601 format

HTTP/1.1 200 OK
{
  "id": 1,
  "enabled": true,
  "apiKey": "76554081e5b0a2d7852deec4990ebc58",
  "name": "test_app",
  "rights": [
    "visualization.create",
    "visualization.edit",
    "visualization.read",
    "visualization.delete"
  ],
  "groups": [
    {
      "id": 1,
      "name": "default",
      "builtin": true
    }
  ],
  "createdAt": "2017-01-24T11:16:03.445Z",
  "updatedAt": "2017-01-24T11:16:03.445Z"
}

Graph

Graph - Get a saved graph query

Get a graph query owned by the current user.

/api/:dataSource/graph/my/rawQuery/:id

Permission: authenticated   , API right: savedGraphQuery.read

Parameter

Field Type Description
dataSource string

Key of the data-source

id number

ID of the graph query

Success 200

Field Type Description
id number

ID of the graph query

content string

Content of the graph query

name optional string

Name of the graph query

dialect string

Dialect of the graph query (cypher, gremlin, sparql, etc.)

createdAt string

Creation date in ISO-8601 format

updatedAt string

Last update date in ISO-8601 format

HTTP/1.1 200 OK
{
  "id": 2,
  "name": "my other saved query",
  "dialect": "cypher",
  "content": "MATCH (n)-[r:DIRECTED]-(n2) RETURN n, r, n2",
  "createdAt": "2015-06-11T13:22:51.000Z",
  "updatedAt": "2015-06-11T13:22:51.000Z"
}

Graph - Get all saved graph queries

Get all the graph queries owned by the current user.

/api/:dataSource/graph/my/rawQuery/all

Permission: authenticated   , API right: savedGraphQuery.read

Parameter

Field Type Description
dataSource string

Key of the data-source

Success 200

Field Type Description
queries object[]

Graph queries

  id number

ID of the graph query

  content string

Content of the graph query

  name optional string

Name of the graph query

  dialect string

Dialect of the graph query (cypher, gremlin, sparql, etc.)

  createdAt string

Creation date in ISO-8601 format

  updatedAt string

Last update date in ISO-8601 format

HTTP/1.1 200 OK
[
  {
    "id": 1,
    "name": "my saved query",
    "dialect": "cypher",
    "content": "MATCH (n) RETURN n",
    "createdAt": "2015-06-11T13:22:51.000Z",
    "updatedAt": "2015-06-11T13:22:51.000Z"
  },
  {
    "id": 2,
    "name": "my other saved query",
    "dialect": "cypher",
    "content": "MATCH (n)-[r:DIRECTED]-(n2) RETURN n, r, n2",
    "createdAt": "2015-06-11T13:22:51.000Z",
    "updatedAt": "2015-06-11T13:22:51.000Z"
  }
]

Graph - Save a graph query

Save a graph query for the current user.

/api/:dataSource/graph/my/rawQuery

Permission: authenticated   , API right: savedGraphQuery.create

Parameter

Field Type Description
dataSource string

Key of the data-source

dialect string

Dialect of the graph query (cypher, gremlin, sparql, etc.)

content string

Content of the graph query

name optional string

Name of the graph query

Success 201

Field Type Description
id number

ID of the graph query

content string

Content of the graph query

name optional string

Name of the graph query

dialect string

Dialect of the graph query (cypher, gremlin, sparql, etc.)

createdAt string

Creation date in ISO-8601 format

updatedAt string

Last update date in ISO-8601 format

HTTP/1.1 201 Created
{
  "id": 1,
  "name": "my saved query",
  "dialect": "cypher",
  "content": "MATCH (n) RETURN n",
  "createdAt": "2015-06-11T13:22:51.000Z",
  "updatedAt": "2015-06-11T13:22:51.000Z"
}

Graph - Update a saved graph query

Update a graph query owned by the current user.

/api/:dataSource/graph/my/rawQuery/:id

Permission: authenticated   , API right: savedGraphQuery.edit

Parameter

Field Type Description
dataSource string

Key of the data-source

id number

ID of the graph query

name optional string

New name of the graph query

content optional string

New content of the graph query

Success 200

Field Type Description
id number

ID of the graph query

content string

Content of the graph query

name optional string

Name of the graph query

dialect string

Dialect of the graph query (cypher, gremlin, sparql, etc.)

createdAt string

Creation date in ISO-8601 format

updatedAt string

Last update date in ISO-8601 format

HTTP/1.1 200 OK
{
  "id": 2,
  "name": "my other saved query",
  "dialect": "cypher",
  "content": "MATCH (n)-[r:DIRECTED]-(n2) RETURN n, r, n2",
  "createdAt": "2015-06-11T13:22:51.000Z",
  "updatedAt": "2015-06-11T13:22:51.000Z"
}

Graph - Delete a saved graph query

Delete a graph query owned by the current user.

/api/:dataSource/graph/my/rawQuery/:id

Permission: authenticated   , API right: savedGraphQuery.delete

Parameter

Field Type Description
dataSource string

Key of the data-source

id number

ID of the graph query

HTTP/1.1 204 No Content

Graph - Execute a graph query

Get all the nodes and edges matching the given graph query.

/api/:dataSource/graph/rawQuery

Permission: authenticated   , API right: graphQuery.rawRead API right: graph.rawWrite

Parameter

Field Type Description
dataSource string

Key of the data-source

dialect optional string

Dialect of the graph query (cypher, gremlin, sparql, etc.). If not defined, it defaults to the first supported dialect of the data-source

query string

Content of the graph query

with_version boolean

Whether to include the node and edge versions

Success 200

Field Type Description
nodes object[]

Nodes

  id id

ID of the node

  data object

Properties of the node

  categories string[]

Categories of the node

  statistics object

Statistics of the node

    digest LkDigestItem[]

Statistics of the neighborhood of the node

  edges object[]

Subset of adjacent edges of this node (only the ones matching the API description)

    id id

ID of the edge

    data object

Properties of the edge

    type string

Type of the edge

    source id

ID of the source node

    target id

ID of the target node

HTTP/1.1 200 OK
[
  {
    "id": 1,
    "data": {
      "name": "Keanu Reeves",
      "born": 1964
    },
    "categories": ["Person"],
    "statistics": {
      "digest": [
        {
          "nodeCategories": ["Movie", "TheMatrix", "TheMatrixReloaded"],
          "edgeType": "ACTED_IN",
          "nodes": 3,
          "edges": 3
        }
      ]
    },
    "edges": [
      {
        "id": 100,
        "type": "ACTED_IN",
        "source": 1,
        "target": 2,
        "data": {
          "role": "Neo"
        }
      },
      {
        "id": 101,
        "type": "ACTED_IN",
      "source": 1,
        "target": 3,
        "data": {
          "role": "Neo"
        }
      }
    ]
  },
  {
    "id": 2,
    "data": {
      "title": "The Matrix",
      "release": 1999
    },
    "categories": ["Movie"],
    "statistics": {
      "digest": [
        {
          "nodeCategories": ["Person"],
          "edgeType": "ACTED_IN",
          "nodes": 2,
          "edges": 2
        }
      ]
    },
    "edges": [
      {
        "id": 100,
        "type": "ACTED_IN",
        "source": 1,
        "target": 2,
        "data": {
          "role": "Neo"
        }
      },
      {
        "id": 102
        "type": "SEQUEL_OF",
        "source": 3,
        "target": 2,
        "data": {}
      }
    ]
  },
  {
    "id": 3,
    "data": {
      "title": "The Matrix Reloaded",
      "release": 2003
    },
    "categories": ["Movie"],
    "statistics": {
      "digest": [
        {
          "nodeCategories": ["Person"],
          "edgeType": "ACTED_IN",
          "nodes": 2,
          "edges": 2
        }
      ]
    },
    "edges": [
      {
        "id": 101,
        "type": "ACTED_IN",
        "source": 1,
        "target": 3,
        "data": {
          "role": "Neo"
        }
      },
      {
        "id": 102
        "type": "SEQUEL_OF",
        "source": 3,
        "target": 2,
        "data": {}
      }
    ]
  }
]

Graph - Get all the shortest paths between two nodes

Get an array containing all the shortest paths between two given nodes. A path is not returned if the current user doesn't have read access to each element of the path.

/api/:dataSource/graph/shortestPaths

Permission: authenticated   , API right: graph.shortestPath

Parameter

Field Type Description
dataSource string

Key of the data-source

startNode id

ID of the starting node

endNode id

ID of the ending node

maxDepth optional number

Max depth of the shortest path

with_version optional boolean

Whether to include the node and edge versions

Default value: false

Success 200

Field Type Description
nodes object[][]

Paths

  id id

ID of the node

  data object

Properties of the node

  categories string[]

Categories of the node

  statistics object

Statistics of the node

    digest LkDigestItem[]

Statistics of the neighborhood of the node

  edges object[]

Subset of adjacent edges of this node (only the ones belonging to the path)

    id id

ID of the edge

    data object

Properties of the edge

    type string

Type of the edge

    source id

ID of the source node

    target id

ID of the target node

HTTP/1.1 200 OK
{
  "results": [
    [
      {
        "id": 1,
        "categories": ["COMPANY"],
        "data": {"name": "Linkurious", "created": 2013},
        "edges": [
          {"id": 6, "source": 1, "target": 2, "type": "HAS_CITY", "data": {"address": "75014"}}
        ]
      },
      {
        "id": 2,
        "categories": ["CITY"],
        "data": {"name": "Paris", "size": 7000000},
        "edges": [
          {"id": 6, "source": 1, "target": 2, "type": "HAS_CITY", "data": {"address": "75014"}},
          {"id": 7, "source": 3, "target": 2, "type": "HAS_CITY", "data": {"address": "75009"}}
        ]
      },
      {
        "id": 3,
        "categories": ["COMPANY"],
        "data": {"name": "Linkfluence", "created": 2006},
        "edges": [
          {"id": 7, "source": 3, "target": 2, "type": "HAS_CITY", "data": {"address": "75009"}}
        ]
      }
    ]
  ]
}

Nodes

Nodes - Get a node

Get a node of the graph.

/api/:dataSource/graph/nodes/:id

Permission: authenticated   , API right: graphItem.read

Parameter

Field Type Description
dataSource string

Key of the data-source

id id

ID of the node

with_edges optional boolean

Whether to include adjacent edges

Default value: false

with_digest optional boolean

Whether to include the adjacency digest

Default value: false

with_version optional boolean

Whether to include the node version

Default value: false

Success 200

Field Type Description
id id

ID of the node

data object

Properties of the node

statistics object

Statistics of the node

  digest LkDigestItem[]

Statistics of the neighborhood of the node

categories string[]

Categories of the node

HTTP/1.1 200 OK
{
  "id": 123,
  "data": {
    "name": "Keanu Reeves",
    "born": 1964
  },
  "categories": [
    "Person"
  ],
  "statistics": {
    "digest": [
      {
        "nodeCategories": ["Movie"],
        "edgeType": "ACTED_IN",
        "nodes": 1,
        "edges": 1
      }
    ]
  }
}

Nodes - Create a node

Add a node to the graph.

/api/:dataSource/graph/nodes

Permission: authenticated   , API right: graphItem.create

Parameter

Field Type Description
dataSource string

Key of the data-source

properties optional object

Properties of the node

categories optional string[]

Categories of the node

Success 201

Field Type Description
id id

ID of the node

data object

Properties of the node

statistics object

Statistics of the node

  digest LkDigestItem[]

Statistics of the neighborhood of the node

categories string[]

Categories of the node

HTTP/1.1 201 Created
{
  "id": 123,
  "data": {
    "name": "Keanu Reeves",
    "born": 1964
  },
  "categories": [
    "Person"
  ],
  "statistics": {
    "digest": [
      {
        "nodeCategories": ["Movie"],
        "edgeType": "ACTED_IN",
        "nodes": 1,
        "edges": 1
      }
    ]
  }
}

Nodes - Update a node

Update a subset of properties and categories of a node. Keep every other property and category of the node unchanged.

/api/:dataSource/graph/nodes/:id

Permission: authenticated   , API right: graphItem.edit

Parameter

Field Type Description
dataSource string

Key of the data-source

id id

ID of the node

properties optional object

Properties to update or create

deleted_properties optional string[]

Properties to delete

added_categories optional string[]

Categories of the node to add

deleted_categories optional string[]

Categories of the node to delete

version number

The current node version

Success 200

Field Type Description
id id

ID of the node

data object

Properties of the node

statistics object

Statistics of the node

  digest LkDigestItem[]

Statistics of the neighborhood of the node

categories string[]

Categories of the node

HTTP/1.1 200 OK
{
  "id": 123,
  "data": {
    "name": "Keanu Reeves",
    "born": 1964
  },
  "categories": [
    "Person"
  ],
  "statistics": {
    "digest": [
      {
        "nodeCategories": ["Movie"],
        "edgeType": "ACTED_IN",
        "nodes": 1,
        "edges": 1
      }
    ]
  }
}

Nodes - Delete a node

Delete a node and its adjacent edges from the graph.

/api/:dataSource/graph/nodes/:id

Permission: authenticated   , API right: graphItem.delete

Parameter

Field Type Description
dataSource string

Key of the data-source

id id

ID of the node

HTTP/1.1 204 No Content

Nodes - Get nodes count

Get the number of nodes in the graph.

/api/:dataSource/graph/nodes/count

Permission: authenticated  

Parameter

Field Type Description
dataSource string

Key of the data-source

Success 200

Field Type Description
count number

The number of nodes

HTTP/1.1 200 OK
{
    "count": 42
}

Nodes - Get categories/types of adjacent nodes/edges

Get the number of adjacent nodes and edges to a given subset of nodes (ids) grouped by node categories and edge types.

/api/:dataSource/graph/neighborhood/digest

Permission: authenticated   , API right: graphItem.read

Parameter

Field Type Description
dataSource string

Key of the data-source

ids id[]

List of node IDs

Success 200

Field Type Description
digest LkDigestItem[]

Statistics about the neighborhood of the nodes

HTTP/1.1 200 OK
[
  {
    "edgeType": "ACTED_IN",
    "nodeCategories": ["TheMatrix", "Movie"],
    "nodes": 1,
    "edges": 1
  }
]

Nodes - Get adjacent nodes and edges

Get all the adjacent nodes and edges to one or more source nodes (ids). The result is an array of nodes containing the sources nodes and their neighbors. Edges between sources nodes and their neighbors - as well as edges between the neighbors themselves - are returned in the edges field of each node.

If visible_nodes is specified, edges between source nodes, their neighbors and the visible nodes are also included.

/api/:dataSource/graph/nodes/expand

Permission: authenticated   , API right: graphItem.read

Parameter

Field Type Description
dataSource string

Key of the data-source

ids id[]

List of node IDs

ignored_nodes id[]

IDs of the nodes to ignore (they won't be included in the result)

visible_nodes id[]

IDs of nodes that are already visible (they won't be included in the result, but their adjacent edges will be included in the edges field of the adjacent nodes)

node_category string

Filter by node category (use LK_NO_CATEGORY to match nodes with no categories)

edge_type string

Filter by edge type

limit number

Maximum number of returned nodes (EXCLUDING source nodes)

limit_type optional string

Order direction used to limit the result

Default value: id

Allowed values: "id", "highestDegree", "lowestDegree"

{
    "ids": [
        1
    ],
    "node_category": "Movie",
    "limit": 2,
    "limit_type": "highestDegree"
}

Success 200

Field Type Description
nodes object[]

Nodes

  id id

ID of the node

  data object

Properties of the node

  categories string[]

Categories of the node

  statistics object

Statistics of the node

    digest LkDigestItem[]

Statistics of the neighborhood of the node

  edges object[]

Subset of adjacent edges of this node (only the ones matching the API description)

    id id

ID of the edge

    data object

Properties of the edge

    type string

Type of the edge

    source id

ID of the source node

    target id

ID of the target node

HTTP/1.1 200 OK
[
  {
    "id": 1,
    "data": {
      "name": "Keanu Reeves",
      "born": 1964
    },
    "categories": ["Person"],
    "statistics": {
      "digest": [
        {
          "nodeCategories": ["Movie", "TheMatrix", "TheMatrixReloaded"],
          "edgeType": "ACTED_IN",
          "nodes": 3,
          "edges": 3
        }
      ]
    },
    "edges": [
      {
        "id": 100,
        "type": "ACTED_IN",
        "source": 1,
        "target": 2,
        "data": {
          "role": "Neo"
        }
      },
      {
        "id": 101,
        "type": "ACTED_IN",
      "source": 1,
        "target": 3,
        "data": {
          "role": "Neo"
        }
      }
    ]
  },
  {
    "id": 2,
    "data": {
      "title": "The Matrix",
      "release": 1999
    },
    "categories": ["Movie"],
    "statistics": {
      "digest": [
        {
          "nodeCategories": ["Person"],
          "edgeType": "ACTED_IN",
          "nodes": 2,
          "edges": 2
        }
      ]
    },
    "edges": [
      {
        "id": 100,
        "type": "ACTED_IN",
        "source": 1,
        "target": 2,
        "data": {
          "role": "Neo"
        }
      },
      {
        "id": 102
        "type": "SEQUEL_OF",
        "source": 3,
        "target": 2,
        "data": {}
      }
    ]
  },
  {
    "id": 3,
    "data": {
      "title": "The Matrix Reloaded",
      "release": 2003
    },
    "categories": ["Movie"],
    "statistics": {
      "digest": [
        {
          "nodeCategories": ["Person"],
          "edgeType": "ACTED_IN",
          "nodes": 2,
          "edges": 2
        }
      ]
    },
    "edges": [
      {
        "id": 101,
        "type": "ACTED_IN",
        "source": 1,
        "target": 3,
        "data": {
          "role": "Neo"
        }
      },
      {
        "id": 102
        "type": "SEQUEL_OF",
        "source": 3,
        "target": 2,
        "data": {}
      }
    ]
  }
]

Edges

Edges - Get an edge

Get an edge of the graph.

/api/:dataSource/graph/edges/:id

Permission: authenticated   , API right: graphItem.read

Parameter

Field Type Description
dataSource string

Key of the data-source

id id

ID of the edge

with_version optional boolean

Whether to include the edge version

Default value: false

Success 200

Field Type Description
id id

ID of the edge

source id

ID of the source node

target id

ID of the target node

type string

Type of the edge

data object

Properties of the edge

HTTP/1.1 200 OK
{
  "id": 1,
  "source": 1,
  "target": 2,
  "type": "my_link",
  "data": {
    "direction": "north"
  }
}

Edges - Create an edge

Add an edge to the graph.

/api/:dataSource/graph/edges

Permission: authenticated   , API right: graphItem.create

Parameter

Field Type Description
dataSource string

Key of the data-source

source id

ID of the source node

target id

ID of the target node

type string

Type of the edge

properties object

Properties of the edge

Success 201

Field Type Description
id id

ID of the edge

source id

ID of the source node

target id

ID of the target node

type string

Type of the edge

data object

Properties of the edge

HTTP/1.1 201 Created
{
  "id": 1,
  "source": 1,
  "target": 2,
  "type": "my_link",
  "data": {
    "direction": "north"
  }
}

Edges - Update an edge

Update a subset of properties and the type of an edge. Keep every other property of the edge unchanged.

/api/:dataSource/graph/edges/:id

Permission: authenticated   , API right: graphItem.edit

Parameter

Field Type Description
dataSource string

Key of the data-source

id id

ID of the edge

properties optional object

Properties to update or create

deleted_properties optional string[]

Properties to delete

type optional string

Type of the edge to update

version number

The current edge version

Success 200

Field Type Description
id id

ID of the edge

source id

ID of the source node

target id

ID of the target node

type string

Type of the edge

data object

Properties of the edge

HTTP/1.1 200 OK
{
  "id": 1,
  "source": 1,
  "target": 2,
  "type": "my_link",
  "data": {
    "direction": "north"
  }
}

Edges - Delete an edge

Delete a edge from the graph.

/api/:dataSource/graph/edges/:id

Permission: authenticated   , API right: graphItem.delete

Parameter

Field Type Description
dataSource string

Key of the data-source

id id

ID of the edge

HTTP/1.1 204 No Content

Edges - Get edges count

Get the number of edges in the graph.

/api/:dataSource/graph/edges/count

Permission: authenticated  

Parameter

Field Type Description
dataSource string

Key of the data-source

Success 200

Field Type Description
count number

The number of edges

HTTP/1.1 200 OK
{
  "count": 42
}

Edges - Get adjacent edges of a node

Get the adjacent edges of a node from the graph.

The source, target and adjacent parameters are mutually exclusive:

  • if source is provided, return outgoing edges only.
  • otherwise, if target is provided, return incoming edges only.
  • otherwise, if adjacent is provided, return all the adjacent edges.

/api/:dataSource/graph/edges

Permission: authenticated   , API right: graphItem.read

Parameter

Field Type Description
dataSource string

Key of the data-source

source id

ID of the source node

target id

ID of the target node

adjacent id

ID of the node

type optional string

Filter by edge type

skip number

Offset from the first result

limit number

Page size (maximum number of returned edges)

with_version optional boolean

Whether to include the edge versions

Default value: false

Success 200

Field Type Description
edges object[]

Edges

  id id

ID of the edge

  source id

ID of the source node

  target id

ID of the target node

  type string

Type of the edge

  data object

Properties of the edge

HTTP/1.1 200 OK
[
  {
    "id": 1,
    "source": 1,
    "target": 2,
    "type": "my_link",
    "data": {
      "direction": "south"
    }
  },
  {
    "id": 15,
    "source": 22,
    "target": 2,
    "type": "my_other_link",
    "data": {
      "direction": "north"
    }
  }
]

Schema

Schema - Get node schema

List node-types indexed by Linkurious

/api/:dataSource/graph/schema/nodeTypes

Permission: authenticated   , API right: schema

Parameter

Field Type Description
dataSource string

Key of a data-source

omit_inferred optional boolean

Whether to omit inferred types (they have ugly names)

Default value: false

include_type optional boolean

Whether to include property type info (from index)

Default value: false

Success 200

Field Type Description
nodeTypes object[]

All known node types.

  name string

Name of the node type (node category)

  count string

Number of nodes with this type.

  properties object[]

Existing properties for the node type.

    key string

Key of the node-type property.

    count string

Number properties with this key for this node-type.

    type string

Type of the property (Only when "include_type" is true).

Allowed values: undefined, "string", "boolean", "long", "integer", "double", "float", "date"

 HTTP/1.1 200 OK
 {
   "nodeTypes": [
        {
             "name": "Movie",
             "count": 38,
             "properties": [
                 {"key": "released", "count": 38},
                 {"key": "tagline", "count": 37},
                 {"key": "title", "count": 38}
            ]
        }
    ]
}
 HTTP/1.1 200 OK
 {
   "nodeTypes": [
        {
             "name": "Movie",
             "count": 38,
             "properties": [
                 {"key": "released", "count": 38, "type": "date"},
                 {"key": "tagline", "count": 37, "type": "string"},
                 {"key": "title", "count": 38, "type": "string"}
            ]
        }
    ]
}

Schema - List node-type properties

List all node-type properties (aggregated from all nodeTypes)

/api/:dataSource/graph/schema/nodeTypes/properties

Permission: authenticated   , API right: schema

Parameter

Field Type Description
dataSource string

key of a data-source

include_type optional boolean

whether to include property type info (from index)

Default value: false

omit_noindex optional boolean

whether to omit no-index properties

Default value: false

Success 200

Field Type Description
properties object[]
  key string

Key of the property.

  count string

Number of properties with that key.

  type string

Type of the property (Only when "include_type" is true).

Allowed values: undefined, "string", "boolean", "long", "integer", "double", "float", "date"

HTTP/1.1 200 OK
{
  "properties": [
    {"key": "tagline", "count": 38},
    {"key": "released", "count": 39},
    {"key": "name", "count": 133}
  ]
}
HTTP/1.1 200 OK
{
  "properties": [
    {"key": "tagline", "count": 38, "type": "string"},
    {"key": "released", "count": 39, "type": "date"},
    {"key": "name", "count": 133, "type": "string"}
  ]
}

Schema - List edge-types

List edge-types indexed by linkurious

/api/:dataSource/graph/schema/edgeTypes

Permission: authenticated   , API right: schema

Parameter

Field Type Description
include_type optional boolean

Whether to include property type info (from index)

Default value: false

dataSource string

Key of a data-source

Success 200

Field Type Description
edgeTypes object[]

All known edge types.

  name string

Name of the node type

  count string

Number of edges with this type.

  properties object[]

Existing properties for the edge type.

    key string

Key of the edge-type property.

    count string

Number properties with this key for this edge-type.

    type string

Type of the property (Only when "include_type" is true).

Allowed values: undefined, "string", "boolean", "long", "integer", "double", "float", "date"

HTTP/1.1 200 OK
{
  "edgeTypes": [
    {
      "count": 38,
      "name": 'DIRECTED_BY'
      "properties": [
        {"key": "released", "count": 38},
        {"key": "tagline", "count": 37},
        {"key": "title", "count": 38}
      ]
    },
    {
      "count": 71,
      "name": 'ACTED_IN'
      "properties": [
        {"key": "role", "count": 4},
        {"key": "salary", "count": 12}
      ]
    }
  ]
}
HTTP/1.1 200 OK
{
  "edgeTypes": [
    {
      "count": 38,
      "name": 'DIRECTED_BY'
      "properties": [
        {"key": "released", "count": 38, "type": "date"},
        {"key": "tagline", "count": 37, "type": "string"},
        {"key": "title", "count": 38, "type": "string"}
      ]
    },
    {
      "count": 71,
      "name": 'ACTED_IN'
      "properties": [
        {"key": "role", "count": 4, "type": "string"},
        {"key": "salary", "count": 12, "type": "integer"}
      ]
    }
  ]
}

Schema - List edge-type properties

List all edgeType properties (aggregated from all edgeTypes)

/api/:dataSource/graph/schema/edgeTypes/properties

Permission: authenticated   , API right: schema

Parameter

Field Type Description
dataSource string

Key of a data-source

include_type optional string

Whether to include property type info (from index)

Default value: false

omit_noindex optional boolean

whether to omit no-index properties

Default value: false

Success 200

Field Type Description
properties object[]
  key string

Key of the property.

  count string

Number of properties with that key.

  type string

Type of the property (Only when "include_type" is true).

Allowed values: undefined, "string", "boolean", "long", "integer", "double", "float", "date"

HTTP/1.1 200 OK
{
  "properties": [
    {"key": "tagline", "count": 38},
    {"key": "born", "count": 128},
    {"key": "name", "count": 133}
  ]
}
HTTP/1.1 200 OK
{
  "properties": [
    {"key": "tagline", "count": 38, "type": "string"},
    {"key": "born", "count": 128, "type": "date"},
    {"key": "name", "count": 133, "type": "string"}
  ]
}

Schema - Get simple schema before first indexation

List nodeCategories, edgeTypes, nodeProperties and edgeProperties before the first indexation.

/api/:dataSource/graph/schema/simple

Permission: authenticated   , API right: schema

Parameter

Field Type Description
dataSource string

Key of a data-source

Success 200

Field Type Description
nodeCategories string[]

list of node categories defined in the graph DB

edgeTypes string[]

list of edge types defined in the graph DB

nodeProperties string[]

list of node properties defined in the graph DB

edgeProperties string[]

list of edge properties defined in the graph DB

 HTTP/1.1 200 OK
 {
   "nodeCategories": ["Movie", "Person"],
   "edgeTypes": ["ACTED_IN", "DIRECTED"],
   "nodeProperties": ["title", "name", "released"],
   "edgeProperties": ["role"]
}

Visualizations

Visualizations - Get a visualization

Return one visualizations selected by ID.

/api/:dataSource/visualizations/:id

Permission: authenticated   , API right: visualization.read

Parameter

Field Type Description
id number

Visualization ID.

populated optional boolean

Return populated nodes.

Default value: false

dataSource string

key of a data-source (for API homogeneity, not actually used)

HTTP/1.1 200 OK
{
    "visualization": {
        "nodes": [{
            "id": "3455",
            "label": "Laurence Fishburne",
            "x": 8.043813705444336,
            "y": -16.009628295898438
        }, {
            "id": "3452",
            "label": "Welcome to the Real World",
            "x": -8.286081314086914,
            "y": -13.440898895263672
        }],
        "edges": [{
            "id": "118",
            "source": "3455",
            "target": "3452"
        }],
        "nodeFields": [{
            "name": "name",
            "title": true,
            "active": true,
            "fieldType": "nodeCategory"
        }, {
            "name": "tagline",
            "title": true,
            "active": true,
            "fieldType": "nodeProperty"
        }],
        "edgeFields": [{
            "name": "released",
            "title": false,
            "active": true,
            "fieldType": "edgeType"
        }, {
            "name": "title",
            "title": true,
            "active": true,
            "fieldType": "edgeProperty"
        }],
        "id": 13,
        "title": "Untitled Visualization 2",
        "folder": null,
        "createdAt": "2014-08-06T08:31:48.000Z",
        "updatedAt": "2014-08-08T12:22:39.000Z"
    }
}
 HTTP/1.1 200 OK
 {
  "visualization":{
    "nodes":[{
      "id":3804,
      "x":0.08658577874302864,
      "y":0.1695734951645136,
      "data":{
        "data":{
          "born":1967,
          "name":"Carrie-Anne Moss"
        },
        "categories": ["Person"]
      }
    }, {
      "id":3802,
      "x":0.20951098296791315,
      "y":0.44125855900347233,
      "data":{
        "data":{
          "tagline":"Welcome to the Real World",
          "released":1999,
          "title":"The Matrix"
        },
        "categories": ["Movie"]
      }
    }],
    "edges":[{
      "id":637,
      "source":3804,
      "target":3802,
      "data":{
        "type":"ACTED_IN",
        "data":{
          "roles":["Trinity"]
        }
      }
    }],
    "nodeFields":[{
      "name":"tagline",
      "title":true,
      "active":true,
      "fieldType":"nodeProperty"
    }],
    "edgeFields":[{
      "name":"tagline",
      "title":true,
      "active":true,
      "fieldType":"edgeProperty"
    }],
    "id":15,
    "title":"Untitled Visualization",
    "folder":null,
    "createdAt":"2014-08-12T13:26:32.000Z",
    "updatedAt":"2014-08-12T13:26:45.000Z"
  }
}

Visualizations - Create a visualization

Create a new visualization.

/api/:dataSource/visualizations

Permission: authenticated   , API right: visualization.create

Parameter

Field Type Description
dataSource string

Key of the data-source containing the nodes and edges.

title string

Title of the new visualization.

folder optional number

ID of the folder to save the visualization in. (-1 for root)

Default value: -1

nodes object[]

Nodes in this visualization.

  id string

Identifier of the node (native ID or alternative ID, see alternativeIds).

  selected optional boolean

Whether the node is selected.

  nodelink object

The node position information (in "nodelink" mode).

    x number

X coordinate of the node.

    y number

Y coordinate of the node.

    fixed optional boolean

Whether the node position has been locked.

  geo optional object

The node position information (in "geo" mode).

    latitude optional number

Latitude of the node (decimal format).

    longitude optional number

Longitude of the node (decimal format).

    latitudeDiff optional number

Latitude diff (if the node has been dragged).

    longitudeDiff optional number

Longitude diff (if the node has been dragged).

edges object[]

Edges in this visualization.

  id string

Identifier of the edge (native ID or alternative ID, see alternativeIds).

  selected optional boolean

Whether the edge is selected

alternativeIds optional object

If nodes and/or edges should be referenced by a property instead of their database ID.

  node optional string

Node property to use as identifier instead of database ID.

  edge optional string

Edge property to use as identifier instead of database ID.

layout optional object

The last layout used.

  algorithm optional string

Layout algorithm.

Allowed values: "force", "hierarchical"

  mode optional string

Layout algorithm mode (depends on algorithm).

  incremental optional boolean

Whether the layout is incremental (only for "force" algorithm).

mode optional string

The current interaction mode.

Default value: nodelink

Allowed values: "nodelink", "geo"

geo optional object

Geographical info.

  latitudeProperty optional string

Node property containing the latitude info.

  longitudeProperty optional string

Node property containing the longitude info.

  layers optional string[]

Names of used leaflet tile layers.

design optional object

Design.

  styles object

Color, size and icon mapping.

  palette object

Color and icon palette.

filters optional object[]

Filters.

nodeFields object

Captions and fields options

  captions object

Caption descriptions indexed by node-category.

     boolean

*.active Whether to use this caption.

  fields object[]

Fields listed in context menu.

    name string

Name of the field.

    active boolean

Whether the field is visible in the context menu.

edgeFields object

Captions and fields options

  captions object

Caption descriptions indexed by edge-type.

     boolean

*.active Whether to use this caption.

  fields object[]

Fields listed in context menu.

    name string

Name of the field.

    active boolean

Whether the field is visible in the context menu.

Success 200

Field Type Description
visualization object

The visualization object.

  title string

Title of the visualization

  folder number

Parent visualizationFolder ID (null for root folder)

  nodes object[]

Nodes in this visualization.

    id string

Identifier of the node (native ID or alternative ID, see alternativeIds).

    selected boolean

Whether the node is selected.

    nodelink number

The node position information (in "nodelink" mode).

      x number

X coordinate of the node.

      y number

Y coordinate of the node.

      fixed boolean

Whether the node position has been locked.

    geo number

The node position information (in "geo" mode).

      latitude number

Latitude of the node (decimal format).

      longitude number

Longitude of the node (decimal format).

      latitudeDiff number

Latitude diff (if the node has been dragged).

      longitudeDiff number

Longitude diff (if the node has been dragged).

  edges object[]

Edges in this visualization.

    id string

Identifier of the edge (native ID or alternative ID, see alternativeIds).

    selected boolean

Whether the edge is selected

  alternativeIds object

Used to reference nodes or edges by a property instead of their database ID.

    node string

Node property to use as identifier instead of database ID.

    edge string

Edge property to use as identifier instead of database ID.

  layout object

The last used layout.

    algorithm string

Layout algorithm name ("force", "hierarchical").

    mode string

Layout algorithm mode (depends on algorithm).

    incremental string

Whether the layout is incremental (only for "force" algorithm).

  geo object

Geographical info.

    latitudeProperty string

Node property containing the latitude.

    layers string[]

Names of enabled leaflet tile layers.

  mode string

The current interaction mode.

Allowed values: "nodelink", "geo"

  design object

Design.

    styles object

Style mappings.

    palette object

Color and icon palette.

  filters object[]

Filters.

  nodeFields object

Captions and fields options

    captions object

Caption descriptions indexed by node-category.

       boolean

*.active Whether to use this caption.

    fields object[]

Fields listed in context menu.

      name string

Name of the field.

      active boolean

Whether the field is visible in the context menu.

  edgeFields object

Captions and fields options

    captions object

Caption descriptions indexed by edge-type.

       boolean

*.active Whether to use this caption.

    fields object[]

Fields listed in context menu.

      name string

Name of the field.

      active boolean

Whether the field is visible in the context menu.

Visualizations - Update a visualization

Update visualization selected by id.

/api/:dataSource/visualizations/:id

Permission: authenticated   , API right: visualization.edit

Parameter

Field Type Description
dataSource string

key of a data-source (ignored in this API)

id Number

Visualization ID.

visualization object

The visualization object. Only passed fields will be updated.

force_lock optional boolean

Take the edit-lock by force (in case the current user doesn't own it)

Default value: false

do_layout optional boolean

Do a server-side layout of the visualization graph.

Default value: false

Visualizations - Delete a visualization

Remove visualization selected by id.

/api/:dataSource/visualizations/:id

Permission: authenticated   , API right: visualization.delete

Parameter

Field Type Description
id Number

Visualization ID.

dataSource string

key of a data-source (Not actually used, for API homogeneity)

Visualizations - Get visualizations count

Get the number of visualizations for this data-source.

/api/:dataSource/visualizations/count

Permission: admin  

Parameter

Field Type Description
dataSource string

key of a data-source

Success 200

Field Type Description
count number

Visualizations - Duplicate a visualization

Duplicates a visualization.

/api/:dataSource/visualizations/:id/duplicate

Permission: authenticated   , API right: visualization.create

Parameter

Field Type Description
dataSource String

key of a data-source

id number

The id of the visualization to duplicate

title optional string

Name of the created visualization (defaults to "Copy of [source title]").

folder optional number

ID of the folder to duplicate the visualization to (defaults to the source visualization's folder).

Visualizations - Get the visualization tree

Return visualizations ordered with folders hierarchy.

/api/:dataSource/visualizations/tree

Permission: authenticated   , API right: visualization.list

Parameter

Field Type Description
dataSource string

key of a data-source

Success 200

Field Type Description
response Object
  tree Object[]
    type string

"visu" or "folder"

    id number

visualization or folder ID

    title string

visualization or folder title

    children optional object[]

children visualizations and folders (mandatory when type is "folder")

    shareCount optional number

number of users a visualization is shared with (mandatory type is "visu")

    widgetKey optional string

key of the widget created for this visualization (possible if type is "visu")

HTTP/1.1 200 OK
{
  "tree": [
   {
     "id": 1,
     "type": "folder",
     "title": "Toto",
     "children": [
       {
         "id": 2,
         "type": "folder",
         "title": "Titi",
         "children": [
           {
             "id": 3,
             "type": "visu",
             "title": "vis. three",
             "shareCount": 0,
             "widgetKey": "aef3ce"
           }
         ]
       },
       {
         "id": 1,
         "type": "vis. one",
         "title": "a",
         "shareCount": 0
       },
       {
         "id": 2,
         "type": "visu",
         "title": "vis. two",
         "shareCount": 0
       }
     ]
   },
   {
     "id": 4,
     "type": "visu",
     "title": "vis. four",
     "shareCount": 0
   }
 ]
}

Visualizations - Create a visualization folder

Create a folder for visualizations

/api/:dataSource/visualizations/folder

Permission: authenticated   , API right: visualizationFolder.create

Parameter

Field Type Description
title String

Folder title

parent Number

Parent folder id

dataSource string

key of a data-source

Visualizations - Update a visualization folder

Update a property of a folder

/api/:dataSource/visualizations/folder/:id

Permission: authenticated   , API right: visualizationFolder.edit

Parameter

Field Type Description
key string

Property key to edit

value string

Property new value of the edited property

dataSource string

key of a data-source (for API homogeneity, not actually used)

Visualizations - Delete a visualization folder

Remove the specified folder and its children (visualizations and sub-folders)

/api/:dataSource/visualizations/folder/:id

Permission: authenticated   , API right: visualizationFolder.delete

Parameter

Field Type Description
visualization number

ID

dataSource string

key of a data-source (for API homogeneity, not actually used)

Visualizations - Get visualization share rights

Get all share rights on a visualization

/api/:dataSource/visualizations/:id/shares

Permission: authenticated   , API right: visualizationShare.read

Parameter

Field Type Description
dataSource string

key of a data-source

id number

a visualization id

Success 200

Field Type Description
res Object

result object

  owner Object

Owner of the shares

    id number

Owner's user id

    source boolean

Owner's source ('local', 'ldap', 'azure', etc.)

    username string

Owner's username

    email string

Owner's email

  shares Object[]

Description of all shares defined by owner

    userId number

ID of the target user of this share

    username string

Username of the target user of this share

    email string

Email of the target user of this share

    visualizationId number

ID of the shared visualization

    right string

type of right granted to target user ("read", "write" or "owner")

Visualizations - Share a visualization

Set the share right of a user on a visualization

/api/:dataSource/visualizations/:id/share/:userId

Permission: authenticated   , API right: visualizationShare.create

Parameter

Field Type Description
dataSource string

key of a data-source

userId number

id of a user User to grant access to

right string

Granted access level

Allowed values: "read", "write"

id number

a visualization id Visualization to grant access to

Success 200

Field Type Description
visualizationId number

ID of the shared visualization.

userId number

ID of the user the visualization has been shared with.

right string

Name of the right ("none", "read", "write" or "owner")

createdAt string

Date the visualization has been shared.

updatedAt string

Date at which the share has been updated.

Visualizations - Un-share a visualization

Remove a share right of a user on a visualization

/api/:dataSource/visualizations/:id/share/:userId

Permission: authenticated   , API right: visualizationShare.delete

Parameter

Field Type Description
dataSource string

key of a data-source

userId number

id of a user

Visualizations - Get visualizations shared with current user

Get all visualizations shared with the current user

/api/:dataSource/visualizations/shared

Permission: authenticated   , API right: visualization.list

Parameter

Field Type Description
dataSource string

key of a data-source

Success 200

Field Type Description
title string

Title of the visualization

visualizationId number

ID of the visualization

ownerId number

ID of the user that owns the visualization

sourceKey string

Key of the dataSource the visualization is related to

Visualizations - Get the visualization sandbox

Return the visualization sandbox of the current user for a given data-source

/api/:dataSource/sandbox

Permission: authenticated   , API right: sandbox

# Node by ID
curl -i "http://localhost:3000/api/e4b5d8/sandbox?populate=nodeId&item_id=123"

# Edge by ID
curl -i "http://localhost:3000/api/e4b5d8/sandbox?populate=edgeId&item_id=456"

# Node by ID + neighbors
curl -i "http://localhost:3000/api/e4b5d8/sandbox?populate=expandNodeId&item_id=123"

# Nodes by search query
curl -i "http://localhost:3000/api/e4b5d8/sandbox?populate=searchNodes&search_query=paris&search_fuzziness=0.8"

# Edges by search query
curl -i "http://localhost:3000/api/e4b5d8/sandbox?populate=searchEdges&search_query=has_city"

# Nodes and/or edges by pattern query
curl -i "http://localhost:3000/api/e4b5d8/sandbox?populate=pattern&pattern_dialect=cypher&pattern_query=MATCH+(n1)-%5Be%5D-(n2)+WHERE+ID(n1)%3D10+RETURN+e"

Parameter

Field Type Description
dataSource string

key of a data-source

populate optional string

Describes how the sandbox should be populated.

Allowed values: "expandNodeId", "nodeId", "edgeId", "searchNodes", "searchEdges", "pattern", "matchId"

item_id optional string

ID of the node or edge to load (when populate is one of ["nodeId", "edgeId", "expandNodeId"]).

match_id optional number

ID of alert match to load (when populate is "matchId").

search_query optional string

Search query to search for nodes or edges (when populate is one of ["searchNodes", "searchEdges"]).

search_fuzziness optional number

Search query fuzziness (when populate is one of ["searchNodes", "searchEdges"]).

Default value: 0.9

Size range: 0-1

pattern_query optional string

Pattern query to match nodes and/or edges (when populate is "pattern").

do_layout optional boolean

Whether to do a server-side layout of the graph.

pattern_dialect optional string

Pattern dialect (when populate is "pattern").

Allowed values: "cypher", "gremlin"

Visualizations - Update the visualization sandbox

Update the sandbox of the current user for a given data-source.

/api/:dataSource/sandbox

Permission: authenticated   , API right: sandbox

Parameter

Field Type Description
dataSource string

key of a data-source (ignored in this API)

visualization object

The sandbox visualization object.

  design optional object
  nodeFields optional object
  edgeFields optional object

Visualizations - Get a widget

Get a visualization widget's data by key

/api/widget/:key

Permission: authenticated   , API right: widget.read

Parameter

Field Type Description
key string

the key of a widget

Success 200

Field Type Description
title string

the title of the visualization used to generate this widget

key string

the key of this widget

userId number

the owner ID of the visualization used to generate this widget

visualizationId number

the ID of the visualization used to generate this widget

password boolean

Whether password protection is enabled

content Object

the content of the widget, as sent while generating this widget

HTTP/1.1 200 OK

{
  "title": "Foo Bar",
  "key": "key",
  "userId": 12,
  "password": false,
  "visualizationId": 3,
  "content": {
     "key": "value"
  }
}

Visualizations - Create a widget

Create a widget for a visualization.

/api/widget

Permission: authenticated   , API right: widget.create

Parameter

Field Type Description
visualization_id number

The visualization id

options optional object

The configuration of the user interface elements.

  search optional boolean

Whether the search bar is shown.

Default value: false

  share optional boolean

The the share button is shown.

Default value: false

  layout optional boolean

Whether the layout button is shown.

Default value: false

  fullscreen optional boolean

Whether the full-screen button is shown.

Default value: false

  zoom optional boolean

Whether to zoom-in and zoom-out controllers are shown.

Default value: false

  legend optional boolean

Whether the graph legend is shown.

Default value: false

  geo optional boolean

Whether the geo-mode toggle button is visible. Ignored if the nodes don't have geo coordinates.

Default value: false

  password optional string

Optional password to protect the widget

Success 200

Field Type Description
key string

The key of the created widget

Visualizations - Update a widget

Update a widget for a visualization.

/api/widget

Permission: authenticated   , API right: widget.edit

Parameter

Field Type Description
visualization_id number

The visualization id

options optional object

The configuration of the user interface elements.

  search optional boolean

Whether the search bar is shown.

Default value: false

  share optional boolean

The the share button is shown.

Default value: false

  layout optional boolean

Whether the layout button is shown.

Default value: false

  fullscreen optional boolean

Whether the full-screen button is shown.

Default value: false

  zoom optional boolean

Whether to zoom-in and zoom-out controllers are shown.

Default value: false

  legend optional boolean

Whether the graph legend is shown.

Default value: false

  geo optional boolean

Whether the geo-mode toggle button is visible. Ignored if the nodes don't have geo coordinates.

Default value: false

  password optional string

Optional password to protect the widget

Success 200

Field Type Description
key string

The key of the updated widget

Visualizations - Delete a widget

Delete a widget for a visualization.

/api/widget/:key

Permission: authenticated   , API right: widget.delete

Parameter

Field Type Description
key string

the key of the widget to delete

Alerts

Alerts - Get an alert

Get the alert selected by id.

/api/admin/:dataSource/alert/:alertId

Permission: admin  

Parameter

Field Type Description
dataSource string

Key of the data-source

alertId number

ID of the alert

Success 200

Field Type Description
id number

ID of the alert

title string

Title of the alert

sourceKey string

Key of the data-source

query string

Graph query that will run periodically

dialect string

Dialect of the graph query

enabled boolean

Whether the query will run periodically or not

cron string

CRON expression representing the frequency with which the query runs

matchTTL number

Number of days after which the matches of this alert are going to be deleted

scoreColumn string

The column returned by the query that will be used to sort the matches by importance (If not defined, matches will be sorted by creation date)

sortDirection string

How to sort the score

maxMatches number

Maximum number of matches after which matches with lower scores are discarded

maxRuntime number

Number of seconds available to compute the query after which the connection toward the graph DB is closed

userId number

ID of the admin user that created the alert

lastRun string

Last time the query was executed in ISO-8601 format (null it was never executed)

lastRunProblem object

Object representing the problem in the last run (null if there wasn't a problem in the last run)

  error object

Error that identifies the last run problem

  partial boolean

Whether the last run was at least partially executed

createdAt string

Creation date in ISO-8601 format

updatedAt string

Last update date in ISO-8601 format

nextRun string

Date when the alert will be executed next in ISO-8601 format (null if it isn't scheduled)

HTTP/1.1 200 OK
{
  "id": 8,
  "title": "alert_title",
  "sourceKey": "584f2569",
  "query": "MATCH (n1)-[r:DIRECTED]-(n2) RETURN n1, n1.score",
  "dialect": "cypher",
  "enabled": true,
  "cron": "0 0 * * *",
  "matchTTL": 30,
  "scoreColumn": "n1.score",
  "sortDirection": "asc",
  "maxMatches": 20,
  "maxRuntime": 300,
  "userId": 1,
  "lastRun": null,
  "lastRunProblem": null,
  "updatedAt": "2016-05-16T08:23:35.730Z",
  "createdAt": "2016-05-16T08:23:35.730Z",
  "nextRun": "2016-08-15T00:00:00.000Z"
}

Alerts - Get all the alerts

Get all the alerts of a given data-source ordered by creation date.

/api/admin/:dataSource/alerts

Permission: admin  

Parameter

Field Type Description
dataSource string

Key of the data-source

Success 200

Field Type Description
alerts object[]

Alerts

  id number

ID of the alert

  title string

Title of the alert

  sourceKey string

Key of the data-source

  query string

Graph query that will run periodically

  dialect string

Dialect of the graph query

  enabled boolean

Whether the query will run periodically or not

  cron string

CRON expression representing the frequency with which the query runs

  matchTTL number

Number of days after which the matches of this alert are going to be deleted

  scoreColumn string

The column returned by the query that will be used to sort the matches by importance (If not defined, matches will be sorted by creation date)

  sortDirection string

How to sort the score

  maxMatches number

Maximum number of matches after which matches with lower scores are discarded

  maxRuntime number

Number of seconds available to compute the query after which the connection toward the graph DB is closed

  userId number

ID of the admin user that created the alert

  lastRun string

Last time the query was executed in ISO-8601 format (null it was never executed)

  lastRunProblem object

Object representing the problem in the last run (null if there wasn't a problem in the last run)

    error object

Error that identifies the last run problem

    partial boolean

Whether the last run was at least partially executed

  createdAt string

Creation date in ISO-8601 format

  updatedAt string

Last update date in ISO-8601 format

  nextRun string

Date when the alert will be executed next in ISO-8601 format (null if it isn't scheduled)

HTTP/1.1 200 OK
[
  {
    "id": 9,
    "title": "alert title 2",
    "sourceKey": "584f2569",
    "query": "MATCH (n1)-[r:DIRECTED]-(n2) RETURN n2, n2.score",
    "dialect": "cypher",
    "enabled": true,
    "cron": "0 * * * *",
    "matchTTL": 30,
    "scoreColumn": "n1.score",
    "sortDirection": "asc",
    "maxMatches": 20,
    "maxRuntime": 300,
    "userId": 1,
    "lastRun": null,
    "lastRunProblem": null,
    "updatedAt": "2016-05-16T08:23:35.730Z",
    "createdAt": "2016-05-16T08:23:35.730Z",
    "nextRun": "2016-08-15T00:00:00.000Z"
  },
  {
    "id": 8,
    "title": "alert title",
    "sourceKey": "584f2569",
    "query": "MATCH (n1)-[r:DIRECTED]-(n2) RETURN n1, n1.score",
    "dialect": "cypher",
    "enabled": true,
    "cron": "0 0 * * *",
    "matchTTL": 30,
    "scoreColumn": "n1.score",
    "sortDirection": "asc",
    "maxMatches": 20,
    "maxRuntime": 300,
    "userId": 1,
    "lastRun": null,
    "lastRunProblem": null,
    "updatedAt": "2016-05-16T08:23:35.730Z",
    "createdAt": "2016-05-16T08:23:35.730Z",
    "nextRun": "2016-08-15T00:00:00.000Z"
  }
]

Alerts - Create an alert

Create a new alert.

/api/admin/:dataSource/alerts

Permission: admin  

Parameter

Field Type Description
dataSource string

Key of the data-source

title string

Title of the alert

query string

Graph query that will run periodically

dialect string

Dialect of the graph query

enabled boolean

Whether the query will run periodically or not

cron string

CRON expression representing the frequency with which the query runs

matchTTL optional number

Number of days after which the matches of this alert are going to be deleted

scoreColumn optional string

The column returned by the query that will be used to sort the matches by importance (If not defined, matches will be sorted by creation date)

sortDirection optional string

How to sort the score

Default value: desc

Allowed values: "asc", "desc"

maxMatches optional number

Maximum number of matches after which matches with lower scores are discarded

maxRuntime optional number

Number of seconds available to compute the query after which the connection toward the graph DB is closed

Success 201

Field Type Description
id number

ID of the alert

title string

Title of the alert

sourceKey string

Key of the data-source

query string

Graph query that will run periodically

dialect string

Dialect of the graph query

enabled boolean

Whether the query will run periodically or not

cron string

CRON expression representing the frequency with which the query runs

matchTTL number

Number of days after which the matches of this alert are going to be deleted

scoreColumn string

The column returned by the query that will be used to sort the matches by importance (If not defined, matches will be sorted by creation date)

sortDirection string

How to sort the score

maxMatches number

Maximum number of matches after which matches with lower scores are discarded

maxRuntime number

Number of seconds available to compute the query after which the connection toward the graph DB is closed

userId number

ID of the admin user that created the alert

lastRun string

Last time the query was executed in ISO-8601 format (null it was never executed)

lastRunProblem object

Object representing the problem in the last run (null if there wasn't a problem in the last run)

  error object

Error that identifies the last run problem

  partial boolean

Whether the last run was at least partially executed

createdAt string

Creation date in ISO-8601 format

updatedAt string

Last update date in ISO-8601 format

nextRun string

Date when the alert will be executed next in ISO-8601 format (null if it isn't scheduled)

HTTP/1.1 201 OK
{
  "id": 8,
  "title": "alert_title",
  "sourceKey": "584f2569",
  "query": "MATCH (n1)-[r:DIRECTED]-(n2) RETURN n1, n1.score",
  "dialect": "cypher",
  "enabled": true,
  "cron": "0 0 * * *",
  "matchTTL": 30,
  "scoreColumn": "n1.score",
  "sortDirection": "asc",
  "maxMatches": 20,
  "maxRuntime": 300,
  "userId": 1,
  "lastRun": null,
  "lastRunProblem": null,
  "updatedAt": "2016-05-16T08:23:35.730Z",
  "createdAt": "2016-05-16T08:23:35.730Z",
  "nextRun": "2016-08-15T00:00:00.000Z"
}

Alerts - Update an alert

Update the alert selected by id.

/api/admin/:dataSource/alerts/:alertId

Permission: admin  

Parameter

Field Type Description
dataSource string

Key of the data-source

alertId number

ID of the alert

title optional string

New title of the alert

query optional string

New graph query that will run periodically

dialect optional string

Dialect of the graph query

enabled optional boolean

Whether the query will run periodically or not

cron optional string

CRON expression representing the frequency with which the query runs

matchTTL optional number

Number of days after which the matches of this alert are going to be deleted

scoreColumn optional string

The column returned by the query that will be used to sort the matches by importance (If not defined, matches will be sorted by creation date)

sortDirection optional string

How to sort the score

Default value: desc

Allowed values: "asc", "desc"

maxMatches optional number

Maximum number of matches after which matches with lower scores are discarded

maxRuntime optional number

Number of seconds available to compute the query after which the connection toward the graph DB is closed

Success 200

Field Type Description
id number

ID of the alert

title string

Title of the alert

sourceKey string

Key of the data-source

query string

Graph query that will run periodically

dialect string

Dialect of the graph query

enabled boolean

Whether the query will run periodically or not

cron string

CRON expression representing the frequency with which the query runs

matchTTL number

Number of days after which the matches of this alert are going to be deleted

scoreColumn string

The column returned by the query that will be used to sort the matches by importance (If not defined, matches will be sorted by creation date)

sortDirection string

How to sort the score

maxMatches number

Maximum number of matches after which matches with lower scores are discarded

maxRuntime number

Number of seconds available to compute the query after which the connection toward the graph DB is closed

userId number

ID of the admin user that created the alert

lastRun string

Last time the query was executed in ISO-8601 format (null it was never executed)

lastRunProblem object

Object representing the problem in the last run (null if there wasn't a problem in the last run)

  error object

Error that identifies the last run problem

  partial boolean

Whether the last run was at least partially executed

createdAt string

Creation date in ISO-8601 format

updatedAt string

Last update date in ISO-8601 format

nextRun string

Date when the alert will be executed next in ISO-8601 format (null if it isn't scheduled)

HTTP/1.1 200 OK
{
  "id": 8,
  "title": "alert_title",
  "sourceKey": "584f2569",
  "query": "MATCH (n1)-[r:DIRECTED]-(n2) RETURN n1, n1.score",
  "dialect": "cypher",
  "enabled": true,
  "cron": "0 0 * * *",
  "matchTTL": 30,
  "scoreColumn": "n1.score",
  "sortDirection": "asc",
  "maxMatches": 20,
  "maxRuntime": 300,
  "userId": 1,
  "lastRun": null,
  "lastRunProblem": null,
  "updatedAt": "2016-05-16T08:23:35.730Z",
  "createdAt": "2016-05-16T08:23:35.730Z",
  "nextRun": "2016-08-15T00:00:00.000Z"
}

Alerts - Delete an alert

Delete the alert selected by id and all its matches.

/api/admin/:dataSource/alerts/:alertId

Permission: admin  

Parameter

Field Type Description
dataSource string

Key of the data-source

alertId number

ID of the alert

HTTP/1.1 204 No Content

Alerts - Get an alert (User)

Get the alert selected by id. The fields are filtered to be viewed by a simple user.

/api/:dataSource/alerts/:alertId

Permission: authenticated   , API right: alert.read

Parameter

Field Type Description
dataSource string

Key of the data-source

alertId number

ID of the alert

Success 200

Field Type Description
id number

ID of the alert

title string

Title of the alert

sourceKey string

Key of the data-source

createdAt string

Creation date in ISO-8601 format

updatedAt string

Last update date in ISO-8601 format

lastRun string

Last time the query was executed in ISO-8601 format (null it was never executed)

sortDirection string

How to sort the score

HTTP/1.1 200 OK
{
  "id": 7,
  "title": "alert title",
  "sourceKey": "584f2569",
  "sortDirection": "asc",
  "createdAt": "2016-05-16T08:23:35.730Z",
  "updatedAt": "2016-05-16T08:23:35.730Z",
  "lastRun": "2016-05-16T08:23:35.730Z"
}

Alerts - Get all the alerts (User)

Get all the alerts of a given data-source ordered by creation date. The fields are filtered to be viewed by a simple user.

/api/:dataSource/alerts

Permission: authenticated   , API right: alert.read

Parameter

Field Type Description
dataSource string

Key of the data-source

Success 200

Field Type Description
alerts object[]

Alerts

  id number

ID of the alert

  title string

Title of the alert

  sourceKey string

Key of the data-source

  createdAt string

Creation date in ISO-8601 format

  updatedAt string

Last update date in ISO-8601 format

  lastRun string

Last time the query was executed in ISO-8601 format (null it was never executed)

  sortDirection string

How to sort the score

HTTP/1.1 200 OK
[
  {
    "id": 9,
    "title": "alert title 2",
    "sourceKey": "584f2569",
    "sortDirection": "asc",
    "createdAt": "2016-05-16T08:23:35.730Z",
    "updatedAt": "2016-05-16T08:23:35.730Z",
    "lastRun": "2016-05-16T08:23:35.730Z"
  },
  {
    "id": 8,
    "title": "alert title 1",
    "sourceKey": "584f2569",
    "sortDirection": "asc",
    "createdAt": "2016-04-16T08:23:35.730Z",
    "updatedAt": "2016-04-16T08:23:35.730Z",
    "lastRun": "2016-05-16T08:23:35.730Z"
  }
]

Alerts - Get a match

Get the match selected by id.

/api/:dataSource/alerts/:alertId/matches/:matchId

Permission: authenticated   , API right: alert.read

Parameter

Field Type Description
dataSource string

Key of the data-source

alertId number

ID of the alert

matchId number

ID of the match

Success 200

Field Type Description
id number

ID of the match

sourceKey string

Key of the data-source

alertId number

ID of the alert

score number

Score of the match

hash string

Hash of the match

status string

Status of the match

Allowed values: "unconfirmed", "confirmed", "dismissed"

user object

Last user that changed the status (null if it was never changed)

  id number

ID of the user

  username string

Username of the user

  email string

E-mail of the user

nodes id[]

IDs of the nodes of the match

edges id[]

IDs of the edges of the match

expirationDate string

Date in ISO-8601 format after which the match is deleted

createdAt string

Creation date in ISO-8601 format

updatedAt string

Last update date in ISO-8601 format

HTTP/1.1 200 OK
{
  "id": 1,
  "sourceKey": "584f2569",
  "alertId": 2,
  "score": 1999,
  "hash": "897f54ff366922a4077c78955c77bcdd",
  "status": "unconfirmed",
  "user": null,
  "nodes": [5971, 5974],
  "edges": [523],
  "expirationDate": "2016-05-26T08:23:35.730Z",
  "createdAt": "2016-05-16T08:23:35.730Z",
  "updatedAt": "2016-05-16T08:23:35.730Z"
}

Alerts - Get all the matches of an alert

Get all the matches of an alert ordered by score.

/api/:dataSource/alerts/:alertId/matches

Permission: authenticated   , API right: alert.read

Parameter

Field Type Description
dataSource string

Key of the data-source

alertId number

ID the alert

offset optional string

Offset from the first result

Default value: 0

limit optional string

Page size (maximum number of returned matches)

Default value: 20

sort_direction optional string

Direction used to sort the score

Default value: desc

Allowed values: "asc", "desc"

sort_by optional string

Sort by score or creation date (If alert.scoreColumn is null, always sort by creation date)

Default value: score

Allowed values: "score", "date"

status optional string

Filter on match status

Allowed values: "unconfirmed", "confirmed", "dismissed"

Success 200

Field Type Description
counts object

Match counts

  unconfirmed number

Count of unconfirmed matches

  confirmed number

Count of confirmed matches

  dismissed number

Count of dismissed matches

matches object[]

Matches

  id number

ID of the match

  sourceKey string

Key of the data-source

  alertId number

ID of the alert

  score number

Score of the match

  hash string

Hash of the match

  status string

Status of the match

Allowed values: "unconfirmed", "confirmed"

  user object

Last user that changed the status (null if it was never changed)

    id number

ID of the user

    username string

Username of the user

    email string

E-mail of the user

  viewers object[]

Users that viewed the match (ordered by date in decreasing order)

  nodes id[]

IDs of the nodes of the match

  edges id[]

IDs of the edges of the match

  expirationDate string

Date in ISO-8601 format after which the match is deleted

  createdAt string

Creation date in ISO-8601 format

  updatedAt string

Last update date in ISO-8601 format

    id number

ID of the user

    username string

Username of the user

    email string

E-mail of the user

    date string

Date of the view in ISO-8601 format

HTTP/1.1 200 OK
{
  "counts": {
    "unconfirmed": 1,
    "confirmed": 1,
    "dismissed": 0
  },
  "matches": [
    {
      "id": 1,
      "sourceKey": "584f2569",
      "alertId": 2,
      "score": 242,
      "hash": "897f54ff366922a4077c78955c77bcdd",
      "status": "confirmed",
      "user": {
        "id": 1,
        "username": "alice",
        "email": "alice@example.com"
      },
      "viewers": [
        {
          "id": 1,
          "username": "alice",
          "email": "alice@example.com",
          "date": "2016-05-16T08:13:35.030Z"
        }
      ],
      "nodes": [5971],
      "edges": [],
      "expirationDate": "2016-05-26T08:23:35.730Z",
      "createdAt": "2016-05-16T08:23:35.730Z",
      "updatedAt": "2016-05-16T08:23:35.730Z"
    },
    {
      "id": 2,
      "sourceKey": "584f2569",
      "alertId": 2,
      "score": 132,
      "hash": "5f221db1e438f2d9b7cdd284364e379b",
      "status": "unconfirmed",
      "user": null,
      "viewers": [],
      "nodes": [5976],
      "edges": [],
      "expirationDate": "2016-05-26T08:23:35.730Z",
      "createdAt": "2016-05-16T08:23:35.730Z",
      "updatedAt": "2016-05-16T08:23:35.730Z"
    }
  ]
}

Alerts - Get all the actions of a match

Get all the actions of a match ordered by creation date.

/api/:dataSource/alerts/:alertId/matches/:matchId/actions

Permission: authenticated   , API right: alert.read

Parameter

Field Type Description
dataSource string

Key of the data-source

alertId number

ID of the alert

matchId number

ID of the match

Success 200

Field Type Description
matchActions object[]

Actions

  id number

ID of the action

  matchId number

ID of the match

  user object

User that did the action

    id number

ID of the user

    username string

Username of the user

    email string

E-mail of the user

  action string

The action performed

Allowed values: "open", "confirm", "dismiss", "unconfirm"

  createdAt string

Creation date in ISO-8601 format

  updatedAt string

Last update date in ISO-8601 format

HTTP/1.1 200 OK
[
  {
    "id": 9,
    "matchId": 3,
    "user": {
      "id": 1,
      "username": "alice",
      "email": "alice@example.com"
    },
    "action": "dismiss",
    "createdAt": "2016-06-16T08:22:35.730Z",
    "updatedAt": "2016-06-16T08:22:35.730Z"
  },
  {
    "id": 8,
    "matchId": 4,
    "user": {
      "id": 2,
      "username": "bob",
      "email": "bob@example.com"
    },
    "action": "open",
    "createdAt": "2016-05-16T08:23:35.730Z",
    "updatedAt": "2016-05-16T08:23:35.730Z"
  }
]

Alerts - Do an action on a match

Do an action (open, dismiss, confirm, unconfirm) on a match.

/api/:dataSource/alerts/:alertId/matches/:matchId/action

Permission: authenticated   , API right: alert.doAction

Parameter

Field Type Description
dataSource string

Key of the data-source

alertId number

ID of the alert

matchId number

ID of the match

body

Field Type Description
action string

The action to perform

Allowed values: "confirm", "dismiss", "unconfirm", "open"

HTTP/1.1 204 No Content

DataSources

DataSources - Connect a disconnected data-source

Connect a disconnected data-source

/api/admin/source/:dataSourceIndex/connect

Permission: admin  

Parameter

Field Type Description
dataSourceIndex string

config-index of a data-source

DataSources - Reset settings for new visualizations

Reset design and/or captions of all sandboxes of the given data-source to configuration-file values. If design is true, set the design.palette and design.styles to current palette and defaultStyles configuration values. If captions is true, set nodeFields.captions and edgeFields.captions to current defaultCaptions.nodes and defaultCaptions.edges configuration values.

/api/admin/source/:dataSource/resetDefaults

Permission: admin  

Parameter

Field Type Description
dataSource string

Key of a data-source

design boolean

Whether to reset default design to configuration-file values.

captions boolean

Whether to reset default captions to configuration-file values.

DataSources - Get hidden node-properties

Get the list of node-properties hidden for the given data-source.

/api/admin/source/:dataSource/hidden/nodeProperties

Permission: admin  

Parameter

Field Type Description
dataSource string

Key of a dataSource

DataSources - Get hidden edge-properties

Get the list of edge-properties hidden for the given data-source.

/api/admin/source/:dataSource/hidden/edgeProperties

Permission: admin  

Parameter

Field Type Description
dataSource string

Key of a dataSource

DataSources - Get non-indexed node-properties

Get the list of node-properties that are not indexed for the given data-source.

/api/admin/source/:dataSource/noIndex/nodeProperties

Permission: admin  

Parameter

Field Type Description
dataSource string

Key of a dataSource

DataSources - Get non-indexed edge-properties

Get the list of edge-properties that re not indexed for the given data-source.

/api/admin/source/:dataSource/noIndex/edgeProperties

Permission: admin  

Parameter

Field Type Description
dataSource string

Key of a dataSource

DataSources - Set hidden node-properties

Set the list of node-properties that are hidden for the given data-source.

/api/admin/source/:dataSource/hidden/nodeProperties

Permission: admin  

Parameter

Field Type Description
dataSource string

Key of a dataSource

properties string[]

List of property names

DataSources - Set hidden edge-properties

Set the list of edge-properties that are hidden for the given data-source.

/api/admin/source/:dataSource/hidden/edgeProperties

Permission: admin  

Parameter

Field Type Description
dataSource string

Key of a dataSource

properties string[]

List of property names

DataSources - Set non-indexed node-properties

Set the list of node-properties that are not indexed for the given data-source.

/api/admin/source/:dataSource/noIndex/nodeProperties

Permission: admin  

Parameter

Field Type Description
dataSource string

Key of a dataSource

properties string[]

List of property names

DataSources - Set non-indexed edge-properties

Set the list of edge-properties that are not indexed for the given data-source.

/api/admin/source/:dataSource/noIndex/edgeProperties

Permission: admin  

Parameter

Field Type Description
dataSource string

Key of a dataSource

properties string[]

List of property names

DataSources - Get all data-sources information

Get information for all data-source, including data-sources that do not exist online.

/api/admin/sources

Permission: admin  

Success 200

Field Type Description
sources object[]

Data-source information.

  lastSeen string

Last time this data-source was seen online (ISO-8601 date)

  indexedDate string

Last time this data-source was indexed (ISO-8601 date)

  key string

Key of the data-source (when is has been connected before, null otherwise)

  host string

Host of the data-source

  port string

Port of the data-source

  storeId string

Unique store identifier of the graph database (when it has been connected before, null otherwise)

  state string

State code if the data-source ("ready" , "offline" ...).

  visualizationCount number

Number of visualizations that exist for this data-source

  configIndex number

The index of the data-source's config (if the config still exists, null otherwise)

DataSources - Create a new data-source configuration

Create a new data-source configuration (contains a graph database configuration and an index configuration).

/api/admin/sources/config

Permission: admin  

Parameter

Field Type Description
name string

Name of the data-source.

graphDb object

The configuration options of the graph database.

  vendor string

The vendor of the graph database ("neo4j", "titan"...).

index object

The configuration options of the full-text index.

  vendor object

The vendor of the full-text index ("elasticSearch").

  host string

Host of the full-text index server.

  port number

Port of the full-text index server.

  forceReindex boolean

Whether to re-index this graph database at each start of Linkurious.

  dynamicMapping boolean

Whether to enable automatic property-types detection for enhanced search.

DataSources - Delete a data-source configuration

Delete a data-source configuration that has currently no connected data-source.

/api/admin/sources/config/:configIndex

Permission: admin  

Parameter

Field Type Description
configIndex number

Index of a data-source configuration

DataSources - Delete all data-source data

Delete all data of data-source (visualizations, access-rights, widgets, full-text indexes). Optionally merge visualizations and widgets into another data-source instead of deleting them. Warning: when merging into another data-source, visualizations may break if node and edge IDs are not the same in to target data-source.

/api/admin/sources/data/:sourceKey

Permission: admin  

Parameter

Field Type Description
sourceKey string

Key of a disconnected data-source which data must be deleted.

merge_into string

Key of a data-source to merge visualizations and widgets into.

Success 200

Field Type Description
migrated boolean

True if the affected items have been migrated to another data-source, false if they have been deleted.

affected object

Affected object counts.

  visualizations number

Number of migrated/deleted visualizations (with their widgets).

  folders number

Number of migrated/deleted visualization folders.

  alerts number

Number of migrated/deleted alerts.

  matches number

Number of migrated/deleted matches.

Users

Users - Create a user

Add a new user to the application.

/api/admin/users

Permission: admin  

Parameter

Field Type Description
username string

Username of the user

email string

E-mail of the user

password string

Password of the user

groups optional number[]

IDs of the groups the user belong to

Success 200

Field Type Description
id number

ID of the user

username string

Name of the user

email string

E-mail of the user

source string

Source of the user ("local", "ldap", "oauth2", etc.)

groups group[]

Groups the user belongs to

admin boolean

Whether the user is an administrator

preferences preferences

Preferences of the user

actions object

Arrays of authorized actions indexed by data-source key. The special key all lists actions authorized on all the data-sources

HTTP/1.1 200 OK
{
  "id": 3,
  "username": "john",
  "email": "john@linkurio.us",
  "groups": [
    {
      "id": 1,
      "name": "default",
      "builtin": true
    }
  ],
  "source": "local",
  "admin": false,
  "preferences": {
    "pinOnDrag": true
  },
  "actions": {
    "all": [],
    "a0df89fb": ["rawReadQuery"]
  }
}

Users - Delete a user

Delete a user in the application

/api/admin/users/:id

Permission: admin  

Parameter

Field Type Description
id number

ID of the user

HTTP/1.1 204 OK

Users - Update a user

Patches a user in the application

/api/admin/users/:id

Permission: admin  

Parameter

Field Type Description
id number

ID of the user

username optional string

New username of the user

email optional string

New e-mail of the user

password optional string

New password of the user

groups optional number[]

New list of IDs of the groups the user belong to

Success 200

Field Type Description
id number

ID of the user

username string

Name of the user

email string

E-mail of the user

source string

Source of the user ("local", "ldap", "oauth2", etc.)

groups group[]

Groups the user belongs to

admin boolean

Whether the user is an administrator

preferences preferences

Preferences of the user

actions object

Arrays of authorized actions indexed by data-source key. The special key all lists actions authorized on all the data-sources

HTTP/1.1 200 OK
{
  "id": 3,
  "username": "john",
  "email": "john@linkurio.us",
  "groups": [
    {
      "id": 1,
      "name": "default",
      "builtin": true
    }
  ],
  "source": "local",
  "admin": false,
  "preferences": {
    "pinOnDrag": true
  },
  "actions": {
    "all": [],
    "a0df89fb": ["rawReadQuery"]
  }
}

Users - Update a batch of users

Update a batch of users in the application. Note: if all the groups for a given user are deleted, the users are added automatically to the default group.

/api/admin/users

Permission: admin  

Parameter

Field Type Description
users number[]

List of user IDs

addGroups optional number[]

IDs of the groups to add to the users

rmGroups optional number[]

IDs of the groups to remove from the users

HTTP/1.1 200 OK

Users - Get a user-group

Get a user-group.

/api/admin/:dataSource/groups/:id

Permission: admin  

Parameter

Field Type Description
id number

ID of the group

dataSource string

Key of the data-source

Success 200

Field Type Description
id number

ID of the group

name string

Name of the group

userCount number

Number of users in the group

builtin boolean

Whether the group was created internally by Linkurious

accessRights object[]

List of access-rights (it can also be empty)

  sourceKey string

Key of the data-source

  type string

Type of the right

Allowed values: "read", "write", "access"

  targetType string

Type of the target

Allowed values: "nodeCategory", "edgeType", "action"

  targetName string

Node category, edge type or action name

HTTP/1.1 200 OK
{
  "id": 1,
  "name": "default",
  "builtin": true,
  "userCount": 2,
  "accessRights": [
    {
      "sourceKey": "a0df89fb",
      "type": "read",
      "targetType": "nodeCategory",
      "targetName": "CITY"
    },
    {
      "sourceKey": "a0df89fb",
      "type": "read",
      "targetType": "nodeCategory",
      "targetName": "MARKET"
    }
  ]
}

Users - Get all user-groups

Get all the user-groups.

/api/admin/groups

Permission: admin  

Success 200

Field Type Description
groups group[]

List of user-groups

HTTP/1.1 200 OK
[
  {
    "id": 1,
    "name": "default",
    "builtin": true
  },
  {
    "id": 2,
    "name": "admin",
    "builtin": true
  }
]

Users - Create a user-group

Add a new user-group.

/api/admin/:dataSource/groups

Permission: admin  

Parameter

Field Type Description
name string

Name of the group

dataSource string

Key of the data-source

Success 200

Field Type Description
id number

ID of the group

name string

Name of the group

userCount number

Number of users in the group

builtin boolean

Whether the group was created internally by Linkurious

accessRights object[]

List of access-rights (it can also be empty)

  sourceKey string

Key of the data-source

  type string

Type of the right

Allowed values: "read", "write", "access"

  targetType string

Type of the target

Allowed values: "nodeCategory", "edgeType", "action"

  targetName string

Node category, edge type or action name

HTTP/1.1 200 OK
{
  "id": 1,
  "name": "default",
  "builtin": true,
  "userCount": 2,
  "accessRights": [
    {
      "sourceKey": "a0df89fb",
      "type": "read",
      "targetType": "nodeCategory",
      "targetName": "CITY"
    },
    {
      "sourceKey": "a0df89fb",
      "type": "read",
      "targetType": "nodeCategory",
      "targetName": "MARKET"
    }
  ]
}

Users - Delete a user-group

Delete a user-group.

/api/admin/groups/:id

Permission: admin  

Parameter

Field Type Description
id number

ID of the group

HTTP/1.1 204 No Content

Users - Get group-right info

Get possible targetType, type and action names

/api/admin/:dataSource/groups/rights_info

Permission: admin  

Parameter

Field Type Description
dataSource String

DataSource key of the database to get the rights from

HTTP/1.1 200 OK
{
    "types": ["read", "write", "do", "none"],
    "targetTypes": ["nodeCategory", "edgeType", "action"],
    "actions": ["rawWriteQuery", "rawReadQuery"]
}

Users - Get all user-groups with their access-rights

List all the user groups with their access-rights for the given data-source.

/api/admin/:dataSource/groups

Permission: admin  

Parameter

Field Type Description
dataSource String

DataSource key of the database to get the rights from

Success 200

Field Type Description
groups Object[]

list of user groups

  id Number

id of the group

  name String

name of the group

  userCount Number

number of users in the group

  builtin Boolean

Indicates if it was created by Linkurious

  accessRights Object[]

List of Access Rights, can be empty

    sourceKey String

Identifier of the data source for the access right

    type String

Type of the right. Can be 'read' 'write'

    targetType String

'nodeCategory' or 'edgeType'

HTTP/1.1 200 OK
[
    {
        "id": 1,
        "name": "default",
        "builtin": true,
        "userCount": 2,
        "accessRights": [
            {
                "sourceKey": "a0df89fb",
                "type": "read",
                "targetType": "nodeCategory",
                "targetName": "CITY"
            },
            {
                "sourceKey": "a0df89fb",
                "type": "read",
                "targetType": "nodeCategory",
                "targetName": "MARKET"
            }
        ]
    },
    {
        "id": 2,
        "name": "admin",
        "userCount": 1,
        "builtin": true,
        "accessRights": []
    }
]

Users - Put group rights

Set a right on a group.

/api/admin/:dataSource/groups/:id/group_rights

Permission: admin  

Parameter

Field Type Description
dataSource string

Key of of the data-source to set the right for.

groupId number

ID of the group for which to set the right for.

type string

Type of right to set ("do" is for targetType "action").

Allowed values: "read", "write", "do", "none"

targetType string

Type of target of the right (what the gives access to).

Allowed values: "nodeCategory", "edgeType", "action", "alert"

targetName string

Name or ID of the target of the right (e.g. name of the node category, ID of the alert). Use * to set for all possible values.

Success 200

Field Type Description
accessRights object

Access Right

  targetName string

Identifier of the data source for the access right

  type string

Right type

Allowed values: "read", "write", "do", "none"

  targetType string

Type of target for the rights

Allowed values: "nodeCategory", "edgeType", "action"

  sourceKey string

key of the data-source

HTTP/1.1 200 OK
{
    "sourceKey": "a0df89fb",
    "type": "read",
    "targetType": "nodeCategory",
    "targetName": "CITY"
}

Users - Put batch of groups rights

Bulk-set rights for a whole targetType on one or many groups.

/api/admin/:dataSource/groups/group_rights

Permission: admin  

Parameter

Field Type Description
dataSource string

key of a data-source

groupIds Number[]

List of group IDs to be update

rightType string

The type of right to set

Allowed values: "read", "write", "none"

targetType string

The targetType on which to set the rights.

Allowed values: "nodeCategory", "edgeType"

HTTP/1.1 200 OK
Generated with apidoc 0.16.1 - 2017-05-24T08:34:18.390Z