CoopDaddio
CoopDaddio

Reputation: 637

List available collections for database in ArangoDB using HTTP interface?

I am trying to use ArangoDB's HTTP interface to dump all collections belonging to a specific database.

I am able to view all available databases using the following command:

curl http://localhost:8529/_api/database

However, once I find a database name (for example, "test") I am unable to dump the collections belonging to this database. Ultimately, I would like to dump the collections for this database, and then all results within a chosen collection.

I have followed the documentation provided here: https://www.arangodb.com/docs/stable/http/general.html, however I am still unable to find the relevant documentation for this request.

Upvotes: 0

Views: 1368

Answers (1)

user594138
user594138

Reputation:

You can get the list of all collections with

curl http://localhost:8529/_db/DBNAME/_api/collection

as is implied in this part of the documentation: https://www.arangodb.com/docs/stable/http/collection.html#address-of-a-collection

The rest of the interface works accordingly, e.g.

curl http://localhost:8529/_db/DBNAME/_api/collection/COLLNAME

to get information about a single collection (that is already included in the output of the first call).

You find the complete swagger documentation with just two clicks in the Web-Interface: enter image description here

Upvotes: 2

Related Questions