12. Programmers Guide

12.1. GraphSpace REST API

The GraphSpace REST API provides endpoints for entities such as graphs, layouts, and groups that allow developers to interact with the GraphSpace website remotely by sending and receiving JSON objects. This API enables developers to create, read, and update GraphSpace content from client-side JavaScript or from applications written in any language. After a network is uploaded, the API allows the network owner to modify, delete, and share it. The API also allows a user to access several group management features available through the web interface. For example, a user can create or remove a group, add or remove members, obtain a list of groups he or she belongs to, and get information such as the membership on a group.

Note: In order to fully utilize the features of GraphSpace REST API, you must have an account on GraphSpace.

12.1.1. Why use GraphSpace REST API ?

The GraphSpace REST API makes it easier than ever to use GraphSpace in new and exciting ways, such as creating external applications on top of GraphSpace. For example,

  • Create a Cytoscape plugin which will allow users to transfer networks between GraphSpace and Cytoscape.
  • Users can also automate the way they upload graphs to GraphSpace.

The scope of what can be done with the GraphSpace REST API is only limited by our imagination. Overall, if a user want a structured, extensible, and simple way to get data in and out of GraphSpace over HTTP, they should probably use the GraphSpace REST API.

12.1.2. Base URL

All URLs referenced in the documentation have the following base:

http://www.graphspace.org/api/v1/

12.1.3. API Reference

12.2. graphspace-python

The GraphSpace software also includes a simple yet powerful Python library called graphspace python that allows a user to rapidly construct a network, add nodes and edges, modify their visual styles, and then upload the network, all within tens of lines of code. Moreover, the user need not know the details of the REST API to use this module. It is very easy to integrate this library into a user’s software pipeline.

12.2.1. Installation

Install graphspace_python from PyPI using:

    pip install graphspace_python

12.2.2. Usage

Please refer to graphspace_python package’s documentation to learn how to use it.