Discard the Draft of a Document
POST
/mongodb/collections/{collectionName}/documents/{documentId}/discard-draft
Drops the pending changes of a published document of a collection declared with drafts (2.11.0). 400 when there are none. Audited as discardDraft.
Authorizations
httpAuth
Type
HTTP (bearer)
or
httpAuth1
Type
HTTP (basic)
or
apiKeyAuth
Type
API Key (header: X-AUTH-APIKEY)
Parameters
Path Parameters
collectionName*
The name of your MongoDb Collection
Type
Requiredstring
documentId*
DocumentId of the draft
Type
Requiredstring
Responses
application/json
JSON "wasAcknowledged": true, "upsertedIds": [ "string" ], "modifiedCount": 0, "matchedCount": 0
{
}
