:POST /db/{graph}/restore
:DELETE /db/{graph}/schema
:GET /db/{graph}/schema/nodes
:GET /db/{graph}/schema/nodes/{type}
:POST /db/{graph}/schema/nodes/{type}
:DELETE /db/{graph}/schema/nodes/{type}
:GET /db/{graph}/schema/relationships
:GET /db/{graph}/schema/relationships/{type}
:POST /db/{graph}/schema/relationships/{type}
:DELETE /db/{graph}/schema/relationships/{type}
RageDB currently supports booleans, 64-bit integers, 64-bit doubles, strings and lists of the preceding data types:
boolean, integer, double, string, boolean_list, integer_list, double_list, string_list
:GET /db/{graph}/schema/nodes/{type}/properties/{property}
:POST /db/{graph}/schema/nodes/{type}/properties/{property}/{data_type}
:DELETE /db/{graph}/schema/nodes/{type}/properties/{property}
:GET /db/{graph}/schema/relationships/{type}/properties/{property}
:POST /db/{graph}/schema/relationships/{type}/properties/{property}/{data_type}
:DELETE /db/{graph}/schema/relationships/{type}/properties/{property}
:GET /db/{graph}/nodes?limit=100&skip=0
:GET /db/{graph}/nodes/{type}?limit=100&skip=0
:GET /db/{graph}/node/{type}/{key}
:GET /db/{graph}/node/{id}
:POST /db/{graph}/node/{type}/{key}
JSON formatted Body: {properties}
:DELETE /db/{graph}/node/{type}/{key}
:DELETE /db/{graph}/node/{id}
:POST /db/{graph}/nodes/{type}/{property}/{operation}?limit=100&skip=0 {json value}
:GET /db/{graph}/node/{type}/{key}/properties
:GET /db/{graph}/node/{id}/properties
:POST /db/{graph}/node/{type}/{key}/properties
JSON formatted Body: {properties}
:POST /db/{graph}/node/{id}/properties
JSON formatted Body: {properties}
:PUT /db/{graph}/node/{type}/{key}/properties
JSON formatted Body: {properties}
:PUT /db/{graph}/node/{id}/properties
JSON formatted Body: {properties}
:DELETE /db/{graph}/node/{type}/{key}/properties
:DELETE /db/{graph}/node/{id}/properties
:GET /db/{graph}/node/{type}/{key}/property/{property}
:GET /db/{graph}/node/{id}/property/{property}
:PUT /db/{graph}/node/{type}/{key}/property/{property}
JSON formatted Body: {property}
:PUT /db/{graph}/node/{id}/property/{property}
JSON formatted Body: {property}
:DELETE /db/{graph}/node/{type}/{key}/property/{property}
:DELETE /db/{graph}/node/{id}/property/{property}
:GET /db/{graph}/relationships?limit=100&skip=0
:GET /db/{graph}/relationships/{type}?limit=100&skip=0
:GET /db/{graph}/relationship/{id}
:POST /db/{graph}/node/{type_1}/{key_1}/relationship/{type_2}/{key_2}/{rel_type}
JSON formatted Body: {properties}
:POST /db/{graph}/node/{id_1}/relationship/{id_2}/{rel_type}
JSON formatted Body: {properties}
:DELETE /db/{graph}/relationship/{id}
:POST /db/{graph}/relationships/{type}/{property}/{operation}?limit=100&skip=0 {json value}
:GET /db/{graph}/node/{type}/{key}/relationships
:GET /db/{graph}/node/{type}/{key}/relationships/{direction [all, in, out]}
:GET /db/{graph}/node/{type}/{key}/relationships/{direction [all, in, out]}/{type TYPE_ONE}
:GET /db/{graph}/node/{type}/{key}/relationships/{direction [all, in, out]}/{type(s) TYPE_ONE&TYPE_TWO}
:GET /db/{graph}/node/{id}/relationships
:GET /db/{graph}/node/{id}/relationships/{direction [all, in, out]}
:GET /db/{graph}/node/{id}/relationships/{direction [all, in, out]}/{type TYPE_ONE}
:GET /db/{graph}/node/{id}/relationships/{direction [all, in, out]}/{type(s) TYPE_ONE&TYPE_TWO}
:GET /db/{graph}/relationship/{id}/properties
:POST /db/{graph}/relationship/{id}/properties
JSON formatted Body: {properties}
:PUT /db/{graph}/relationship/{id}/properties
JSON formatted Body: {properties}
:DELETE /db/{graph}/relationship/{id}/properties
:GET /db/{graph}/relationship/{id}/property/{property}
:PUT /db/{graph}/relationship/{id}/property/{property}
JSON formatted Body: {property}
:DELETE /db/{graph}/relationship/{id}/property/{property}
:GET /db/{graph}/node/{type}/{key}/degree
:GET /db/{graph}/node/{type}/{key}/degree/{direction [all, in, out]}
:GET /db/{graph}/node/{type}/{key}/degree/{direction [all, in, out]}/{type TYPE_ONE}
:GET /db/{graph}/node/{type}/{key}/degree/{direction [all, in, out]}/{type(s) TYPE_ONE&TYPE_TWO}
:GET /db/{graph}/node/{id}/degree
:GET /db/{graph}/node/{id}/degree/{direction [all, in, out]}
:GET /db/{graph}/node/{id}/degree/{direction [all, in, out]}/{type TYPE_ONE}
:GET /db/{graph}/node/{id}/degree/{direction [all, in, out]}/{type(s) TYPE_ONE&TYPE_TWO}
:GET /db/{graph}/node/{type}/{key}/neighbors
:GET /db/{graph}/node/{type}/{key}/neighbors/{direction [all, in, out]}
:GET /db/{graph}/node/{type}/{key}/neighbors/{direction [all, in, out]}/{type TYPE_ONE}
:GET /db/{graph}/node/{type}/{key}/neighbors/{direction [all, in, out]}/{type(s) TYPE_ONE&TYPE_TWO}
:GET /db/{graph}/node/{id}/neighbors
:GET /db/{graph}/node/{id}/neighbors/{direction [all, in, out]}
:GET /db/{graph}/node/{id}/neighbors/{direction [all, in, out]}/{type TYPE_ONE}
:GET /db/{graph}/node/{id}/neighbors/{direction [all, in, out]}/{type(s) TYPE_ONE&TYPE_TWO}
:POST db/{graph}/lua
STRING formatted Body: {script}
The script must end in one or more values that will be returned in JSON format inside an Array. Within the script the user can access to graph functions. For example:
-- Get some things about a node
a = NodeGetId("Node","Max")
b = NodeTypesGetCount()
c = NodeTypesGetCount("Node")
d = NodeGetProperty("Node", "Max", "name")
e = NodeGetProperty(a, "name")
a, b, c, d, e
A second example:
-- get the names of nodes I have relationships with
names = {}
ids = NodeGetLinks("Node", "Max")
for k=1,#ids do
v = ids[k]
table.insert(names, NodeGetProperty(v:getNodeId(), "name"))
end
names
RageDB supports GQL (Graph Query Language) queries, including high-performance full-text search capabilities powered by a native, partitioned iresearch integration. For the complete reference of GQL features, grammar compliance, and catalog schema controls, see GQL.md.
To execute a GQL query, send a POST request to the /db/{graph}/gql endpoint with the GQL query string as the body:
:POST /db/{graph}/gql
Body: MATCH p IN SEARCH Product.description FOR 'databases' YIELD p, score RETURN p.name, score
You can create full-text indexes on node or relationship property fields to search matching terms:
- Create Full-Text Index:
CREATE FULLTEXT INDEX Product.description CREATE FULLTEXT INDEX WORKS_AT.since
- Show Indexes (returns JSON array of active indexes with
"kind": "fulltext"for FTS indexes):SHOW INDEXES
- Drop Full-Text Index:
DROP INDEX Product.description
Full-text search queries match property terms and yield the matched entity alongside a BM25 relevance score.
- Exact match:
MATCH p IN SEARCH Product.description FOR 'databases' YIELD p, score RETURN p.name, score
- Fuzzy match (supports Levenshtein distance matching up to 2 edits using
~or fuzzy options):MATCH p IN SEARCH Product.description FOR 'databas~' OPTIONS { fuzzy: 'true' } YIELD p, score RETURN p.name, score
