简体   繁体   English

使用 HTTP 接口列出 ArangoDB 中数据库的可用 collections?

[英]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.我正在尝试使用 ArangoDB 的 HTTP 接口转储属于特定数据库的所有 collections。

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.但是,一旦找到数据库名称(例如,“test”),我就无法转储属于该数据库的 collections。 Ultimately, I would like to dump the collections for this database, and then all results within a chosen collection.最后,我想为这个数据库转储 collections,然后是所选集合中的所有结果。

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.我已遵循此处提供的文档: https://www.arangodb.com/docs/stable/http/general.html ,但是我仍然无法找到此请求的相关文档。

You can get the list of all collections with您可以通过以下方式获取所有 collections 的列表

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正如文档的这一部分所暗示的那样: https://www.arangodb.com/docs/stable/http/collection.html#address-of-a-collection

The rest of the interface works accordingly, eg接口的rest相应工作,例如

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).获取有关单个集合的信息(已包含在第一次调用的 output 中)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM