Home » IBM » C5050-285 » What information is required in order to delete it?
The following document exists in a Cloudant database named invoices created by user candidate
What information is required in order to delete it?
A. the document’s _id only
B. the document _id and user
C. the document’s most recent _rev value only
D. the document’s _id and most recent _rev value
Correct Answer: D
Explanation/Reference:
Explanation:
To delete a document you need its _id and _rev, the easiest way to get the _rev for a known document _id is to issue a HEAD request against the document:
Command
curl -i -X HEAD https://[username].cloudant.com/crud/[doc_id]
Response
HTTP/1.1 200 OK
X-Couch-Request-ID: 89d9d456
Server: CouchDB/1.0.2 (Erlang OTP/R14B)
ETag: "2-e4b98cc0fc2a181e4eb26f8ad41fa5fe"
Date: Mon, 04 Jun 2012 14:47:15 GMT
Content-Type: text/plain; charset=utf-8
Content-Length: 113
Cache-Control: must-revalidate
Download Printable PDF. VALID exam to help you PASS.
|
|