쿼리와 일치하는 여러 문서를 삭제합니다.
연결된 MongoDB Atlas 데이터 소스의 이름입니다. 이는 일반적으로 "mongodb-atlas"이지만 데이터 소스를 생성할 때 다른 이름을 선택한 경우 앱에서 해당 이름이 다를 수 있습니다.
지정된 데이터 소스에 있는 데이터베이스의 이름입니다.
지정된 데이터베이스에 있는 컬렉션의 이름입니다.
문서와 일치하는 MongoDB 쿼리 필터입니다. 데이터 API가 지원하는 모든 쿼리 작업자 목록은 쿼리 작업자를 참조하세요.
연결된 MongoDB Atlas 데이터 소스의 이름입니다. 이는 일반적으로 "mongodb-atlas"이지만 데이터 소스를 생성할 때 다른 이름을 선택한 경우 앱에서 해당 이름이 다를 수 있습니다.
지정된 데이터 소스에 있는 데이터베이스의 이름입니다.
지정된 데이터베이스에 있는 컬렉션의 이름입니다.
문서와 일치하는 MongoDB 쿼리 필터입니다. 데이터 API가 지원하는 모든 쿼리 작업자 목록은 쿼리 작업자를 참조하세요.
curl -s "https://data.mongodb-api.com/app/$CLIENT_APP_ID/endpoint/data/v1/action/deleteMany" \
-X POST \
-H "apiKey: $API_KEY" \
-H 'Content-Type: application/ejson' \
-H "Accept: application/json" \
-d '{
"dataSource": "mongodb-atlas",
"database": "learn-data-api",
"collection": "tasks",
"filter": {
"status": "complete"
}
}'
{
"filter": {
"status": "complete"
},
"database": "todo",
"collection": "tasks",
"dataSource": "mongodb-atlas"
}
{
"filter": {
"status": "complete"
},
"database": "todo",
"collection": "tasks",
"dataSource": "mongodb-atlas"
}
{
"deletedCount": 12
}
{
"deletedCount": {
"$numberInt": 12
}
}
{
"error": "no authentication methods were specified",
"error_code": "InvalidParameter",
"link": "string"
}
{
"error": "must specify some form of authentication (either email+password, api-key, or jwt) in the request header or body",
"error_code": "MissingParameter",
"link": "string"
}
{
"error": "invalid session: error finding user for endpoint",
"error_code": "InvalidSession",
"link": "string"
}