Skip to content
This repository has been archived by the owner on Dec 10, 2018. It is now read-only.

Database Commands

kchodorow edited this page Sep 14, 2010 · 2 revisions

Usage

http://localhost:27080/dbname/_cmd

Description

Runs a database command.

Request Type

POST

Required Arguments

  • cmd=cmd_obj (object)

Return Values

Returns the database response.

Example: Dropping a Collection

Drop the ‘bar’ collection in the ‘foo’ database:

$ curl --data 'cmd={"drop" : "bar"}' 'http://localhost:27080/foo/_cmd'

Example: Group By

$ curl --data 'cmd={"group" : {"ns" : "geo", "$reduce" : "function(obj, prev) {}", "key" : {"x" : 1}, "initial" : {"count":0}}}' http://localhost:27080/test/_cmd
Clone this wiki locally