Graph Manager API
Github repository: https://github.com/ATTX-project/graphmanager-service
Table of Contents
Overview
The Graph Manager REST API has the following endpoints:
graph
- managing interaction with the Graph Store and retrieving statistics about it (e.g. list of named graphs, number of queries);health
- checks if the application is running.
Current version: 0.2
(URL for the endpoint should take into consideration for the API http://host:4302/version/endpoint
)
Building Graph Manager Service
In order to work with the service start with:
- GraphManager Service source - contains information on building both the project and the Docker image and testing from the source code;
- short tutorial on Gradle.
Graph Store Connection
The Graph Manager API requires a connection with the Graph Store. A graph store connection is required in order to:
- perform operations on the graph data stored such as update and replace;
- query and retrieve graph data.
Message Broker Connection
Graph Manager can work with the RabbitMQ Message Broker in order facilitate other services to manage the data in the Graph Store.
Environment Variables
MHOST
- container name or address for the MessageBroker-RabbitMQ database (defaults tolocalhost
);MUSER
- user name for MessageBroker (defaults touser
);MPROVQUEUE
- provenance queue in the MessageBroker (defaults toprovenance.inbox
);MRPCQUEUE
- RPC Queue for responding to messages received by the GraphManager Queue (defaults toattx.graphManager.inbox
);MKEY
- password for MessageBroker (defaults topassword
);GHOST
- Graph Store container name or address (defaults tolocalhost
);GPORT
- Graph Store port (defaults to3030
);GKEY
- Graph Store password (defaults topw123
);DS
- Graph Store working dataset (defaults tods
)DATADIR
- data directory for storing results from graph store (defaults to/attx-sb-shared
).
Service API Endpoints
health Endpoint
health
GET API:- simple: http://localhost:4302/health reponds with
200
in order for other applications to know the service is running.
- simple: http://localhost:4302/health reponds with
graph Endpoint
graph/query
POST API- Request:
{ "targetGraph": ["default"], "query": "SELECT ?subject ?predicate ?object WHERE { ?subject ?predicate ?object} LIMIT 25", "contentType": "application/sparql-results+xml" }
- Request:
graph/update
POST API- Request:
{ "targetGraph": "http://data.hulib.helsinki.fi/attx/strategy", "triples": "<http://example/egbook3> <http://purl.org/dc/elements/1.1/title> \"This is an example title\".", "contentType": "text/turtle" }
- Request:
graph/construct
POST APIgraph?uri={graphURI}
GET APIgraph/list
GET APIgraph/statistics
GET API