2
votes

GET /_api/gharial/{graph-name}/vertex/{collection-name}/{vertex-key}

The above API fetches a specific vertex.

I want to fetch all vertices from the given graph-name using the REST API of ArangoDB.

Something like: SELECT * FROM vertices.

1

1 Answers

2
votes

Due to the resource intense nature of this, ArangoDB doesn't implement this directly.

You can use the export API to export complete collections. You will have to do this for all of your vertex collections belonging to your special graph.

The other possibility is to run AQL queries that return all documents:

FOR x IN vertexCollection RETURN x

for each of your collections using streaming queries, or a combined (even more resource intense) query to all of your vertex collections:

let vertexColA = (FOR x IN vertexCollectionA RETURN x)
let vertexColB = (FOR x IN vertexCollectionB RETURN x)
RETURN CONCAT(vertexColA, vertexColB)

Please note that this query will not be streameable.